diff --git a/content/references/http-websocket-apis/public-api-methods/account-methods/account_nfts.ja.md b/content/references/http-websocket-apis/public-api-methods/account-methods/account_nfts.ja.md new file mode 100644 index 0000000000..8d87486744 --- /dev/null +++ b/content/references/http-websocket-apis/public-api-methods/account-methods/account_nfts.ja.md @@ -0,0 +1,164 @@ +--- +html: account_nfts.html +parent: account-methods.html +blurb: アカウントのすべてのNFTのリストを取得します。 +labels: + - 非代替性トークン, NFT +--- +# account_nfts +[[ソース]](https://github.com/xrplf/rippled/blob/master/src/ripple/rpc/handlers/AccountObjects.cpp "ソース") + +`account_nfts`メソッドは、指定したアカウントの`NFToken`オブジェクトの一覧を返します。 + +_([NonFungibleTokensV1_1 amendment][]により追加されました。)_ + +## 要求フォーマット +要求フォーマットの例 + +{% include '_snippets/no-cli-syntax.ja.md' %} + + + +*WebSocket* + +```json +{ + "command": "account_nfts", + "account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx", + "ledger_index": "validated" +} +``` + +*JSON-RPC* + +```json +{ + "method": "account_nfts", + "params": [{ + "account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx", + "ledger_index": "validated" + }] +} +``` + + + +[試してみる >](websocket-api-tool.html#account_nfts) + +要求には以下のパラメーターが含まれます。 + +| フィールド | 型 | 説明 | +|:---------------|:-----------------|:-----------------------------------------| +| `account` | 文字列 | アカウントの一意の識別子で、通常はアカウントの[アドレス][]です。このリクエストは、このアカウントが所有するNFTのリストを返します。 | +| `ledger_hash` | 文字列 | _(省略可)_ 使用するレジャーのバージョンを示す20バイトの16進数の文字列。([レジャーの指定][]を参照)。 | +| `ledger_index` | 文字列 または 数値 | _(省略可)_ 使用するレジャーの[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]を参照)。 | +| `limit` | 整数 | _(省略可)_ 取得する[トークンのページ][NFTokenPage オブジェクト]の数を制限します。各ページには最大32個のNFTを含めることができます。`limit`の値は20以上・400以下で指定します。この範囲外の正の値は、最も近い有効な値に置き換えられます。デフォルトは100です。 | +| `marker` | [マーカー][] | _(省略可)_ 以前のページ分割されたレスポンスの値。そのレスポンスが終了したところからデータの取得を再開します。 | + + +## 応答フォーマット +処理が成功した応答の例: + + + +*WebSocket* + +```json +{ + "result": { + "account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx", + "account_nfts": [ + { + "Flags": 1, + "Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm", + "NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004", + "NFTokenTaxon": 0, + "URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469", + "nft_serial": 4 + }, + { + "Flags": 1, + "Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm", + "NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE087727D1EA000000005", + "NFTokenTaxon": 0, + "URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469", + "nft_serial": 5 + } + ], + "ledger_hash": "7971093E67341E325251268A5B7CD665EF450B126F67DF8384D964DF834961E8", + "ledger_index": 2380540, + "validated": true + }, + "status": "success", + "type": "response" +} +``` + +*JSON-RPC* + +```json +{ + "result": { + "account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx", + "account_nfts": [ + { + "Flags": 1, + "Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm", + "NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004", + "NFTokenTaxon": 0, + "URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469", + "nft_serial": 4 + }, + { + "Flags": 1, + "Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm", + "NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE087727D1EA000000005", + "NFTokenTaxon": 0, + "URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469", + "nft_serial": 5 + } + ], + "ledger_hash": "46497E9FF17A993324F1A0A693DC068B467184023C7FD162812265EAAFEB97CB", + "ledger_index": 2380559, + "status": "success", + "validated": true + } +} +``` + + + +この応答は[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。 + +| `Field` | 型 | 説明 | +|:-----------------------|:----------------------------|:----------------------------------------| +| `account` | 文字列 | NFTの一覧を所有するアカウント | +| `account_nfts` | 配列 | アカウントが所有するNFTのリストで、**NFTオブジェクト**(下記参照)としてフォーマットされます。 | +| `ledger_hash` | 文字列 | _(省略可能)_ このレスポンスの生成に使用されたレジャーの識別ハッシュ。 | +| `ledger_index` | 数値 - [レジャーインデックス][] | _(省略可能)_ このレスポンスの生成に使用されたレジャーのインデックス。 | +| `ledger_current_index` | 数値 - [レジャーインデックス][] | _(省略可能)_ このレスポンスの生成に使用された、現在進行中のレジャーバージョンのレジャーインデックス。 | +| `validated` | ブール値 | このレスポンスに含まれ、`true`に設定されている場合、このレスポンスの情報は検証済みのレジャーバージョンから取得したものです。そうでない場合、情報は変更される可能性があります。 | + +### NFTオブジェクト + +`account_nfts`配列の各オブジェクトは1つの[NFToken][]を表し、以下のフィールドを保持しています + +| `Field` | 型 | 説明 | +|:---------------|:------------------- |:-------------------------------------| +| `Flags` | 数値 | このNFTokenで有効なブール値フラグのビットマップ。指定できる値については、[NFTokenフラグ](nftoken.html#nftoken-フラグ)を参照してください。 | +| `Issuer` | 文字列 - [アドレス][] | このNFTokenを発行したアカウント。 | +| `NFTokenID` | 文字列 | このNFTokenの一意の識別子(16進数)。 | +| `NFTokenTaxon` | 数値 | このトークンの[taxon](nftoken.html#nftokentaxon分類群)の非乱数化した値。同じtaxonを持つ複数のトークンは、一つの限定されたシリーズのインスタンスを表すかもしれません。 | +| `URI` | String | このNFTokenに関連付けられた16進数のURI データ。 | +| `nft_serial` | 文字列 | このNFTokenのトークンシーケンス番号。 | + +## 考えられるエラー + +* いずれかの[汎用エラータイプ][]。 +* `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。 +* `actNotFound` - 要求の`account`フィールドに指定されている[アドレス][]が、レジャーのアカウントに対応していません。 +* `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバーが保有していません。 + + +{% include '_snippets/rippled_versions.md' %} +{% include '_snippets/rippled-api-links.md' %} diff --git a/content/references/http-websocket-apis/public-api-methods/account-methods/account_nfts.md b/content/references/http-websocket-apis/public-api-methods/account-methods/account_nfts.md index f0589a379d..4ec611ec93 100644 --- a/content/references/http-websocket-apis/public-api-methods/account-methods/account_nfts.md +++ b/content/references/http-websocket-apis/public-api-methods/account-methods/account_nfts.md @@ -6,7 +6,7 @@ labels: - Non-fungible Tokens, NFTs --- # account_nfts -[[Source]](https://github.com/ripple/rippled/blob/master/src/ripple/rpc/handlers/AccountObjects.cpp "Source") +[[Source]](https://github.com/xrplf/rippled/blob/master/src/ripple/rpc/handlers/AccountObjects.cpp "Source") The `account_nfts` method returns a list of `NFToken` objects for the specified account. @@ -132,9 +132,9 @@ The response follows the [standard format][], with a successful result containin | `Field` | Type | Description | |:---------------|:-----------------|:-----------------------------------------| -| `account` | String | The account that owns the list of NFTs | +| `account` | String | The account that owns the list of NFTs. | | `account_nfts` | Array | A list of NFTs owned by the account, formatted as **NFT Objects** (see below). | -| `ledger_hash` | String | (May be omitted) The identifying hash of the ledger that was used to generate this response. | +| `ledger_hash` | String | _(May be omitted)_ The identifying hash of the ledger that was used to generate this response. | | `ledger_index` | Number - [Ledger Index][] | _(May be omitted)_ The ledger index of the ledger that was used to generate this response. | | `ledger_current_index` | Number - [Ledger Index][] | _(May be omitted)_ The ledger index of the current in-progress ledger version, which was used to generate this response. | | `validated` | Boolean | If included and set to `true`, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change. | diff --git a/dactyl-config.yml b/dactyl-config.yml index e3ca98f47a..3f7f65234b 100644 --- a/dactyl-config.yml +++ b/dactyl-config.yml @@ -185,8 +185,6 @@ targets: "subscribe.html#order-book-streams": "subscribe.html#オーダーブックストリーム" "transaction-basics.html#authorizing-transactions": "transaction-basics.html#トランザクションの識別" "ledger-header.html#close-flags": "ledger-header.html#closeフラグ" - # Fix link from untranslated account_nfts.html - "nftoken.html#nftokentaxon": "nftoken.html#nftokentaxon分類群" # Fix links from untranslated NFT API methods: "transaction-common-fields.html#flags-field": "transaction-common-fields.html#flagsフィールド" "nftoken.html#nftoken-flags": "nftoken.html#nftoken-フラグ" @@ -3274,10 +3272,12 @@ pages: targets: - ja - # TODO: translate - md: references/http-websocket-apis/public-api-methods/account-methods/account_nfts.md targets: - en + + - md: references/http-websocket-apis/public-api-methods/account-methods/account_nfts.ja.md + targets: - ja - md: references/http-websocket-apis/public-api-methods/account-methods/account_objects.md