mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-04 20:05:50 +00:00
Merge pull request #1510 from XRPLF/Issue_1487
Changes per Git issue 1487
This commit is contained in:
@@ -149,7 +149,7 @@ Each object in the `account_nfts` array represents one [NFToken][] and has the f
|
||||
| `Flags` | Number | A bit-map of boolean flags enabled for this NFToken. See [NFToken Flags](nftoken.html#nftoken-flags) for possible values. |
|
||||
| `Issuer` | String - [Address][] | The account that issued this NFToken. |
|
||||
| `NFTokenID` | String | The unique identifier of this NFToken, in hexadecimal. |
|
||||
| `NFTokenTaxon` | Number | The unscrambled version of this token's [taxon](nftoken.html#taxon). Several tokens with the same taxon might represent instances of a limited series. |
|
||||
| `NFTokenTaxon` | Number | The unscrambled version of this token's [taxon](nftoken.html#nftokentaxon). Several tokens with the same taxon might represent instances of a limited series. |
|
||||
| `URI` | String | The URI data associated with this NFToken, in hexadecimal. |
|
||||
| `nft_serial` | Number | The token sequence number of this NFToken, which is unique for its issuer. |
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@ status: not_enabled
|
||||
# NFToken
|
||||
{% include '_snippets/nfts-disclaimer.md' %}
|
||||
|
||||
The `NFToken` object represents a single non-fungible token (NFT). It is not stored on its own, but is contained in a [NFTokenPage object][] alongside other NFTs.
|
||||
The `NFToken` object represents a single non-fungible token (NFT). It is not stored on its own, but is contained in a [NFTokenPage object][] alongside other `NFToken` objects.
|
||||
|
||||
Example {{currentpage.name}} JSON
|
||||
|
||||
```json
|
||||
{
|
||||
"TokenID": "000B013A95F14B0044F78A264E41713C64B5F89242540EE208C3098E00000D65",
|
||||
"NFTokenID": "000B013A95F14B0044F78A264E41713C64B5F89242540EE208C3098E00000D65",
|
||||
"URI": "ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf4dfuylqabf3oclgtqy55fbzdi"
|
||||
}
|
||||
```
|
||||
@@ -24,23 +24,23 @@ Example {{currentpage.name}} JSON
|
||||
Unlike other objects, `NFToken` has no field to identify the object type or current owner of the object. `NFToken `objects are grouped into `NFTokenPages` that implicitly define the object type and identify the owner.
|
||||
|
||||
|
||||
## TokenID
|
||||
## NFTokenID
|
||||
|
||||
TokenID, optional, string, Hash256
|
||||
`NFTokenID`, optional, string, Hash256
|
||||
|
||||
This composite field uniquely identifies a token, and consists of the following sections.
|
||||
|
||||
1. 16 bits that identify flags or settings specific to the NFT
|
||||
2. 16 bits that encode the transfer fee associated with this token, if any
|
||||
1. 16 bits that identify flags or settings specific to the NFToken
|
||||
2. 16 bits that encode the transfer fee associated with this NFToken, if any
|
||||
3. A 160-bit account identifier of the issuer
|
||||
4. A 32-bit issuer-specified [taxon](https://www.merriam-webster.com/dictionary/taxon)
|
||||
4. A 32-bit issuer-specified [NFTokenTaxon](https://www.merriam-webster.com/dictionary/taxon)
|
||||
5. An (automatically generated) monotonically increasing 32-bit sequence number.
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
The 16-bit flags, transfer fee fields, the 32-bit taxon, and the sequence number fields are stored in big-endian format.
|
||||
The 16-bit flags, transfer fee fields, the 32-bit `NFTokenTaxon`, and the sequence number fields are stored in big-endian format.
|
||||
|
||||
|
||||
## NFToken Flags
|
||||
@@ -86,7 +86,7 @@ Flags are properties or other options associated with the `NFToken` object.
|
||||
</td>
|
||||
<td><code>0x0008</code>
|
||||
</td>
|
||||
<td>If set, indicates that this NFT can be transferred. This flag has no effect if the token is being transferred <em>from</em> the issuer or <em>to</em> the issuer.
|
||||
<td>If set, indicates that this <code>NFToken</code> can be transferred. This flag has no effect if the token is being transferred <em>from</em> the issuer or <em>to</em> the issuer.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -100,7 +100,7 @@ Flags are properties or other options associated with the `NFToken` object.
|
||||
</table>
|
||||
|
||||
|
||||
`NFToken `flags are immutable: they can only be set during the `NFTokenMint` transaction and cannot be changed later.
|
||||
`NFToken` flags are immutable: they can only be set during the `NFTokenMint` transaction and cannot be changed later.
|
||||
|
||||
|
||||
### Example
|
||||
@@ -112,36 +112,36 @@ The example sets three flags: lsfBurnable (0x0001), lsfOnlyXRP (0x0002), lsfTran
|
||||
|
||||
### TransferFee
|
||||
|
||||
The TransferFee value specifies the percentage fee, in units of 1/10,000, charged by the issuer for secondary sales of the token. Valid values for this field are between 0 and 50,000, inclusive. A value of 1 is equivalent to 1bps or 0.01%, allowing transfer rates between 0% and 50%.
|
||||
The `TransferFee` value specifies the percentage fee, in units of 1/10,000, charged by the issuer for secondary sales of the token. Valid values for this field are between 0 and 50,000, inclusive. A value of 1 is equivalent to 1bps or 0.00001%, allowing transfer rates between 0% and 50%.
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
This value sets the transfer fee to 314 bps, or 3.14%.
|
||||
This value sets the transfer fee to 314, or .00314%.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
### Issuer Identification
|
||||
|
||||
The third section of the TokenID is a big endian representation of the issuer’s public address.
|
||||
The third section of the `NFTokenID` is a big endian representation of the issuer’s public address.
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### Taxon
|
||||
### NFTokenTaxon
|
||||
|
||||
The fourth section is a taxon created by the issuer.
|
||||
The fourth section is a `NFTokenTaxon` created by the issuer.
|
||||
|
||||

|
||||

|
||||
|
||||
An issuer might issue several NFTs with the same taxon; to ensure that NFTs are spread across multiple pages, the taxon is scrambled using the fifth section, a dumb sequential number, as the seed for a random number generator. The scrambled value is stored with the `NFToken`, but the unscrambled value is the actual taxon.
|
||||
An issuer might issue several `NFToken` objects with the same `NFTokenTaxon`; to ensure that `NFToken` objects are spread across multiple pages, the `NFTokenTaxon` is scrambled using the fifth section, a sequential number, as the seed for a random number generator. The scrambled value is stored with the `NFToken`, but the unscrambled value is the actual NFTokenTaxon.
|
||||
|
||||

|
||||
|
||||
Notice that the scrambled version of the taxon is `0xBC8B858E`: the scrambled version of the taxon specified by the issuer. But the _actual_ value of the taxon is the unscrambled value.
|
||||
Notice that the scrambled version of the `NFTokenTaxon` is `0xBC8B858E`: the scrambled version of the `NFTokenTaxon` specified by the issuer. But the _actual_ value of the `NFTokenTaxon` is the unscrambled value.
|
||||
|
||||
### Token Sequence
|
||||
|
||||
@@ -172,21 +172,21 @@ The format for a text record is as follows.
|
||||
|
||||
|
||||
```
|
||||
xrpl-nft-data-token-info-v1 IN TXT "https://host.example.com/api/token-info/{tokenid}"
|
||||
xrpl-nft-data-token-info-v1 IN TXT "https://host.example.com/api/token-info/{nftokenid}"
|
||||
```
|
||||
|
||||
|
||||
Replace the string `{tokenid}` with the requested token’s `NFTokenID` as a 64-byte hex string when you attempt to query information.
|
||||
Replace the string `{nftokenid}` with the requested `NFTokenID` as a 64-byte hex string when you attempt to query information.
|
||||
|
||||
Your implementation should check for the presence of `TXT` records and use those query strings if present. If no string is present, implementations should attempt to use a default URL. Assuming the domain is _example.com_, the default URL would be:
|
||||
|
||||
|
||||
```
|
||||
https://example.com/.well-known/xrpl-nft/{tokenid}
|
||||
https://example.com/.well-known/xrpl-nft/{nftokenid}
|
||||
```
|
||||
|
||||
|
||||
You create NFTs using the `NFTokenMint` transaction. You can optionally destroy NFTokens using the `NFTokenBurn` transaction.
|
||||
You create `NFToken` objects using the `NFTokenMint` transaction. You can optionally destroy `NFToken` objects using the `NFTokenBurn` transaction.
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
|
||||
@@ -90,7 +90,7 @@ The unique ID (`NFTokenOfferID`) of the `NFTokenOffer` object is the result of t
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>TokenID</code>
|
||||
<td><code>NFTokenID</code>
|
||||
</td>
|
||||
<td>Yes
|
||||
</td>
|
||||
@@ -98,7 +98,7 @@ The unique ID (`NFTokenOfferID`) of the `NFTokenOffer` object is the result of t
|
||||
</td>
|
||||
<td>Hash256
|
||||
</td>
|
||||
<td><code>TokenID</code> of the <code>NFToken</code> object referenced by this offer.
|
||||
<td><code>NFTokenID</code> of the <code>NFToken</code> object referenced by this offer.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -152,7 +152,7 @@ Sell offers that specify assets other than XRP must specify a non-zero amount. S
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>OfferNode</code>
|
||||
<td><code>NFTokenOfferNode</code>
|
||||
</td>
|
||||
<td>No
|
||||
</td>
|
||||
@@ -192,19 +192,11 @@ Sell offers that specify assets other than XRP must specify a non-zero amount. S
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>lsfBuyToken</code>
|
||||
<td><code>lsfSellNFToken</code>
|
||||
</td>
|
||||
<td><code>0x00000001</code>
|
||||
</td>
|
||||
<td>If set, the offer is a buy offer. Otherwise, the offer is a sell offer.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>lsfAuthorized</code>
|
||||
</td>
|
||||
<td><code>0x00000002</code>
|
||||
</td>
|
||||
<td>If set, the offer has been approved by the issuer. This flag can only be set by the <code>Issuer</code> of the token or an account authorized by the issuer (for example, the <code>MintAccount</code> listed in the account root of the <code>Issuer</code>) and only if the token has the flag indicating that authorization is required.
|
||||
<td>If set, the offer is a sell offer. Otherwise, the offer is a buy offer.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -11,7 +11,7 @@ status: not_enabled
|
||||
# NFTokenPage
|
||||
{% include '_snippets/nfts-disclaimer.md' %}
|
||||
|
||||
The `NFTokenPage` object represents a collection of `NFToken` objects owned by the same account. An account can have multiple `NFTokenPage` ledger objects, which form a doubly-linked list (DLL).
|
||||
The `NFTokenPage` object represents a collection of `NFToken` objects owned by the same account. An account can have multiple `NFTokenPage` ledger objects, which form a doubly linked list.
|
||||
|
||||
## Example {{currentpage.name}} JSON
|
||||
|
||||
@@ -26,13 +26,12 @@ The `NFTokenPage` object represents a collection of `NFToken` objects owned by t
|
||||
"95C8761B22894E328646F7A70035E9DFBECC90EDD83E43B7B973F626D21A0822",
|
||||
"PreviousTxnLgrSeq":
|
||||
42891441,
|
||||
"Tokens":
|
||||
"NFTokens":
|
||||
{
|
||||
{
|
||||
"TokenID":
|
||||
"NFTokenID":
|
||||
"000B013A95F14B0044F78A264E41713C64B5F89242540EE208C3098E00000D65",
|
||||
"URI":
|
||||
"ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf4dfuylqabf3oclgtqy55fbzdi"
|
||||
"URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469"
|
||||
},
|
||||
/* potentially more objects */
|
||||
}
|
||||
@@ -123,7 +122,7 @@ An `NFTokenPage` object can have the following required and optional fields:
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>NonFungibleTokens</code>
|
||||
<td><code>NFTokens</code>
|
||||
</td>
|
||||
<td>Yes
|
||||
</td>
|
||||
@@ -180,15 +179,15 @@ The value of the incremental reserve is, as of this writing, 2 XRP. The table be
|
||||
<tr>
|
||||
<td><strong>Incremental Reserve</strong>
|
||||
</td>
|
||||
<td><strong>1 NFT</strong>
|
||||
<td><strong>1 NFToken</strong>
|
||||
</td>
|
||||
<td><strong>8 NFTs</strong>
|
||||
<td><strong>8 NFTokens</strong>
|
||||
</td>
|
||||
<td><strong>16 NFTs</strong>
|
||||
<td><strong>16 NFTokens</strong>
|
||||
</td>
|
||||
<td><strong>32 NFTs</strong>
|
||||
<td><strong>32 NFTokens</strong>
|
||||
</td>
|
||||
<td><strong>64 NFTs</strong>
|
||||
<td><strong>64 NFTokens</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -28,7 +28,7 @@ The mode in which the transaction operates depends on the presence of the `NFTok
|
||||
|
||||
If neither of those fields is specified, the transaction is malformed and produces a `tem` class error.
|
||||
|
||||
The semantics of brokered mode are slightly different than one in direct mode: The account executing the transaction functions as a broker, bringing the two offers together and causing them to be matched, but does not acquire ownership of the involved NFT, which will, if the transaction is successful, be transferred directly from the seller to the buyer.
|
||||
The semantics of brokered mode are slightly different than one in direct mode: The account executing the transaction functions as a broker, bringing the two offers together and causing them to be matched, but does not acquire ownership of the involved `NFToken`, which will, if the transaction is successful, be transferred directly from the seller to the buyer.
|
||||
|
||||
|
||||
## Execution Details
|
||||
@@ -39,8 +39,8 @@ The semantics of brokered mode are slightly different than one in direct mode: T
|
||||
In direct mode, `NFTokenAcceptOffer` transaction fails if:
|
||||
|
||||
* The `NFTokenOffer` against which `NFTokenAcceptOffer` transaction is placed is an offer to `buy` the `NFToken` and the account executing the `NFTokenAcceptOffer` is not, at the time of execution, the current owner of the corresponding `NFToken`.
|
||||
* The `NFTokenOffer` against which `NFTokenAcceptOffer` transaction is placed is an offer to `sell` the `NFToken` and was placed by an account which is not, at the time of execution, the current owner of the `NFToken`
|
||||
* The `NFTokenOffer` against which `NFTokenAcceptOffer` transaction is placed is an offer to `sell` the `NFToken` and was placed by an account which is not, at the time of execution, the `Account` in the recipient field of the `NFTokenOffer`, if there exist one.
|
||||
* The `NFTokenOffer` against which `NFTokenAcceptOffer` transaction is placed is an offer to `sell` the `NFToken` and was placed by an account which is not, at the time of execution, the current owner of the `NFToken`.
|
||||
* The `NFTokenOffer` against which `NFTokenAcceptOffer` transaction is placed is an offer to `sell` the `NFToken` and was placed by an account which is not, at the time of execution, the `Account` in the recipient field of the `NFTokenOffer`, if one exists.
|
||||
* The `NFTokenOffer` against which `NFTokenAcceptOffer` transaction is placed specifies an `expiration` time and the close time field of the parent of the ledger in which the transaction would be included has already passed.
|
||||
* The `NFTokenOffer` against which `NFTokenAcceptOffer` transaction is placed to buy or sell the `NFToken `is owned by the account executing the `NFTokenAcceptOffer`.
|
||||
|
||||
@@ -49,7 +49,7 @@ A side-effect of such failures is the removal of the `NFTokenOffer` object and t
|
||||
If the transaction is executed successfully then:
|
||||
|
||||
* The relevant `NFTtoken` changes ownership, meaning that the token is removed from the `NFTokenPage` of the existing `owner` and added to the `NFTokenPage` of the new `owner`.
|
||||
* Funds are transferred from the buyer to the seller, as specified in the `NFTokenOffer`. If the corresponding `NFToken` offer specifies a `TransferRate`, then the `issuer` receives the specified percentage, with the balance going to the seller of the `NFToken`.
|
||||
* Funds are transferred from the buyer to the seller, as specified in the `NFTokenOffer`. If the corresponding `NFToken` offer specifies a `TransferFee`, then the `issuer` receives the specified percentage, with the balance going to the seller of the `NFToken`.
|
||||
|
||||
|
||||
### Brokered Mode
|
||||
|
||||
@@ -37,7 +37,7 @@ This transaction removes the listed `NFTokenOffer` object from the ledger, if pr
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:------------------|:----------|:------------------|:-------------------------|
|
||||
| `TokenOffers` | Array | VECTOR256 | An array of IDs of the `NFTokenOffer` objects to cancel (not the IDs of `NFToken` objects, but the IDs of the `NFTokenOffer` objects). Each entry must be a different [object ID](ledger-object-ids.html) of an [NFTokenOffer](nftokenoffer.html) object; the transaction is invalid if the array contains duplicate entries. |
|
||||
| `NFTokenOffers` | Array | VECTOR256 | An array of IDs of the `NFTokenOffer` objects to cancel (not the IDs of `NFToken` objects, but the IDs of the `NFTokenOffer` objects). Each entry must be a different [object ID](ledger-object-ids.html) of an [NFTokenOffer](nftokenoffer.html) object; the transaction is invalid if the array contains duplicate entries. |
|
||||
|
||||
The transaction can succeed even if one or more of the IDs in the `NFTokenOffers` field do not refer to objects that currently exist in the ledger. (For example, those token offers might already have been deleted.) The transaction fails with an error if one of the IDs points to an object that does exist, but is not a [NFTokenOffer](nftokenoffer.html) object.
|
||||
|
||||
@@ -52,8 +52,8 @@ In addition to errors that can occur for all transactions, {{currentpage.name}}
|
||||
| Error Code | Description |
|
||||
|:-------------------|:--------------------------------------------------------|
|
||||
| `temDISABLED` | The [NonFungibleTokensV1 amendment][] is not enabled. |
|
||||
| `temMALFORMED` | The transaction was not validly formatted. For example, the `TokenOffers` array was empty or contained more than the maximum number of offers that can be canceled at one time. |
|
||||
| `tecNO_PERMISSION` | At least one of the IDs in the `TokenOffers` field refers to an object that cannot be canceled. For example, the sender of this transaction is not the owner or `Destination` of the offer, or the object was not an `NFTokenOffer` type object. |
|
||||
| `temMALFORMED` | The transaction was not validly formatted. For example, the `NFTokenOffers` array was empty or contained more than the maximum number of offers that can be canceled at one time. |
|
||||
| `tecNO_PERMISSION` | At least one of the IDs in the `NFTokenOffers` field refers to an object that cannot be canceled. For example, the sender of this transaction is not the owner or `Destination` of the offer, or the object was not an `NFTokenOffer` type object. |
|
||||
|
||||
<!--{# common link defs #}-->
|
||||
{% include '_snippets/rippled-api-links.md' %}
|
||||
|
||||
@@ -41,9 +41,9 @@ If successful, the transaction creates a [NFTokenOffer object][]. Each offer cou
|
||||
|
||||
Transactions of the NFTokenCreateOffer type support additional values in the [`Flags` field](transaction-common-fields.html#flags-field), as follows:
|
||||
|
||||
| Flag Name | Hex Value | Decimal Value | Description |
|
||||
|:--------------|:-------------|:--------------|:------------------------------|
|
||||
| `tfSellToken` | `0x00000001` | `1` | If enabled, indicates that the offer is a sell offer. Otherwise, it is a buy offer. |
|
||||
| Flag Name | Hex Value | Decimal Value | Description |
|
||||
|:----------------|:-------------|:--------------|:------------------------------|
|
||||
| `tfSellNFToken` | `0x00000001` | `1` | If enabled, indicates that the offer is a sell offer. Otherwise, it is a buy offer. |
|
||||
|
||||
|
||||
## Error Cases
|
||||
|
||||
@@ -12,8 +12,6 @@ status: not_enabled
|
||||
|
||||
The `NFTokenMint` transaction creates a non-fungible token and adds it to the relevant [NFTokenPage object][] of the `NFTokenMinter` as an [NFToken][] object. A required parameter to this transaction is the `Token` field specifying the actual token. This transaction is the only opportunity the `NFTokenMinter` has to specify any token fields that are defined as immutable (for example, the `TokenFlags`).
|
||||
|
||||
If the transaction is successful, the newly minted token is owned by the account (the `minter` account) that executed the transaction. If needed, the server creates a new `NFTokenPage` for the account and applies a reserve charge.
|
||||
|
||||
|
||||
## Example {{currentpage.name}} JSON
|
||||
|
||||
@@ -22,7 +20,6 @@ If the transaction is successful, the newly minted token is owned by the account
|
||||
{
|
||||
"TransactionType": "NFTokenMint",
|
||||
"Account": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"Issuer": "rNCFjv8Ek5oDrNiMJ3pw6eLLFtMjZLJnf2",
|
||||
"TransferFee": 314,
|
||||
"NFTokenTaxon": 0,
|
||||
"Flags": 8,
|
||||
@@ -41,9 +38,6 @@ If the transaction is successful, the newly minted token is owned by the account
|
||||
```
|
||||
|
||||
|
||||
This transaction assumes that the issuer, `rNCFjv8Ek5oDrNiMJ3pw6eLLFtMjZLJnf2`, has set the `NFTokenMinter` field in its `AccountRoot` to `rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B`, thereby authorizing that account to mint tokens on its behalf.
|
||||
|
||||
|
||||
{% include '_snippets/tx-fields-intro.md' %}
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
@@ -86,7 +80,7 @@ If you want to issue an NFT for another account there are two things you must do
|
||||
"TransactionType": "NFTokenMint",
|
||||
"Account": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
|
||||
"Issuer": "rNCFjv8Ek5oDrNiMJ3pw6eLLFtMjZLJnf2",
|
||||
"TransferFee": 314,
|
||||
"TransferFee": 25000,
|
||||
"NFTokenTaxon": 0,
|
||||
"Flags": 8,
|
||||
"Fee": "10",
|
||||
|
||||
Reference in New Issue
Block a user