Skip to content

Commit a4ab945

Browse files
committed
[JA] Add Dynamic NFTs concept and reference
1 parent e2887a8 commit a4ab945

File tree

5 files changed

+88
-7
lines changed

5 files changed

+88
-7
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
seo:
3+
description: ダイナミックNFTを作成し、URIを変更して参照されるデータオブジェクトを更新するオプションを提供します。
4+
labels:
5+
- 非代替性トークン, NFT
6+
---
7+
8+
# ダイナミックNFT (dNFT)
9+
10+
標準的なNFTは変更不可能です。一部のユースケースでは、NFTの初回Mint後に参照されるデータオブジェクトを更新する機能が便利です。例えば、延期されたイベントのコンサートチケットを代替日に更新したり、スポーツ選手のバーチャルトレーディングカードを定期的に現在の統計情報に更新したりすることができます。ダイナミックNFT(dNFT)は、このようなユースケースに柔軟性を提供します。
11+
12+
## dNFTの作成
13+
14+
新しいNFTをミントする際に、`tfMutable`フラグ(`0x00000010`)を設定して、NFTの`URI`フィールドを更新する機能を有効にします。
15+
16+
## dNFTの変更
17+
18+
`NFTokenModify`トランザクションを使用して、dNFTの`URI`フィールドを更新します。発行者または許可された発行者の`Account`、dNFTの`Owner`(`Account`アドレスと異なる場合)、dNFTの`NFTokenID`、および新しいオブジェクトデータの`URI`を指定します。
19+
20+
### NFTokenModifyトランザクションの例
21+
22+
```json
23+
{
24+
"TransactionType": "NFTokenModify",
25+
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
26+
"Owner": "rogue5HnPRSszD9CWGSUz8UGHMVwSSKF6",
27+
"Fee": "10",
28+
"Sequence": 33,
29+
"NFTokenID": "0008C350C182B4F213B82CCFA4C6F59AD76F0AFCFBDF04D5A048C0A300000007",
30+
"URI": "697066733A2F2F62616679626569636D6E73347A736F6C686C6976346C746D6E356B697062776373637134616C70736D6C6179696970666B73746B736D3472746B652F5665742E706E67",
31+
}
32+
```

