mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-28 07:35:50 +00:00
Known Amendments & NFT fixes
- Add new amendments to the Known Amendments page.
(The URL for the 1.9.4 release notes is speculative; this release is
expected to happen "soon")
- Link the relevant API methods from the NFT concept page
- Rewrite some parts of the NFT concept page to be more concept-like and
less a list of reference details
- Update the status of the CryptoConditionsSuite amendment
This commit is contained in:
@@ -48,64 +48,20 @@ The 16-bit flags, transfer fee fields, the 32-bit `NFTokenTaxon`, and the sequen
|
||||
Flags are properties or other options associated with the `NFToken` object.
|
||||
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Flag Name</strong>
|
||||
</td>
|
||||
<td><strong>Flag Value</strong>
|
||||
</td>
|
||||
<td><strong>Description</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>lsfBurnable</code>
|
||||
</td>
|
||||
<td><code>0x0001</code>
|
||||
</td>
|
||||
<td>If set, indicates that the issuer (or an entity authorized by the issuer) can destroy the object. The object's owner can <em>always</em> do so.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>lsfOnlyXRP</code>
|
||||
</td>
|
||||
<td><code>0x0002</code>
|
||||
</td>
|
||||
<td>If set, indicates that the tokens can only be offered or sold for XRP.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>lsfTrustLine</code>
|
||||
</td>
|
||||
<td><code>0x0004</code>
|
||||
</td>
|
||||
<td>If set, indicates that the issuer wants a trustline to be automatically created. The <code>lsfTrustLine</code> field is useful when the token can be offered for sale for assets other than XRP and the issuer charges a <code>TransferFee</code>. If this flag is set, a trust line is automatically created as needed to allow the issuer to receive the appropriate transfer fee. If this flag is not set, an attempt to transfer the NFToken for an asset for which the issuer does not have a trustline fails.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>lsfTransferable</code>
|
||||
</td>
|
||||
<td><code>0x0008</code>
|
||||
</td>
|
||||
<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>
|
||||
<td><code>lsfReservedFlag</code>
|
||||
</td>
|
||||
<td><code>0x8000</code>
|
||||
</td>
|
||||
<td>This proposal reserves this flag for future use. Attempts to set this flag fail.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
| Flag Name | Flag Value | Description |
|
||||
|:----------------|:-----------|:----------------------------------------------|
|
||||
| `lsfBurnable` | `0x0001` | If set, indicates that the issuer (or an entity authorized by the issuer) can destroy the object. The object's owner can always do so. |
|
||||
| `lsfOnlyXRP` | `0x0002` | If set, indicates that the tokens can only be offered or sold for XRP. |
|
||||
| `lsfTrustLine` | `0x0004` | **DEPRECATED** If enabled, automatically create [trust lines](trust-lines-and-issuing.html) to hold transfer fees. Otherwise, buying or selling this `NFToken` for a fungible token amount fails if the issuer does not have a trust line for that token. The [fixRemoveNFTokenAutoTrustLine amendment][] makes it invalid to set this flag. |
|
||||
| `lsfTransferable` | `0x0008` | If set, indicates that this `NFToken` can be transferred. This flag has no effect if the token is being transferred from the issuer or to the issuer. |
|
||||
| `lsfReservedFlag` | `0x8000` | This proposal reserves this flag for future use. Attempts to set this flag fail. |
|
||||
|
||||
|
||||
`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
|
||||
|
||||
The example sets three flags: lsfBurnable (0x0001), lsfOnlyXRP (0x0002), lsfTransferable (0x0008). 1+2+8 = 11, or 0x000B in big endian format.
|
||||
The example sets three flags: `lsfBurnable` (`0x0001`), `lsfOnlyXRP` (`0x0002`), `lsfTransferable` (`0x0008`). 1+2+8 = 11, or 0x000B in big endian format.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -47,8 +47,6 @@ The `NFTokenMint` transaction creates a non-fungible token and adds it to the re
|
||||
| `TransferFee` | Number | UInt16 | _(Optional)_ The value specifies the fee charged by the issuer for secondary sales of the `NFToken`, if such sales are allowed. Valid values for this field are between 0 and 50000 inclusive, allowing transfer rates of between 0.00% and 50.00% in increments of 0.001. If this field is provided, the transaction MUST have the [`tfTransferable` flag](#nftokenmint-flags) enabled. |
|
||||
| `URI` | String | Blob | _(Optional)_ Up to 256 bytes of arbitrary data. In JSON, this should be encoded as a string of hexadecimal. You can use the [`xrpl.convertStringToHex`](https://js.xrpl.org/modules.html#convertStringToHex) utility to convert a URI to its hexadecimal equivalent. This is intended to be a URI that points to the data or metadata associated with the NFT. The contents could decode to an HTTP or HTTPS URL, an IPFS URI, a magnet link, immediate data encoded as an [RFC2379 "data" URL](https://datatracker.ietf.org/doc/html/rfc2397), or even an issuer-specific encoding. The URI is NOT checked for validity. |
|
||||
|
||||
**Note:** The xrpl.js client library throws an error if you try to sign a transaction with the `URI` field in lowercase hexadecimal. This is a [bug](https://github.com/XRPLF/xrpl.js/issues/2004).
|
||||
|
||||
|
||||
|
||||
## NFTokenMint Flags
|
||||
@@ -59,7 +57,7 @@ Transactions of the NFTokenMint type support additional values in the [`Flags` f
|
||||
|:--------------|:-------------|:--------------|:------------------------------|
|
||||
| `tfBurnable` | `0x00000001` | 1 | Allow the issuer (or an entity authorized by the issuer) to destroy the minted `NFToken`. (The `NFToken`'s owner can _always_ do so.) |
|
||||
| `tfOnlyXRP` | `0x00000002` | 2 | The minted `NFToken` can only be bought or sold for XRP. This can be desirable if the token has a transfer fee and the issuer does not want to receive fees in non-XRP currencies. |
|
||||
| `tfTrustLine` | `0x00000004` | 4 | Automatically create [trust lines](trust-lines-and-issuing.html) from the issuer to hold transfer fees received from transferring the minted `NFToken`. |
|
||||
| `tfTrustLine` | `0x00000004` | 4 | **DEPRECATED** Automatically create [trust lines](trust-lines-and-issuing.html) from the issuer to hold transfer fees received from transferring the minted `NFToken`. The [fixRemoveNFTokenAutoTrustLine amendment][] makes it invalid to set this flag. |
|
||||
| `tfTransferable` | `0x00000008` | 8 | The minted `NFToken` can be transferred to others. If this flag is _not_ enabled, the token can still be transferred _from_ or _to_ the issuer. |
|
||||
|
||||
|
||||
@@ -75,6 +73,7 @@ If you want to issue an NFT for another account there are two things you must do
|
||||
2. When you mint the NFToken, set the `Issuer` field to Account B.
|
||||
|
||||
### Example of NFTokenMint with an issuer
|
||||
|
||||
```json
|
||||
{
|
||||
"TransactionType": "NFTokenMint",
|
||||
@@ -108,6 +107,7 @@ In addition to errors that can occur for all transactions, {{currentpage.name}}
|
||||
|:------------------------------|:---------------------------------------------|
|
||||
| `temDISABLED` | The [NonFungibleTokensV1 amendment][] is not enabled. |
|
||||
| `temBAD_NFTOKEN_TRANSFER_FEE` | The `TransferFee` is not within the acceptable range. |
|
||||
| `temINVALID_FLAG` | The `Flags` value has bits enabled that are not allowed or valid flags. If the [fixRemoveNFTokenAutoTrustLine amendment][] is enabled, the `tfTrustLine` flag causes this error. |
|
||||
| `temMALFORMED` | The transaction was not validly specified. For example, the `URI` field is longer than 256 bytes. |
|
||||
| `tecNO_ISSUER` | The `Issuer` refers to an account that does not exist in the ledger. |
|
||||
| `tecNO_PERMISSION` | The account referenced by the `Issuer` field has not authorized this transaction's sender (using the `NFTokenMinter` setting) to mint on their behalf. |
|
||||
|
||||
Reference in New Issue
Block a user