Fix NFTokenOffer and NFTokenAcceptOffer tables etc.

This commit is contained in:
mDuo13
2025-07-08 15:39:40 -07:00
parent c132512425
commit b624dcf2be
2 changed files with 16 additions and 19 deletions

View File

@@ -33,13 +33,12 @@ _(Added by the [NonFungibleTokensV1_1 amendment][].)_
| Name |JSON Type | [Internal Type][] | Required? | Description | | Name |JSON Type | [Internal Type][] | Required? | Description |
|:--------------------|:---------------------|:------------------|:------------|:-----------| |:--------------------|:---------------------|:------------------|:------------|:-----------|
| `Amount` | [Currency Amount][] | Amount | Yes | Amount expected or offered for the NFToken. If the token has the `lsfOnlyXRP` flag set, the amount must be specified in XRP. Sell offers that specify assets other than XRP must specify a non-zero amount. Sell offers that specify XRP can be 'free' (that is, the Amount field can be equal to `"0"`). | | `Amount` | [Currency Amount][] | Amount | Yes | Amount expected or offered for the NFT. If the token has the `lsfOnlyXRP` flag set, the amount must be specified in XRP. Sell offers that specify assets other than XRP must specify a non-zero amount. Sell offers that specify XRP can be 'free' (that is, the Amount field can be equal to `"0"`). |
| `Destination` | String - [Address][] | | AccountID | No | The AccountID for which this offer is intended. If present, only that account can accept the offer. | | `Destination` | String - [Address][] | AccountID | No | The account for which this offer is intended. If present, only that account can accept the offer. |
| `Expiration` | Number | UInt32 | No | The time after which the offer is no longer active. The value is the number of seconds since the Ripple Epoch. | | `Expiration` | Number | UInt32 | No | The time after which the offer is no longer active. The value is the number of seconds since the Ripple Epoch. |
| `LedgerEntryType` | String | UInt16 | Yes | The value `0x0037`, mapped to the string `NFTokenOffer`, indicates that this is an offer to trade a `NFToken`. | | `NFTokenID` | String - Hexadecimal | UInt256 | Yes | The `NFTokenID` of the NFT referenced by this offer. |
| `NFTokenID` | String - Hexadecimal | UInt256 | Yes | The `NFTokenID` of the NFToken object referenced by this offer. |
| `NFTokenOfferNode` | String - Hexadecimal | UInt64 | No | Internal bookkeeping, indicating the page inside the token buy or sell offer directory, as appropriate, where this token is being tracked. This field allows the efficient deletion of offers. | | `NFTokenOfferNode` | String - Hexadecimal | UInt64 | No | Internal bookkeeping, indicating the page inside the token buy or sell offer directory, as appropriate, where this token is being tracked. This field allows the efficient deletion of offers. |
| `Owner` | String - [Address][] | AccountID | Yes | Owner of the account that is creating and owns the offer. Only the current Owner of an NFToken can create an offer to sell an NFToken, but any account can create an offer to buy an NFToken. | | `Owner` | String - [Address][] | AccountID | Yes | The account that created and owns this offer. Only the current owner of an NFT can create an offer to sell an NFToken, but offers from past owners can remain in the ledger after the NFT has been transferred. Any account can create an offer to buy an NFT. |
| `OwnerNode` | String - Hexadecimal | UInt64 | No | Internal bookkeeping, indicating the page inside the owner directory where this token is being tracked. This field allows the efficient deletion of offers. | | `OwnerNode` | String - Hexadecimal | UInt64 | No | Internal bookkeeping, indicating the page inside the owner directory where this token is being tracked. This field allows the efficient deletion of offers. |
| `PreviousTxnID` | String - [Hash][] | UInt256 | Yes | Identifying hash of the transaction that most recently modified this object. | | `PreviousTxnID` | String - [Hash][] | UInt256 | Yes | Identifying hash of the transaction that most recently modified this object. |
| `PreviousTxnLgrSeq` | Number | UInt32 | Yes | Index of the ledger that contains the transaction that most recently modified this object. | | `PreviousTxnLgrSeq` | Number | UInt32 | Yes | Index of the ledger that contains the transaction that most recently modified this object. |

View File