@l10n/ja/docs/references/protocol/transactions/types/nftokenmint.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
---
2-
html: nftokenmint.html
3-
parent: transaction-types.html
42
seo:
53
description: NFTokenMintを使用して新規NFTを発行する。
64
labels:
@@ -62,6 +60,7 @@ NFTokenMint型のトランザクションでは、以下のように[`Flags`フ
6260
| `tfOnlyXRP` | `0x00000002` | 2 | 発行された`NFToken`はXRPでのみ売買が可能です。これは、トークンに送金手数料がかかり、発行者がXRP以外のトークンで手数料を受け取りたくない場合に望ましいでしょう。 |
6361
| `tfTrustLine` | `0x00000004` | 4 | **非推奨** 発行者が、発行した`NFToken`を転送する際に受け取る手数料を保有するために、自動的に[トラストライン](../../../../concepts/tokens/fungible-tokens/index.md) を作成します。[fixRemoveNFTokenAutoTrustLine Amendment][]により、このフラグの設定は無効となります。 |
6462
| `tfTransferable` | `0x00000008` | 8 | 発行された`NFToken`は他の人に譲渡することができます。このフラグが _有効でない_ 場合、トークンは _発行者から_ 、または _発行者へ_ のみ転送することができます。 |
63+
| `tfMutable` | `0x00000010` | 16 | 発行された`NFToken``URI`フィールドは、`NFTokenModify`トランザクションを使用して更新することができます。 |
6564

6665

6766
## 追加情報の埋め込み
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
seo:
3+
description: ダイナミックNFTを変更します。
4+
labels:
5+
- 非代替性トークン, トークン, NFT
6+
title:
7+
- NFTokenModify
8+
---
9+
# NFTokenModify
10+
[[ソース]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/app/tx/detail/NFTokenMint.cpp "ソース")
11+
12+
`NFTokenModify`は、NFTの`URI`フィールドを別のURIに変更し、NFTのサポートデータを更新するために使用されます。NFTは、`tfMutable`フラグが設定された状態でミントされている必要があります。[ダイナミックNFT](../../../../concepts/tokens/nfts/dynamic-nfts.md)をご覧ください。
13+
14+
## {% $frontmatter.seo.title %} JSONの例
15+
16+
17+
```json
18+
{
19+
"TransactionType": "NFTokenModify",
20+
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh",
21+
"Owner": "rogue5HnPRSszD9CWGSUz8UGHMVwSSKF6",
22+
"Fee": "10",
23+
"Sequence": 33,
24+
"NFTokenID": "0008C350C182B4F213B82CCFA4C6F59AD76F0AFCFBDF04D5A048C0A300000007",
25+
"URI": "697066733A2F2F62616679626569636D6E73347A736F6C686C6976346C746D6E356B697062776373637134616C70736D6C6179696970666B73746B736D3472746B652F5665742E706E67"
26+
}
27+
```
28+
29+
{% raw-partial file="/@l10n/ja/docs/_snippets/tx-fields-intro.md" /%}
30+
31+
| フィールド | JSONの型 | [内部の型][] | 説明 |
32+
|:------------------|:---------|:-------------|:-------------------|
33+
| `TransactionType` | 文字列 | UINT16 | `NFTokenModify` |
34+
| `Account` | 文字列 | AccountID | NFTの発行者または許可されたアカウントの一意のアドレス。 |
35+
| `Owner` | 文字列 | AccountID | _(任意)_ NFTの所有者のアドレス。`Account``Owner`が同じアドレスの場合、このフィールドは省略します。 |
36+
| `NFTokenID` | 文字列 | Hash256 | NFTを識別する一意のID。 |
37+
| `URI` | 文字列 | Blob | _(任意)_ 最大256バイトの任意のデータ。JSONでは、16進数の文字列としてエンコードされます。[`xrpl.convertStringToHex`](https://js.xrpl.org/modules.html#convertStringToHex)ユーティリティメソッドを使用してURIを16進数に変換できます。これは、NFTに関連するデータまたはメタデータを指すURIです。URIはHTTPまたはHTTPS URL、IPFS URI、マグネットリンク、[RFC 2379 "data" URL](https://datatracker.ietf.org/doc/html/rfc2397)としてエンコードされた即値データ、または発行者固有のエンコードをデコードできます。URIは検証されません。URIを指定しない場合、既存のURIは削除されます。 |
38+
39+
## エラーケース
40+
41+
すべてのトランザクションで発生する可能性のあるエラーに加えて、{% $frontmatter.seo.title %}トランザクションでは、次の[トランザクション結果コード](../transaction-results/index.md)が発生する可能性があります。
42+
43+
| エラーコード | 説明 |
44+
|:-------------------|:-----------|
45+
| `tecNO_PERMISSION` | `tfMutable`フラグが有効になっていないため、`URI`フィールドを更新できません。また、`Account`フィールドがNFTの発行者または許可された発行者でない場合、このエラーを受け取ることがあります。 |
46+
47+
{% raw-partial file="/docs/_snippets/common-links.md" /%}

docs/concepts/tokens/nfts/dynamic-nfts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Use the `NFTokenModify` transaction to update the URI field of a dNFT. Provide t
2626
"Owner": "rogue5HnPRSszD9CWGSUz8UGHMVwSSKF6",
2727
"Fee": "10",
2828
"Sequence": 33,
29-
"NFTokenID": 0008C350C182B4F213B82CCFA4C6F59AD76F0AFCFBDF04D5A048C0A300000007",
29+
"NFTokenID": "0008C350C182B4F213B82CCFA4C6F59AD76F0AFCFBDF04D5A048C0A300000007",
3030
"URI": "697066733A2F2F62616679626569636D6E73347A736F6C686C6976346C746D6E356B697062776373637134616C70736D6C6179696970666B73746B736D3472746B652F5665742E706E67",
3131
}
3232
```

docs/references/protocol/transactions/types/nftokenmodify.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,17 @@ title:
3131
| Field | JSON Type | [Internal Type][] | Description |
3232
|:------------------|:--------------------|:------------------|:-------------------|
3333
| `TransactionType` | String | UINT16 | Type is `NFTokenModify`. |
34-
| `Account` | String | AccountID | The unique address of either the issuer or an authorized minter of the NFT. |
35-
| `Owner` | String | AccountID | _(Optional)_ Address of the owner of the NFT. If the `Account` and `Owner` are the same address, omit this field. |
36-
| `NFTokenID` | String | Hash 256 | Composite field that uniquely identifies the token. |
37-
| `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 [RFC 2379 "data" URL](https://datatracker.ietf.org/doc/html/rfc2397), or even an issuer-specific encoding. The URI is not checked for validity. If you do not specify a URI, the existing URI is deleted. |
34+
| `Account` | String | AccountID | The unique address of either the issuer or an authorized minter of the NFT. |
35+
| `Owner` | String | AccountID | _(Optional)_ Address of the owner of the NFT. If the `Account` and `Owner` are the same address, omit this field. |
36+
| `NFTokenID` | String | Hash256 | Composite field that uniquely identifies the token. |
37+
| `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 [RFC 2379 "data" URL](https://datatracker.ietf.org/doc/html/rfc2397), or even an issuer-specific encoding. The URI is not checked for validity. If you do not specify a URI, the existing URI is deleted. |
38+
3839
## Error Cases
40+
3941
Besides errors that can occur for all transactions, {% $frontmatter.seo.title %} transactions can result in the following [transaction result codes](../transaction-results/index.md):
4042

4143
| Error Code | Description |
4244
|:-------------------|:------------|
4345
| `tecNO_PERMISSION` | The `tfMutable` flag wasn't enabled, so you can't update the `URI` field. You can also receive this error if the `Account` field isn't an issuer or authorized minter of the NFT. |
46+
4447
{% raw-partial file="/docs/_snippets/common-links.md" /%}

0 commit comments

Comments
 (0)