See the canonical spec:
.TypeScriptimport { Client, Wallet } from 'xrpl'; async function createNFTokenOffer(): Promise<void> { const client = new Client('wss://honeycluster.dev'); await client.connect(); const wallet = Wallet.fromSeed('s...'); const prepared = await client.autofill({ TransactionType: 'NFTokenCreateOffer', Account: wallet.address, NFTokenID: '000800001B736F6D657468696E675F636F6F6C5F000000000000000000', Amount: '1000000', Flags: 1, }); const signed = wallet.sign(prepared); const res = await client.submitAndWait(signed.tx_blob); console.log(res); await client.disconnect(); } createNFTokenOffer().catch(console.error);
| Field | Type | Required | Description |
|---|---|---|---|
Account | String | Yes | The address of the account creating the offer |
NFTokenID | String | Yes | The unique identifier of the NFToken |
Amount | String/Object | Yes | The price for the NFToken |
Flags | Number | No | Flags to control offer behavior |
Destination | String | No | The account that can accept this offer |
Amount:
For XRP: "1000000" (drops)
For issued currency: {"currency": "USD", "issuer": "r...", "value": "1"}
Flags:
1 (tfSellNFToken): This is a sell offer (NFToken owner selling)
0 (default): This is a buy offer (NFToken owner buying)
Destination:
If specified, only that account can accept the offer
If omitted, any account can accept the offer
Note:
Creates a buy or sell offer for an NFToken
Offers can be partially filled and remain active until cancelled
The offer is stored in the ledger until accepted or cancelled
Creates a buy or sell offer for an NFToken
Flags determine if it's a buy or sell offer
Amount specifies the price in XRP or issued currency
Offers can be partially filled and remain active until cancelled
Always use autofill to set fees and sequence safely when using the XRPL client library