@@ -1,18 +1,16 @@
--- ---
html: nftokenacceptoffer.html
parent: transaction-types.html
seo: seo:
description: Accept an offer to buy or sell an NFToken. description: Accept an offer to buy or sell an NFT.
labels: labels:
- NFTs, Non-fungible Tokens - NFTs, Non-fungible Tokens
--- ---
# NFTokenAcceptOffer # NFTokenAcceptOffer
[[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/app/tx/detail/NFTokenAcceptOffer.cpp "Source") [[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/app/tx/detail/NFTokenAcceptOffer.cpp "Source")
The `NFTokenAcceptOffer` transaction is used to accept offers to `buy` or `sell` an `NFToken`. It can either: The `NFTokenAcceptOffer` transaction is used to accept offers to buy or sell an NFT. It has two possible modes:
* Allow one offer to be accepted. This is called _direct_ mode. * In _direct_ mode, a buyer can accept a sell offer directly, or a seller can accept a buy offer directly.
* Allow two distinct offers, one offering to buy a given `NFToken` and the other offering to sell the same `NFToken`, to be accepted in an atomic fashion. This is called _brokered_ mode. * In _brokered_ mode, a third party (the _broker_) can match two distinct offers, one buying and one selling. If the buy price is higher than the sell price, the broken can claim the difference as a fee for themself.
_(Added by the [NonFungibleTokensV1_1 amendment][].)_ _(Added by the [NonFungibleTokensV1_1 amendment][].)_
@@ -44,9 +42,9 @@ The mode in which the transaction operates depends on the presence of the `NFTok
| `NFTokenSellOffer` | `NFTokenBuyOffer` | Mode | | `NFTokenSellOffer` | `NFTokenBuyOffer` | Mode |
|:-------------------|:------------------|:---------| |:-------------------|:------------------|:---------|
| ✔️ | ✔️ | Brokered | | | | Brokered |
| ✔️ | ❌ | Direct | | | ❌ | Direct |
| ❌ | ✔️ | Direct | | ❌ | | Direct |
If neither of those fields is specified, the transaction is malformed and produces a `tem` class error. If neither of those fields is specified, the transaction is malformed and produces a `tem` class error.
@@ -74,11 +72,11 @@ The transaction fails with a [`tec`-class code](../transaction-results/tec-codes
{% raw-partial file="/docs/_snippets/tx-fields-intro.md" /%} {% raw-partial file="/docs/_snippets/tx-fields-intro.md" /%}
| Field | JSON Type | [Internal Type][] | Description | | Field | JSON Type | [Internal Type][] | Required? | Description |
|:-------------------|:--------------------|:------------------|:--------------| |:-------------------|:--------------------|:------------------|:----------|:------------|
| `NFTokenSellOffer` | String | UInt256 | _(Optional)_ Identifies the `NFTokenOffer` that offers to sell the `NFToken`. | | `NFTokenSellOffer` | String - [Hash][] | UInt256 | No | Identifies the `NFTokenOffer` that offers to sell the `NFToken`. |
| `NFTokenBuyOffer` | String | UInt256 | _(Optional)_ Identifies the `NFTokenOffer` that offers to buy the `NFToken`. | | `NFTokenBuyOffer` | String - [Hash][] | UInt256 | No | Identifies the `NFTokenOffer` that offers to buy the `NFToken`. |
| `NFTokenBrokerFee` | [Currency Amount][] | Amount | _(Optional)_ This field is only valid in brokered mode, and specifies the amount that the broker keeps as part of their fee for bringing the two offers together; the remaining amount is sent to the seller of the `NFToken` being bought. If specified, the fee must be such that, before applying the transfer fee, the amount that the seller would receive is at least as much as the amount indicated in the sell offer. | | `NFTokenBrokerFee` | [Currency Amount][] | Amount | No | **Brokered mode only.** The amount that the broker keeps as their fee for bringing the two offers together; the remaining amount is sent to the seller of the NFT. If specified, the fee must be such that, before applying the transfer fee, the amount that the seller would receive is at least as much as the amount indicated in the sell offer. |
In direct mode, you must specify **either** the `NFTokenSellOffer` or the `NFTokenBuyOffer` field. In brokered mode, you must specify **both** fields. In direct mode, you must specify **either** the `NFTokenSellOffer` or the `NFTokenBuyOffer` field. In brokered mode, you must specify **both** fields.