From 52c3ac637c7deaad923d1f70b80044c7b9cf5b2a Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Wed, 11 Dec 2024 16:38:23 -0800 Subject: [PATCH 1/8] Migrate Credentials docs from opensource.ripple.com --- .../decentralized-storage/credentials.md | 47 ++++++ .../ledger-methods/ledger_entry.md | 139 ++++++++++++++---- .../deposit_authorized.md | 68 ++++++--- .../ledger-entry-types/credential.md | 65 ++++++++ .../ledger-entry-types/depositpreauth.md | 77 ++++++++-- .../transactions/types/accountdelete.md | 10 +- .../transactions/types/credentialaccept.md | 48 ++++++ .../transactions/types/credentialcreate.md | 51 +++++++ .../transactions/types/credentialdelete.md | 49 ++++++ .../transactions/types/depositpreauth.md | 70 +++++++-- .../transactions/types/escrowfinish.md | 24 +-- .../protocol/transactions/types/payment.md | 45 ++++-- .../transactions/types/paymentchannelclaim.md | 18 +-- sidebars.yaml | 5 + 14 files changed, 598 insertions(+), 118 deletions(-) create mode 100644 docs/concepts/decentralized-storage/credentials.md create mode 100644 docs/references/protocol/ledger-data/ledger-entry-types/credential.md create mode 100644 docs/references/protocol/transactions/types/credentialaccept.md create mode 100644 docs/references/protocol/transactions/types/credentialcreate.md create mode 100644 docs/references/protocol/transactions/types/credentialdelete.md diff --git a/docs/concepts/decentralized-storage/credentials.md b/docs/concepts/decentralized-storage/credentials.md new file mode 100644 index 0000000000..d6855afd5a --- /dev/null +++ b/docs/concepts/decentralized-storage/credentials.md @@ -0,0 +1,47 @@ +# Credentials + +The Credentials feature is a set of tools for managing authorization and compliance requirements using the XRP Ledger blockchain, while respecting privacy and decentralization. This feature extends and interconnects with other features of the XRP Ledger including [Deposit Authorization](https://xrpl.org/docs/concepts/accounts/depositauth). The goal of this feature is to streamline the process of compliance checks such as [KYC (Know Your Customer)](https://en.wikipedia.org/wiki/Know_your_customer) and to enable further trust-based applications within the XRP Ledger ecosystem. + +The design of the Credentials standard draws from the [W3C Verifiable Credentials standard](https://www.w3.org/TR/vc-data-model-2.0/). It is intended to be compatible to an extent that makes sense in the context of the XRP Ledger. There are some differences in data structures and formatting: for example, the subject of a credential is identified by an XRP Ledger address rather than a URL. + +## Overview + +_Credentials_ are signed statements that can be stored in the ledger and can attest to a user's identity, legal status, or other status. This feature includes issuance, storage, and verification of credentials directly on the XRP Ledger, while still supporting the privacy needs of users. + +This feature set is designed for an ecosystem of parties with the following roles: + +- _Authorizers_ who want to limit specific actions or interactions to users who possess the correct credentials. +- _Issuers_ who provide credentials to users who meet their criteria. +- _Users_ who obtain credentials from issuers and use those credentials to interact with authorizers. + +Each credential applies to a specific user's XRP Ledger account, and is attested by a specific credential issuer. The exact qualifications that a credential entails are open-ended, and defined by their issuers. They can range from trivial to serious, or broad to narrow. Some examples of things a credential could state: + +- That a user is not a subject of sanctions by a particular nation or set of nations. +- That a user has accredited investor status in the US. +- That a user has reached a specific level in a particular video game. + +### Uses + +Within the XRP Ledger, you can use Deposit Authorization to automatically allow senders with the correct set of credentials, instead of approving sending accounts individually. Future amendments could further extend credentials to gate access to other features such as holding tokens, participating in lending pools, or contributing to an AMM. + +Credentials stored in the XRP Ledger can also be used to authorize off-ledger activities, especially in association with a decentralized identifier. + +## Usage Flow + +A typical flow to use Credentials involves three parties with different roles, as described in the following example: + +* Verity is a regulated business that wants to interact only with properly KYC'd accounts, to ensure legal compliance. This makes Verity an _authorizer_ because they configure which accounts are allowed (authorized) to interact with them. +* Isabel is a credential issuer who vets accounts and issues credentials attesting that the accounts are who they say they are. +* Alice is a user who wants to interact with Verity. + +All three parties need XRP Ledger accounts. The flow works as follows: + +1. Verity sets up their account so that only authorized accounts can interact with them. Since they trust Isabel to properly vet accounts and issue relevant credentials, they configure their account to accept credentials issued by Isabel. +2. Alice submits whatever documents are necessary to Isabel privately, off-chain. +3. Isabel examines Alice's documents and creates a credential attesting to Alice's trustworthiness. +4. Alice accepts the credential, making it valid. +5. Alice can now interact with/send funds to Verity. + +Importantly, the documents that Alice sends to Isabel can include personally identifiable or private information that's needed to verify Alice's identity, but this information is never published or stored on the blockchain and Verity does not need to see it. Also, other businesses that trust Isabel can accept the same credentials so Alice does not need to repeatedly re-verify for every party she wants to interact with. + +To revoke a credential, Isabel can delete it from the ledger. Alice can also delete her own credentials. diff --git a/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md b/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md index acd60ac26b..c838003457 100644 --- a/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md +++ b/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md @@ -34,19 +34,20 @@ In addition to the general fields above, you must specify *exactly 1* of the fol - [ledger\_entry](#ledger_entry) - [Request Format](#request-format) - [General Fields](#general-fields) - - [Get Ledger Object by ID](#get-ledger-object-by-id) - - [Get AccountRoot Object](#get-accountroot-object) - - [Get AMM Object](#get-amm-object) - - [Get Bridge Object](#get-bridge-object) - - [Get DirectoryNode Object](#get-directorynode-object) - - [Get Offer Object](#get-offer-object) - - [Get Oracle Object](#get-oracle-object) - - [Get RippleState Object](#get-ripplestate-object) - - [Get Check Object](#get-check-object) - - [Get Escrow Object](#get-escrow-object) - - [Get PayChannel Object](#get-paychannel-object) - - [Get DepositPreauth Object](#get-depositpreauth-object) - - [Get Ticket Object](#get-ticket-object) + - [Get Ledger Entry by ID](#get-ledger-entry-by-id) + - [Get AccountRoot Entry](#get-accountroot-entry) + - [Get AMM Entry](#get-amm-entry) + - [Get Bridge Entry](#get-bridge-entry) + - [Get Credential Entry](#get-credential-object) + - [Get DirectoryNode Entry](#get-directorynode-object) + - [Get Offer Entry](#get-offer-object) + - [Get Oracle Entry](#get-oracle-object) + - [Get RippleState Entry](#get-ripplestate-object) + - [Get Check Entry](#get-check-object) + - [Get Escrow Entry](#get-escrow-object) + - [Get PayChannel Entry](#get-paychannel-object) + - [Get DepositPreauth Entry](#get-depositpreauth-object) + - [Get Ticket Entry](#get-ticket-object) - [Get NFT Page](#get-nft-page) - [Response Format](#response-format) - [Possible Errors](#possible-errors) @@ -54,9 +55,10 @@ In addition to the general fields above, you must specify *exactly 1* of the fol {% admonition type="warning" name="Caution" %}If you specify more than 1 of these type-specific fields in a request, the server retrieves results for only 1 of them. It is not defined which one the server chooses, so you should avoid doing this.{% /admonition %} -### Get Ledger Object by ID +### Get Ledger Entry by ID + -Retrieve any type of ledger object by its unique ID. +Retrieve any type of ledger entry by its unique ID. | Field | Type | Description | |:--------|:-------|:----------------------------------------------------------| @@ -109,7 +111,8 @@ You can use this type of request to get any singleton ledger entry, if it exists -### Get AccountRoot Object +### Get AccountRoot Entry + Retrieve an [AccountRoot entry](../../../protocol/ledger-data/ledger-entry-types/accountroot.md) by its address. This is roughly equivalent to the [account_info method][]. @@ -156,7 +159,8 @@ rippled json ledger_entry '{ "account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 -### Get AMM Object +### Get AMM Entry + _(Added by the [AMM amendment][])_ @@ -222,7 +226,8 @@ rippled json ledger_entry '{ "amm": { "asset": { "currency": "XRP" }, "asset2": [Try it! >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fs.devnet.rippletest.net%3A51233%2F#ledger_entry-amm) -### Get Bridge Object +### Get Bridge Entry + _(Requires the [XChainBridge amendment][] {% not-enabled /%})_ @@ -292,7 +297,61 @@ rippled json ledger_entry '{ "bridge_account": "rnQAXXWoFNN6PEqwqsdTngCtFPCrmfuq [Try it! >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fs.devnet.rippletest.net%3A51233%2F#ledger_entry-bridge) -### Get DirectoryNode Object +### Get Credential Entry + +Retrieve a [Credential entry][], which represents an attestation by one account about another account. + +| Field | Type | Required? | Description | +|:-----------------------------|:---------------------|:----------|-------------| +| `credential` | Object or String | Yes | Specify the Credential to retrieve. If a string, must be the [ledger entry ID][] of the entry, as hexadecimal. If an object, requires `subject`, `issuer`, and `credential_type` sub-fields. | +| `credential.subject` | String - [Address][] | Yes | The account that is the subject of the credential. | +| `credential.issuer` | String - [Address][] | Yes | The account that issued the credential. | +| `credential.credential_type` | String - Hexadecimal | Yes | The type of the credential, as issued. | + +WebSocket: + +```json +{ + "id": "example_get_credential", + "command": "ledger_entry", + "credential": { + "subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "credential_type": "6D795F63726564656E7469616C" + }, + "ledger_index": "validated" +} +``` + +JSON-RPC: + +```json +{ + "method": "ledger_entry", + "params": [{ + "credential": { + "subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "credential_type": "6D795F63726564656E7469616C" + }, + "ledger_index": "validated" + }] +} +``` + +Commandline: + +```bash +rippled json ledger_entry '{ "credential": {"subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", "issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX","credential_type": "6D795F63726564656E7469616C"}, "ledger_index": "validated" }' +``` + + + + +### Get DirectoryNode Entry + Retrieve a [DirectoryNode](../../../protocol/ledger-data/ledger-entry-types/directorynode.md), which contains a list of other ledger objects. Can be provided as string (object ID of the Directory) or as an object. @@ -348,7 +407,8 @@ rippled json ledger_entry '{ "directory": { "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwu -### Get Offer Object +### Get Offer Entry + Retrieve an [Offer entry](../../../protocol/ledger-data/ledger-entry-types/offer.md), which defines an offer to exchange currency. Can be provided as string (unique index of the Offer) or as an object. @@ -402,7 +462,8 @@ rippled json ledger_entry '{ "offer": { "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJY [Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-offer) -### Get Oracle Object +### Get Oracle Entry + _(Requires the [PriceOracle amendment][])_ @@ -458,7 +519,8 @@ rippled json ledger_entry '{ "oracle": { "account": "rNZ9m6AP9K7z3EVg6GhPMx36V4Q [Try it! >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fs.devnet.rippletest.net%3A51233%2F#ledger_entry-oracle) -### Get RippleState Object +### Get RippleState Entry + Retrieve a [RippleState entry][], which tracks a (non-XRP) currency balance between two accounts. @@ -517,7 +579,8 @@ rippled json ledger_entry '{ "ripple_state": { "accounts": ["rf1BiGeXwwQoi8Z2ueF -### Get Check Object +### Get Check Entry + Retrieve a [Check entry](../../../protocol/ledger-data/ledger-entry-types/check.md), which is a potential payment that can be cashed by its recipient. @@ -562,7 +625,8 @@ rippled json ledger_entry '{ "check": "C4A46CCD8F096E994C4B0DEAB6CE98E722FC17D79 -### Get Escrow Object +### Get Escrow Entry + Retrieve an [Escrow entry](../../../protocol/ledger-data/ledger-entry-types/escrow.md), which holds XRP until a specific time or condition is met. Can be provided as string (object ID of the Escrow) or as an object. @@ -615,7 +679,8 @@ rippled json ledger_entry '{ "escrow": { "owner": "rL4fPHi2FWGwRGRQSH7gBcxkuo2b9 -### Get PayChannel Object +### Get PayChannel Entry + Retrieve a [PayChannel entry](../../../protocol/ledger-data/ledger-entry-types/paychannel.md), which holds XRP for asynchronous payments. @@ -659,15 +724,24 @@ rippled json ledger_entry '{ "payment_channel": "C7F634794B79DB40E87179A9D1BF05D [Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-paychannel) -### Get DepositPreauth Object +### Get DepositPreauth Entry + Retrieve a [DepositPreauth entry](../../../protocol/ledger-data/ledger-entry-types/depositpreauth.md), which tracks preauthorization for payments to accounts requiring [Deposit Authorization](../../../../concepts/accounts/depositauth.md). -| Field | Type | Description | -|:-----------------------------|:---------------------|:-----------------------| -| `deposit_preauth` | Object or String | Specify the DepositPreauth to retrieve. If a string, must be the [ledger entry ID](../../../protocol/ledger-data/common-fields.md) of the DepositPreauth entry, as hexadecimal. If an object, requires `owner` and `authorized` sub-fields. | -| `deposit_preauth.owner` | String - [Address][] | _(Required if `deposit_preauth` is specified as an object)_ The account that provided the preauthorization. | -| `deposit_preauth.authorized` | String - [Address][] | _(Required if `deposit_preauth` is specified as an object)_ The account that received the preauthorization. | +| Field | Type | Required? | Description | +|:-----------------------------|:---------------------|:----------|-------------| +| `deposit_preauth` | Object or String | Yes | Specify the DepositPreauth to retrieve. If a string, must be the [ledger entry ID][] of the DepositPreauth entry, as hexadecimal. If an object, requires `owner` sub-field and either `authorized` or `authorize_credentials` sub-field. | +| `deposit_preauth.owner` | String - [Address][] | Yes | The account that provided the preauthorization. | +| `deposit_preauth.authorized` | String - [Address][] | No | The account that received the preauthorization. | +| `deposit_preauth.authorized_credentials` | Array | No | A set of credentials that received the preauthorization. | + +Each member of the `deposit_preauth.authorized_credentials` array, if provided, must include the following nested fields: + +| Field | Type | Required? | Description | +|:------------------|:---------------------|:----------|:------------| +| `issuer` | String - [Address][] | Yes | The address of the account that issued the credential. | +| `credential_type` | String - Hexadecimal | Yes | The type of the credential, as issued. | {% tabs %} @@ -711,7 +785,8 @@ rippled json ledger_entry '{ "deposit_preauth": { "owner": "rf1BiGeXwwQoi8Z2ueFY [Try it! >](/resources/dev-tools/websocket-api-tool#ledger_entry-depositpreauth) -### Get Ticket Object +### Get Ticket Entry + Retrieve a [Ticket entry](../../../protocol/ledger-data/ledger-entry-types/ticket.md), which represents a [sequence number][] set aside for future use. _(Added by the [TicketBatch amendment][])_ diff --git a/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/deposit_authorized.md b/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/deposit_authorized.md index e8949a617a..10b3cee95f 100644 --- a/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/deposit_authorized.md +++ b/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/deposit_authorized.md @@ -1,6 +1,4 @@ --- -html: deposit_authorized.html -parent: path-and-order-book-methods.html seo: description: Check whether an account is authorized to send money directly to another. labels: @@ -10,7 +8,7 @@ labels: # deposit_authorized [[Source]](https://github.com/XRPLF/rippled/blob/817d2339b8632cb2f97d3edd6f7af33aa7631744/src/ripple/rpc/handlers/DepositAuthorized.cpp "Source") -The `deposit_authorized` command indicates whether one account is authorized to send payments directly to another. See [Deposit Authorization](../../../../concepts/accounts/depositauth.md) for information on how to require authorization to deliver money to your account. +The `deposit_authorized` command indicates whether one account is authorized to send payments directly to another. See [Deposit Authorization](https://xrpl.org/docs/concepts/accounts/depositauth/) for information on how to require authorization to deliver money to your account. ## Request Format An example of the request format: @@ -24,6 +22,10 @@ An example of the request format: "command": "deposit_authorized", "source_account": "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de", "destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "credentials": [ + "A182EFBD154C9E80195082F86C1C8952FC0760A654B886F61BB0A59803B4387B", + "383D269D6C7417D0A8716B09F5DB329FB17B45A5EFDBAFB82FF04BC420DCF7D5" + ], "ledger_index": "validated" } ``` @@ -37,6 +39,10 @@ An example of the request format: { "source_account": "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de", "destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "credentials": [ + "A182EFBD154C9E80195082F86C1C8952FC0760A654B886F61BB0A59803B4387B", + "383D269D6C7417D0A8716B09F5DB329FB17B45A5EFDBAFB82FF04BC420DCF7D5" + ], "ledger_index": "validated" } ] @@ -45,23 +51,27 @@ An example of the request format: {% /tab %} {% tab label="Commandline" %} + ```bash #Syntax: deposit_authorized [] rippled deposit_authorized rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8 validated ``` {% /tab %} - {% /tabs %} The request includes the following parameters: -| `Field` | Type | Description | -|:----------------------|:---------------------------|:------------------------| -| `source_account` | String - [Address][] | The sender of a possible payment. | -| `destination_account` | String - [Address][] | The recipient of a possible payment. | -| `ledger_hash` | String | _(Optional)_ A 32-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) | -| `ledger_index` | String or Unsigned Integer | _(Optional)_ The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) | +| Field | Type | Required? | Description | +|:----------------------|:---------------------|:----------|-------------| +| `source_account` | String - [Address][] | Yes | The sender of a possible payment. | +| `destination_account` | String - [Address][] | Yes | The recipient of a possible payment. | +| `ledger_hash` | [Hash][] | No | A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) | +| `ledger_index` | [Ledger Index][] | No | The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) | +| `credentials` | Array | No | A set of credentials to take into account when checking if the sender can send funds to the destination. Each member of the array must be the unique ID of a [Credential entry][] in the ledger. Cannot be an empty array. | +{% admonition type="info" name="Note" %} +If you provide a set of credentials that does not exactly match a set of credentials preauthorized by the destination, the payment is not authorized, even if the destination has preauthorized a subset of those credentials. This matches the behavior of transaction processing. +{% /admonition %} ## Response Format @@ -74,6 +84,10 @@ An example of a successful response: { "id": 1, "result": { + "credentials": [ + "A182EFBD154C9E80195082F86C1C8952FC0760A654B886F61BB0A59803B4387B", + "383D269D6C7417D0A8716B09F5DB329FB17B45A5EFDBAFB82FF04BC420DCF7D5" + ], "deposit_authorized": true, "destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", "ledger_hash": "BD03A10653ED9D77DCA859B7A735BF0580088A8F287FA2C5403E0A19C58EF322", @@ -91,6 +105,10 @@ An example of a successful response: ```json { "result": { + "credentials": [ + "A182EFBD154C9E80195082F86C1C8952FC0760A654B886F61BB0A59803B4387B", + "383D269D6C7417D0A8716B09F5DB329FB17B45A5EFDBAFB82FF04BC420DCF7D5" + ], "deposit_authorized": true, "destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", "ledger_hash": "BD03A10653ED9D77DCA859B7A735BF0580088A8F287FA2C5403E0A19C58EF322", @@ -110,6 +128,10 @@ Loading: "/etc/rippled.cfg" { "result" : { + "credentials": [ + "A182EFBD154C9E80195082F86C1C8952FC0760A654B886F61BB0A59803B4387B", + "383D269D6C7417D0A8716B09F5DB329FB17B45A5EFDBAFB82FF04BC420DCF7D5" + ], "deposit_authorized" : true, "destination_account" : "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", "ledger_hash" : "BD03A10653ED9D77DCA859B7A735BF0580088A8F287FA2C5403E0A19C58EF322", @@ -121,30 +143,34 @@ Loading: "/etc/rippled.cfg" } ``` {% /tab %} - {% /tabs %} The response follows the [standard format][], with a successful result containing the following fields: -| `Field` | Type | Description | -|:-----------------------|:--------------------------|:------------------------| -| `deposit_authorized` | Boolean | Whether the specified source account is authorized to send payments directly to the destination account. If `true`, either the destination account does not require [Deposit Authorization](../../../../concepts/accounts/depositauth.md) or the source account is preauthorized. | -| `destination_account` | String - [Address][] | The destination account specified in the request. | -| `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 version 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. | -| `source_account` | String - [Address][] | The source account specified in the request. | -| `validated` | Boolean | _(May be omitted)_ If `true`, the information comes from a validated ledger version. | +| Field | Type | Required? | Description | +|:-----------------------|:--------------------------|:----------|:--------------| +| `credentials` | Array of [Hash][] | No | The credentials specified in the request, if any. | +| `deposit_authorized` | Boolean | Yes | Whether the specified source account is authorized to send payments directly to the destination account. If `true`, either the destination account does not require [deposit authorization](https://xrpl.org/docs/concepts/accounts/depositauth) or the source account is preauthorized. | +| `destination_account` | String - [Address][] | Yes | The destination account specified in the request. | +| `ledger_hash` | String | No | The identifying hash of the ledger that was used to generate this response. | +| `ledger_index` | Number - [Ledger Index][] | No | The ledger index of the ledger version that was used to generate this response. | +| `ledger_current_index` | Number - [Ledger Index][] | No | The ledger index of the current in-progress ledger version, which was used to generate this response. | +| `source_account` | String - [Address][] | Yes | The source account specified in the request. | +| `validated` | Boolean | No | If `true`, the information comes from a validated ledger version. | -{% admonition type="info" name="Note" %}A `deposit_authorized` status of `true` does not guarantee that a payment can be sent from the specified source to the specified destination. For example, the destination account may not have a [trust line](../../../../concepts/tokens/fungible-tokens/index.md) for the specified currency, or there may not be enough liquidity to deliver a payment.{% /admonition %} +{% admonition type="info" name="Note" %} +A `deposit_authorized` status of `true` does not guarantee that a payment can be sent from the specified source to the specified destination. For example, the destination account may not have a [trust line](https://xrpl.org/docs/concepts/tokens/fungible-tokens) for the specified currency, or there may not be enough liquidity to deliver a payment. +{% /admonition %} ## Possible Errors * Any of the [universal error types][]. * `invalidParams` - One or more fields are specified incorrectly, or one or more required fields are missing. * `actMalformed` - An [Address][] specified in the `source_account` or `destination_account` field of the request was not properly formatted. (It may contain a typo or be the wrong length, causing a failed checksum.) +* `badCredentials` - At least one of the supplied credentials does not exist, is expired, or has not been accepted. * `dstActNotFound` - The `destination_account` field of the request does not correspond to an account in the ledger. * `lgrNotFound` - The ledger specified by the `ledger_hash` or `ledger_index` does not exist, or it does exist but the server does not have it. * `srcActNotFound` - The `source_account` field of the request does not correspond to an account in the ledger. + {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/references/protocol/ledger-data/ledger-entry-types/credential.md b/docs/references/protocol/ledger-data/ledger-entry-types/credential.md new file mode 100644 index 0000000000..d400d7941d --- /dev/null +++ b/docs/references/protocol/ledger-data/ledger-entry-types/credential.md @@ -0,0 +1,65 @@ +--- +seo: + description: An attestation about a subject account from a credential issuer account, which can be used to preauthorize payments. +--- +# Credential + +A `Credential` entry represents a [credential](../index.md), which contains an attestation about a _subject_ account from a _credential issuer_ account. The meaning of the attestation is defined by the issuer. + +## Example Credential JSON + +```json +{ + "LedgerEntryType": "Credential", + "Flags": 65536, + "Subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "Issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "IssuerNode": "0000000000000000", + "CredentialType": "6D795F63726564656E7469616C", + "PreviousTxnID": "8089451B193AAD110ACED3D62BE79BB523658545E6EE8B7BB0BE573FED9BCBFB", + "PreviousTxnLgrSeq": 234644, + "SubjectNode": "0000000000000000", + "index": "A738A1E6E8505E1FC77BBB9FEF84FF9A9C609F2739E0F9573CDD6367100A0AA9" +} +``` + + + +## Credential Fields + +In addition to the [common fields](../common-fields.md), {% code-page-name /%} entries have the following fields: + +| Field | JSON Type | [Internal Type][] | Required? | Description | +|:--------------------|:---------------------|:------------------|:----------|:----------------| +| `CredentialType` | String - Hexadecimal | Blob | Yes | Arbitrary data defining the type of credential this entry represents. The minimum length is 1 byte and the maximum length is 64 bytes. | +| `Expiration` | Number | UInt32 | No | Time after which the credential is expired, in [seconds since the Ripple Epoch][]. +| `Issuer` | String - [Address][] | AccountID | Yes | The account that issued this credential. | +| `IssuerNode` | String | UInt64 | Yes | A hint indicating which page of the issuer's directory links to this entry, in case the directory consists of multiple pages. | +| `PreviousTxnID` | String - [Hash][] | Hash256 | Yes | The identifying hash of the transaction that most recently modified this entry. | +| `PreviousTxnLgrSeq` | Number | UInt32 | Yes | The [index of the ledger][Ledger Index] that contains the transaction that most recently modified this object. | +| `Subject` | String - [Address][] | AccountID | Yes | The account that this credential is for. | +| `SubjectNode` | String | UInt64 | Yes | A hint indicating which page of the subject's owner directory links to this entry, in case the directory consists of multiple pages. | +| `URI` | String - Hexadecimal | Blob | No | Arbitrary additional data about the credential, for example a URL where a W3C-formatted Verifiable Credential can be retrieved. | + +## Credential Flags + +Credential entries can have the following flags combined in the `Flags` field: + +| Flag Name | Hex Value | Decimal Value | Description | +|---------------|--------------|---------------|-------------| +| `lsfAccepted` | `0x00010000` | 65536 | If enabled, the subject of the credential has accepted the credential. Otherwise, the issuer created the credential but the subject has not yet accepted it, meaning it is not yet valid. | + +## Credential Reserve + +A credential entry counts as one item towards the owner reserve of the subject account, if the subject has accepted the credential. Otherwise, a credential entry counts as one item toward the reserve of the issuer account. + +## Credential ID Format + +The unique ID of a Credential entry is the SHA-512Half hash of the following values concatenated in order: + +* The `Credential` space key (`0x0044`); +* The `Subject` field's value; +* The `Issuer` field's value; and +* The `CredentialType` field's value. + +{% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth.md b/docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth.md index 64377cc73c..0f6a98191f 100644 --- a/docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth.md +++ b/docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth.md @@ -9,12 +9,17 @@ labels: # DepositPreauth [[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/protocol/impl/LedgerFormats.cpp#L172-L178 "Source") -A `DepositPreauth` entry tracks a preauthorization from one account to another. [DepositPreauth transactions][] create these entries. +A `DepositPreauth` entry tracks a preauthorization from one account. You can always create a preauthorization by sending a [DepositPreauth transaction][], but it has no effect unless you are using [Deposit Authorization](https://xrpl.org/docs/concepts/accounts/depositauth). -This has no effect on processing of transactions unless the account that provided the preauthorization requires [Deposit Authorization](../../../../concepts/accounts/depositauth.md). In that case, the account that was preauthorized can send payments and other transactions directly to the account that provided the preauthorization. Preauthorizations are one-directional, and have no effect on payments going the opposite direction. +A preauthorization allows specific others to send money directly to you even if you have Deposit Authorization enabled. Preauthorizations are one-directional, and have no effect on payments going the opposite direction. + +You can preauthorize a specific _account_ or a _set of credentials_. In the case of a set of credentials, any account that has a matching set of credentials on-ledger can send you money. _(Credential preauthorization requires the [Credentials amendment][]. {% not-enabled /%})_ ## Example {% $frontmatter.seo.title %} JSON +{% tabs %} + +{% tab label="Single account preauthorization" %} ```json { "LedgerEntryType": "DepositPreauth", @@ -27,20 +32,55 @@ This has no effect on processing of transactions unless the account that provide "index": "4A255038CC3ADCC1A9C91509279B59908251728D0DAADB248FFE297D0F7E068C" } ``` +{% /tab %} + +{% tab label="Credential preauthorization" %} +```json +{ + "LedgerEntryType": "DepositPreauth", + "Account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "AuthorizeCredentials": [{ + "Credential": { + "Issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "CredentialType": "6D795F63726564656E7469616C" + } + }], + "Flags": 0, + "OwnerNode": "0000000000000000", + "PreviousTxnID": "FD2A4E9E317C7FEF112D22ADEB9E2C6DC3C2AB6E2AD96A50B76EBB9DEB39EA77", + "PreviousTxnLgrSeq": 7, + "index": "F2B8550ADF60FD268157262C1C54E1D1014BDEA361CE848B6F48556348327E5F" +} +``` +{% /tab %} +{% /tabs %} ## {% $frontmatter.seo.title %} Fields In addition to the [common fields](../common-fields.md), {% code-page-name /%} entries have the following fields: -| Field | JSON Type | [Internal Type][] | Required? | Description | -|:--------------------|:-----------------|:------------------|:----------|:----------------| -| `Account` | String | Account | Yes | The account that granted the preauthorization. (The destination of the preauthorized payments.) | -| `Authorize` | String | Account | Yes | The account that received the preauthorization. (The sender of the preauthorized payments.) | -| `LedgerEntryType` | String | UInt16 | Yes | The value `0x0070`, mapped to the string `DepositPreauth`, indicates that this is a DepositPreauth object. | -| `OwnerNode` | String | UInt64 | Yes | A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages. **Note:** The object does not contain a direct link to the owner directory containing it, since that value can be derived from the `Account`. | -| `PreviousTxnID` | String | Hash256 | Yes | The identifying hash of the transaction that most recently modified this object. | -| `PreviousTxnLgrSeq` | Number | UInt32 | Yes | The [index of the ledger][Ledger Index] that contains the transaction that most recently modified this object. | +| Field | JSON Type | [Internal Type][] | Required? | Description | +|:--------------------|:------------------|:------------------|:----------|:------------| +| `Account` | String | Account | Yes | The account that granted the preauthorization. (The destination of the preauthorized payments.) | +| `Authorize` | String | Account | No | The account that received the preauthorization. (The sender of the preauthorized payments.) | +| `AuthorizeCredentials` | Array | Array | No | The set of credentials that received preauthorization. (Any account with these credentials is preauthorized.) This array has a minimum length of 1 and a maximum length of 8 credentials. | +| `LedgerEntryType` | String | UInt16 | Yes | The value `0x0070`, mapped to the string `DepositPreauth`, indicates that this is a DepositPreauth object. | +| `OwnerNode` | String | UInt64 | Yes | A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages. **Note:** The object does not contain a direct link to the owner directory containing it, since that value can be derived from the `Account`. | +| `PreviousTxnID` | String - [Hash][] | Hash256 | Yes | The identifying hash of the transaction that most recently modified this object. | +| `PreviousTxnLgrSeq` | Number | UInt32 | Yes | The [index of the ledger][Ledger Index] that contains the transaction that most recently modified this object. | +Each entry must have _either_ the `Authorize` field or the `AuthorizeCredentials` field, but not both. + +### Authorized Credential Objects + +If the entry has an `AuthorizeCredentials` field, each member of that array is an inner object, identifying one credential to require, with the following format: + +| Field | JSON Type | [Internal Type][] | Required? | Description | +|:-----------------|:---------------------|:------------------|:----------|:----------------| +| `Issuer` | String - [Address][] | AccountID | Yes | The issuer of the credential. | +| `CredentialType` | String - Hexadecimal | Blob | Yes | The credential type of the credential. | + +To be preauthorized, an account must hold all the specified credentials. ## {% $frontmatter.seo.title %} Flags @@ -52,10 +92,23 @@ There are no flags defined for {% code-page-name /%} entries. ## DepositPreauth ID Format -The ID of a `DepositPreauth` object is the [SHA-512Half][] of the following values, concatenated in order: +There are two formats for the ID of a `DepositPreauth` entry, depending on whether it authorizes an individual account or a set of credentials. + +### Individual Account Preauthorization + +In this case, the ID is the [SHA-512Half][] of the following values, concatenated in order: * The DepositPreauth space key (`0x0070`) * The AccountID of the owner of this object (the sender of the [DepositPreauth transaction][] that created this object; in other words, the one that granted the preauthorization) -* The AccountID of the preauthorized account (the `Authorized` field of the [DepositPreauth transaction][] that created this object; in other words, the one that received the preauthorization) +* The AccountID in the `Authorize` field + +### Credential Preauthorization +_(Requires the [Credentials amendment][]. {% not-enabled /%})_ + +In this case, the ID is the [SHA-512Half][] of the following values, concatenated in order: + +* The Credential Preauth space key (`0x0050`) +* The AccountID of the owner of this object (the sender of the [DepositPreauth transaction][] that created this object; in other words, the one that granted the preauthorization) +* The contents of the `AuthorizeCredentials` field. {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/references/protocol/transactions/types/accountdelete.md b/docs/references/protocol/transactions/types/accountdelete.md index d5d16f4c50..792a88adff 100644 --- a/docs/references/protocol/transactions/types/accountdelete.md +++ b/docs/references/protocol/transactions/types/accountdelete.md @@ -31,12 +31,12 @@ An AccountDelete transaction deletes an [account](../../ledger-data/ledger-entry [Query example transaction. >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fxrplcluster.com%2F&req=%7B%22id%22%3A%22example_AccountDelete%22%2C%22command%22%3A%22tx%22%2C%22transaction%22%3A%221AF19BF9717DA0B05A3BFC5007873E7743BA54C0311CCCCC60776AAEAC5C4635%22%2C%22binary%22%3Afalse%7D) {% raw-partial file="/docs/_snippets/tx-fields-intro.md" /%} - -| Field | JSON Type | [Internal Type][] | Description | -|:-----------------|:-----------------|:------------------|:-------------------| -| `Destination` | String - [Address][] | AccountID | The address of an account to receive any leftover XRP after deleting the sending account. Must be a funded account in the ledger, and must not be the sending account. | -| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary [destination tag](../../../../concepts/transactions/source-and-destination-tags.md) that identifies a hosted recipient or other information for the recipient of the deleted account's leftover XRP. | +| Field | JSON Type | [Internal Type][] | Required? | Description | +|:-----------------|:-----------------|:------------------|:----------|:------------| +| `CredentialIDs` | Array of Strings | Vector256 | No | Set of Credentials to authorize a deposit made by this transaction. Each member of the array must be the ledger entry ID of a Credential entry in the ledger. For details, see [Credential IDs](./payment.md#credential-ids). | +| `Destination` | String - [Address][] | AccountID | Yes | The address of an account to receive any leftover XRP after deleting the sending account. Must be a funded account in the ledger, and must not be the sending account. | +| `DestinationTag` | Number | UInt32 | No | Arbitrary [destination tag](../../../../concepts/transactions/source-and-destination-tags.md) that identifies a hosted recipient or other information for the recipient of the deleted account's leftover XRP. | ## Special Transaction Cost diff --git a/docs/references/protocol/transactions/types/credentialaccept.md b/docs/references/protocol/transactions/types/credentialaccept.md new file mode 100644 index 0000000000..7ca9435cdb --- /dev/null +++ b/docs/references/protocol/transactions/types/credentialaccept.md @@ -0,0 +1,48 @@ +--- +seo: + description: Accept a credential provisionally issued to your account. +--- +# CredentialAccept Transaction + +A CredentialAccept transaction accepts a credential, which makes the credential valid. Only the subject of the credential can do this. + +## Example CredentialAccept JSON + +```json +{ + "TransactionType" : "CredentialAccept", + "Account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "Issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "CredentialType": "6D795F63726564656E7469616C", + "Fee": "10", + "Flags": 0, + "Sequence": 234203 +} +``` + + +## CredentialAccept Fields + +In addition to the [common fields][], CredentialAccept transactions use the following fields: + +| Field | JSON Type | [Internal Type][] | Required? | Description | +|:-----------------|:-----------------|:------------------|:----------|:------------| +| `Issuer` | String - [Address][] | AccountID | Yes | The address of the issuer that created the credential. | +| `CredentialType` | String | Blob | Yes | Arbitrary data defining the type of credential. The minimum size is 1 byte and the maximum is 64 bytes. | + +The `Account` field (the sender of this transaction) must be the subject of the credential. + +The combination of `Account`, `Issuer`, and `CredentialType` must match a `Credential` ledger entry that exists in the ledger and has not already been accepted; otherwise, the transaction fails. + +## Error Cases + +| Error Code | Description | +|:-----------|:------------| +| `tecDUPLICATE` | The specified credential has already been accepted. | +| `tecEXPIRED` | The specified credential has an expiration time in the past. (In this case, the transaction also deletes the expired credentials from the ledger.) | +| `tecNO_ENTRY` | The credential uniquely identified by the `Account`, `Issuer`, and `CredentialType` fields of the transaction does not exist in the ledger. | +| `temDISABLED` | The related amendment is not enabled. | +| `temINVALID_ACCOUNT_ID` | The provided `Issuer` field is invalid. For example, it contains [ACCOUNT_ZERO][]. | + + +{% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/references/protocol/transactions/types/credentialcreate.md b/docs/references/protocol/transactions/types/credentialcreate.md new file mode 100644 index 0000000000..90f5b6216b --- /dev/null +++ b/docs/references/protocol/transactions/types/credentialcreate.md @@ -0,0 +1,51 @@ +--- +seo: + description: Provisionally issue a credential to a subject account. +--- + +# CredentialCreate Transaction + +A CredentialCreate transaction creates a credential in the ledger. The issuer of the credential uses this transaction to provisionally issue a credential. The credential is not valid until the subject of the credential accepts it with a [CredentialAccept transaction][]. + +## Example CredentialCreate JSON + +```json +{ + "TransactionType" : "CredentialCreate", + "Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "Subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "CredentialType": "6D795F63726564656E7469616C", + "Fee": "10", + "Flags": 0, + "Sequence": 234200 +} +``` + + +## CredentialCreate Fields + +In addition to the [common fields][], CredentialCreate transactions use the following fields: + +| Field | JSON Type | [Internal Type][] | Required? | Description | +|:-----------------|:-----------------|:------------------|:----------|:------------| +| `Subject` | String - [Address][] | AccountID | Yes | The subject of the credential. | +| `CredentialType` | String - Hexadecimal | Blob | Yes | Arbitrary data defining the type of credential this entry represents. The minimum length is 1 byte and the maximum length is 64 bytes. | +| `Expiration` | Number | UInt32 | No | Time after which this credential should be considered expired, in [seconds since the Ripple Epoch][]. | +| `URI` | String | Blob | No | Arbitrary additional data about the credential, such as the URL where users can look up an associated Verifiable Credential document. If present, the minimum length is 1 byte and the maximum is 256 bytes. | + +The `Account` field (the sender) of the transaction is the issuer of the credential. It is possible for the issuer and the subject to be the same account. + +## Error Cases + +Besides errors that can occur for all transactions, CredentialCreate transactions can result in the following [transaction result codes][]: + +| Error Code | Description | +|:-----------|:------------| +| `tecDUPLICATE` | A credential with the same subject, issuer, and credential type already exists in the ledger. | +| `tecEXPIRED` | The credential's expiration time is in the past. | +| `tecNO_TARGET` | The account specified in the `Subject` field is not a funded account in the ledger. | +| `temDISABLED` | The related amendment is not enabled. | +| `temINVALID_ACCOUNT_ID` | The provided `Subject` field is invalid. For example, it contains [ACCOUNT_ZERO][]. | + + +{% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/references/protocol/transactions/types/credentialdelete.md b/docs/references/protocol/transactions/types/credentialdelete.md new file mode 100644 index 0000000000..923516bd60 --- /dev/null +++ b/docs/references/protocol/transactions/types/credentialdelete.md @@ -0,0 +1,49 @@ +--- +seo: + description: Remove a credential from the ledger, effectively revoking it. +--- +# CredentialDelete Transaction + +A CredentialDelete transaction removes a credential from the ledger, effectively revoking it. Users may also want to delete an unwanted credential to reduce their [reserve requirement][]. + +## Example CredentialDelete JSON + +```json +{ + "TransactionType" : "CredentialDelete", + "Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "Subject": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", + "CredentialType": "6D795F63726564656E7469616C", + "Fee": "10", + "Flags": 0, + "Sequence": 234203 +} +``` + + +## CredentialDelete Fields + +In addition to the [common fields][], CredentialDelete transactions use the following fields: + +| Field | JSON Type | [Internal Type][] | Required? | Description | +|:-----------------|:-----------------|:------------------|:----------|:------------| +| `CredentialType` | String - Hexadecimal | Blob | Yes | Arbitrary data defining the type of credential to delete. The minimum length is 1 byte and the maximum length is 256 bytes. | +| `Subject` | String - [Address][] | AccountID | No | The subject of the credential to delete. If omitted, use the `Account` (sender of the transaction) as the subject of the credential. | +| `Issuer` | String - [Address][] | AccountID | No | The issuer of the credential to delete. If omitted, use the `Account` (sender of the transaction) as the issuer of the credential. | + +You must provide the `Subject` field, `Issuer` field, or both. + +This transaction looks for a [Credential ledger entry](../../ledger-data/ledger-entry-types/credential.md) with the specified subject, issuer, and credential type, and deletes that entry if the sender of the transaction has permission to. The holder or issuer of a credential can delete it at any time. If the credential is expired, anyone can delete it. + + +## Error Cases + +| Error Code | Description | +|:-----------|:------------| +| `temDISABLED` | The related amendment is not enabled. | +| `temINVALID_ACCOUNT_ID` | A provided `Subject` or `Issuer` field is invalid. For example, it contains [ACCOUNT_ZERO][]. | +| `tecNO_PERMISSION` | The sender is neither the issuer nor subject of the credential, and the credential is not expired. | +| `tecNO_ENTRY` | The specified credential does not exist in the ledger. | + + +{% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/references/protocol/transactions/types/depositpreauth.md b/docs/references/protocol/transactions/types/depositpreauth.md index ec231aa8ca..da0f71b176 100644 --- a/docs/references/protocol/transactions/types/depositpreauth.md +++ b/docs/references/protocol/transactions/types/depositpreauth.md @@ -11,12 +11,15 @@ labels: _Added by the [DepositPreauth amendment][]._ -A DepositPreauth transaction gives another account pre-approval to deliver payments to the sender of this transaction. This is only useful if the sender of this transaction is using (or plans to use) [Deposit Authorization](../../../../concepts/accounts/depositauth.md). +A DepositPreauth transaction grants preauthorization to deliver payments to your account. This is only useful if you are using (or plan to use) [Deposit Authorization](../../../../concepts/accounts/depositauth.md). -{% admonition type="success" name="Tip" %}You can use this transaction to preauthorize certain counterparties before you enable Deposit Authorization. This may be useful to ensure a smooth transition from not requiring deposit authorization to requiring it.{% /admonition %} +{% admonition type="success" name="Tip" %}You can use this transaction before you enable Deposit Authorization. This may be useful to ensure a smooth transition from not requiring deposit authorization to requiring it.{% /admonition %} ## Example {% $frontmatter.seo.title %} JSON +{% tabs %} + +{% tab label="Single account preauthorization" %} ```json { "TransactionType" : "DepositPreauth", @@ -27,26 +30,65 @@ A DepositPreauth transaction gives another account pre-approval to deliver payme "Sequence" : 2 } ``` +{% /tab %} + +{% tab label="Credential preauthorization" %} +```json +{ + "TransactionType" : "DepositPreauth", + "Account" : "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "AuthorizeCredentials": [{ + "Credential": { + "Issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "CredentialType": "6D795F63726564656E7469616C" + } + }], + "Fee" : "10", + "Flags": 0, + "Sequence": 230984 +} +``` +{% /tab %} +{% /tabs %} [Query example transaction. >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fxrplcluster.com%2F&req=%7B%22id%22%3A%22example_DepositPreauth%22%2C%22command%22%3A%22tx%22%2C%22transaction%22%3A%22CB1BF910C93D050254C049E9003DA1A265C107E0C8DE4A7CFF55FADFD39D5656%22%2C%22binary%22%3Afalse%7D) {% raw-partial file="/docs/_snippets/tx-fields-intro.md" /%} - + +| Field | JSON Type | [Internal Type][] | Required? | Description | +|:-------------------------|:---------------------|:------------------|:----------|:------------| +| `Authorize` | String - [Address][] | AccountID | No | An account to preauthorize. | +| `AuthorizeCredentials` | Array | STArray | No | A set of credentials to authorize. _(Requires the [Credentials amendment][]. {% not-enabled /%})_ | +| `Unauthorize` | String | AccountID | No | An account whose preauthorization should be revoked. | +| `UnauthorizeCredentials` | Array | STArray | No | A set of credentials whose preauthorization should be revoked. _(Requires the [Credentials amendment][]. {% not-enabled /%})_ | + +You must provide **exactly one** of `Authorize`, `AuthorizeCredentials`, `Unauthorize`, or `UnauthorizeCredentials`. + +If this transaction is successful, it creates or removes a [DepositPreauth entry](../../ledger-data/ledger-entry-types/depositpreauth.md) in the ledger, based on the field provided. -| Field | JSON Type | [Internal Type][] | Description | -|:--------------|:----------|:------------------|:-----| -| `Authorize` | String | AccountID | _(Optional)_ The XRP Ledger address of the sender to preauthorize. | -| `Unauthorize` | String | AccountID | _(Optional)_ The XRP Ledger address of a sender whose preauthorization should be revoked. | +### AuthorizeCredentials Objects -You must provide _either_ `Authorize` or `Unauthorize`, but not both. +If provided, each member of the `AuthorizeCredentials` field or `UnauthorizeCredentials` field must be an inner object with the following fields: -This transaction has the following limitations: +| Field | JSON Type | [Internal Type][] | Required? | Description | +|:-----------------|:---------------------|:------------------|:----------|:------------| +| `Issuer` | String - [Address][] | AccountID | Yes | The issuer of the credential. | +| `CredentialType` | String - Hexadecimal | Blob | Yes | The credential type of the credential. | + +## Error Cases + +In addition to error types that can occur for all transactions, DepositPreauth transactions can result in the following error codes: + +| Error Code | Description | +|:--------------------------|:------------| +| `tecDUPLICATE` | The transaction would create a preauthorization that already exists. | +| `tecINSUFFICIENT_RESERVE` | The sender would not meet the [reserve requirement][] after adding another entry to the ledger. (A DepositPreauth entry counts as one item towards the authorizer's owner reserve.) | +| `tecNO_ENTRY` | The transaction tried to revoke a preauthorization that does not exist in the ledger. | +| `tecNO_ISSUER` | One or more specified credential issuers does not exist in the ledger. | +| `tecNO_TARGET` | The transaction tried to authorize an account that is not a funded account in the ledger. | +| `temCANNOT_PREAUTH_SELF` | The address in the `Authorize` field is the sender of the transaction. You cannot preauthorize yourself. | +| `temDISABLED` | A required amendment is not enabled. | -- An account cannot preauthorize (or unauthorize) its own address. Attempting to do so fails with the result [`temCANNOT_PREAUTH_SELF`](../transaction-results/tem-codes.md). -- Attempting to preauthorize an account which is already preauthorized fails with the result [`tecDUPLICATE`](../transaction-results/tec-codes.md). -- Attempting to unauthorize an account which is not preauthorized fails with the result [`tecNO_ENTRY`](../transaction-results/tec-codes.md). -- Attempting to preauthorize an address that is not funded in the ledger fails with the result [`tecNO_TARGET`](../transaction-results/tec-codes.md). -- Adding authorization adds a [DepositPreauth object](../../ledger-data/ledger-entry-types/depositpreauth.md) to the ledger, which counts toward the [owner reserve requirement](../../../../concepts/accounts/reserves.md#owner-reserves). If the sender of the transaction does not have enough XRP to pay for the increased reserve, the transaction fails with the result [`tecINSUFFICIENT_RESERVE`](../transaction-results/tec-codes.md). If the sender of the account is already at the maximum number of owned objects, the transaction fails with the result [`tecDIR_FULL`](../transaction-results/tec-codes.md). {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/references/protocol/transactions/types/escrowfinish.md b/docs/references/protocol/transactions/types/escrowfinish.md index d57a99286b..7a38de7cc7 100644 --- a/docs/references/protocol/transactions/types/escrowfinish.md +++ b/docs/references/protocol/transactions/types/escrowfinish.md @@ -10,9 +10,10 @@ labels: [[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/app/tx/impl/Escrow.cpp "Source") +Deliver XRP from an escrow (held payment) to the recipient. + _Added by the [Escrow amendment][]._ -Deliver XRP from a held payment to the recipient. ## Example {% $frontmatter.seo.title %} JSON @@ -30,21 +31,20 @@ Deliver XRP from a held payment to the recipient. [Query example transaction. >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fxrplcluster.com%2F&req=%7B%22id%22%3A%22example_EscrowFinish%22%2C%22command%22%3A%22tx%22%2C%22transaction%22%3A%22317081AF188CDD4DBE55C418F41A90EC3B959CDB3B76105E0CBE6B7A0F56C5F7%22%2C%22binary%22%3Afalse%7D) {% raw-partial file="/docs/_snippets/tx-fields-intro.md" /%} - - -| Field | JSON Type | [Internal Type][] | Description | -|:----------------|:-----------------|:------------------|:--------------------| -| `Owner` | String | AccountID | Address of the source account that funded the held payment. | -| `OfferSequence` | Unsigned Integer | UInt32 | Transaction sequence of [EscrowCreate transaction][] that created the held payment to finish. | -| `Condition` | String | Blob | _(Optional)_ Hex value matching the previously-supplied [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1) of the held payment. | -| `Fulfillment` | String | Blob | _(Optional)_ Hex value of the [PREIMAGE-SHA-256 crypto-condition fulfillment](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1.4) matching the held payment's `Condition`. | +| Field | JSON Type | [Internal Type][] | Required? | Description | +|:----------------|:----------|:------------------|:----------|:------------| +| `Owner` | String | AccountID | Yes | Address of the source account that funded the escrow. | +| `OfferSequence` | Number | UInt32 | Yes | Transaction sequence of [EscrowCreate transaction][] that created the escrow to finish. | +| `Condition` | String | Blob | No | Hex value matching the previously-supplied [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1) of the escrow. | +| `CredentialIDs` | Array of Strings | Vector256 | No | Set of Credentials to authorize a deposit made by this transaction. Each member of the array must be the ledger entry ID of a Credential entry in the ledger. For details, see [Credential IDs](./payment.md#credential-ids). | +| `Fulfillment` | String | Blob | No | Hex value of the [PREIMAGE-SHA-256 crypto-condition fulfillment](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1.4) matching the escrow's `Condition`. | Any account may submit an EscrowFinish transaction. -- If the held payment has a `FinishAfter` time, you cannot execute it before this time. Specifically, if the corresponding [EscrowCreate transaction][] specified a `FinishAfter` time that is after the close time of the most recently-closed ledger, the EscrowFinish transaction fails. -- If the held payment has a `Condition`, you cannot execute it unless you provide a matching `Fulfillment` for the condition. -- You cannot execute a held payment after it has expired. Specifically, if the corresponding [EscrowCreate transaction][] specified a `CancelAfter` time that is before the close time of the most recently-closed ledger, the EscrowFinish transaction fails. +- If the escrow has a `FinishAfter` time, you cannot execute it before this time. Specifically, if the corresponding [EscrowCreate transaction][] specified a `FinishAfter` time that is after the close time of the most recently-closed ledger, the EscrowFinish transaction fails. +- If the escrow has a `Condition`, you cannot execute it unless you provide a matching `Fulfillment` for the condition. +- You cannot execute an escrow after it has expired. Specifically, if the corresponding [EscrowCreate transaction][] specified a `CancelAfter` time that is before the close time of the most recently-closed ledger, the EscrowFinish transaction fails. {% admonition type="info" name="Note" %}The minimum [transaction cost](../../../../concepts/transactions/transaction-cost.md) to submit an EscrowFinish transaction increases if it contains a fulfillment. If the transaction has no fulfillment, the transaction cost is the standard 10 drops. If the transaction contains a fulfillment, the transaction cost is 330 [drops of XRP][] plus another 10 drops for every 16 bytes in size of the preimage.{% /admonition %} diff --git a/docs/references/protocol/transactions/types/payment.md b/docs/references/protocol/transactions/types/payment.md index 28f5811244..990de8f8f7 100644 --- a/docs/references/protocol/transactions/types/payment.md +++ b/docs/references/protocol/transactions/types/payment.md @@ -37,19 +37,21 @@ Payments are also the only way to [create accounts](#creating-accounts). [Query example transaction. >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fxrplcluster.com%2F&req=%7B%22id%22%3A%22example_Payment%22%2C%22command%22%3A%22tx%22%2C%22transaction%22%3A%227BF105CFE4EFE78ADB63FE4E03A851440551FE189FD4B51CAAD9279C9F534F0E%22%2C%22binary%22%3Afalse%7D) {% raw-partial file="/docs/_snippets/tx-fields-intro.md" /%} - -| Field | JSON Type | [Internal Type][] | Description | -|:-----------------|:---------------------|:------------------|:---------------| -| `Amount` | [Currency Amount][] | Amount | Alias to `DeliverMax`. | -| `DeliverMax` | [Currency Amount][] | Amount | [API v2][]: The maximum amount of currency to deliver. For non-XRP amounts, the nested field names MUST be lower-case. If the [`tfPartialPayment` flag](#payment-flags) is set, deliver _up to_ this amount instead. {% badge href="https://github.com/XRPLF/rippled/releases/tag/2.0.0" %}New in: rippled 2.0.0{% /badge %} | -| `DeliverMin` | [Currency Amount][] | Amount | _(Optional)_ Minimum amount of destination currency this transaction should deliver. Only valid if this is a [partial payment](../../../../concepts/payment-types/partial-payments.md). For non-XRP amounts, the nested field names are lower-case. | -| `Destination` | String | AccountID | The unique address of the account receiving the payment. | -| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag that identifies the reason for the payment to the destination, or a hosted recipient to pay. | -| `InvoiceID` | String | Hash256 | _(Optional)_ Arbitrary 256-bit hash representing a specific reason or identifier for this payment. | -| `Paths` | Array of path arrays | PathSet | (Optional, auto-fillable) Array of [payment paths](../../../../concepts/tokens/fungible-tokens/paths.md) to be used for this transaction. Must be omitted for XRP-to-XRP transactions. | -| `SendMax` | [Currency Amount][] | Amount | _(Optional)_ Highest amount of source currency this transaction is allowed to cost, including [transfer fees](../../../../concepts/tokens/transfer-fees.md), exchange rates, and [slippage](http://en.wikipedia.org/wiki/Slippage_%28finance%29). Does not include the [XRP destroyed as a cost for submitting the transaction](../../../../concepts/transactions/transaction-cost.md). For non-XRP amounts, the nested field names MUST be lower-case. Must be supplied for cross-currency/cross-issue payments. Must be omitted for XRP-to-XRP payments. | +| Field | JSON Type | [Internal Type][] | Required? | Description | +|:-----------------|:---------------------|:------------------|:----------|:------------| +| `Amount` | [Currency Amount][] | Amount | API v1: Yes | Alias to `DeliverMax`. | +| `CredentialIDs` | Array of Strings | Vector256 | No | Set of Credentials to authorize a deposit made by this transaction. Each member of the array must be the ledger entry ID of a Credential entry in the ledger. _(Requires the [Credentials amendment][]._ {% not-enabled /%})_ | +| `DeliverMax` | [Currency Amount][] | Amount | Yes | [API v2][]: The maximum amount of currency to deliver. [Partial payments](#partial-payments) can deliver less than this amount and still succeed; other payments fail unless they deliver the exact amount. {% badge href="https://github.com/XRPLF/rippled/releases/tag/2.0.0" %}New in: rippled 2.0.0{% /badge %} | +| `DeliverMin` | [Currency Amount][] | Amount | No | Minimum amount of destination currency this transaction should deliver. Only valid if this is a [partial payment](../../../../concepts/payment-types/partial-payments.md). For non-XRP amounts, the nested field names are lower-case. | +| `Destination` | String | AccountID | Yes | The unique address of the account receiving the payment. | +| `DestinationTag` | Number | UInt32 | No | Arbitrary tag that identifies the reason for the payment to the destination, or a hosted recipient to pay. | +| `InvoiceID` | String | Hash256 | No | Arbitrary 256-bit hash representing a specific reason or identifier for this payment. | +| `Paths` | Array of path arrays | PathSet | No | _(Auto-fillable)_ Array of [payment paths](../../../../concepts/tokens/fungible-tokens/paths.md) to be used for this transaction. Must be omitted for XRP-to-XRP transactions. | +| `SendMax` | [Currency Amount][] | Amount | No | Highest amount of source currency this transaction is allowed to cost, including [transfer fees](../../../../concepts/tokens/transfer-fees.md), exchange rates, and [slippage](http://en.wikipedia.org/wiki/Slippage_%28finance%29). Does not include the [XRP destroyed as a cost for submitting the transaction](../../../../concepts/transactions/transaction-cost.md). Must be supplied for cross-currency/cross-issue payments. Must be omitted for XRP-to-XRP payments. | + +When specifying a transaction, you must specify either `Amount` or `DeliverMax`, but not both. When displaying transactions in JSON, API v1 always uses `Amount` and API v2 (or later) always uses `DeliverMax`. ## Types of Payments @@ -84,7 +86,7 @@ Most of the time, the `issuer` field of a non-XRP [Currency Amount][] indicates The Payment transaction type can create new accounts in the XRP Ledger by sending enough XRP to an unfunded address. Other transactions to unfunded addresses always fail. -For more information, see [Accounts](../../../../concepts/accounts/index.md#creating-accounts). +For more information, see [Creating Accounts](../../../../concepts/accounts/index.md#creating-accounts). ## Paths @@ -113,7 +115,7 @@ Transactions of the Payment type support additional values in the [`Flags` field ## Partial Payments -A partial payment allows a payment to succeed by reducing the amount received. Partial payments are useful for [returning payments](../../../../concepts/payment-types/bouncing-payments.md) without incurring additional costs to oneself. However, partial payments can also be used to exploit integrations that naively assume the `Amount` field of a successful transaction always describes the exact amount delivered. +A partial payment allows a payment to succeed by reducing the amount received. Partial payments are useful for [returning payments](../../../../concepts/payment-types/bouncing-payments.md) without incurring additional costs to oneself. However, partial payments can also be used to exploit integrations that naively assume the `Amount` field of a successful transaction always describes the exact amount delivered. To reduce confusion, `Amount` has been renamed to `DeliverMax` in API v2 and later. A partial payment is any [Payment transaction][] with the `tfPartialPayment` flag enabled. A partial payment can be successful if it delivers any positive amount greater than or equal to its `DeliverMin` field (or any positive amount at all if `DeliverMin` is not specified) without sending more than the `SendMax` value. @@ -138,4 +140,21 @@ The `tfLimitQuality` flag is most useful when combined with [partial payments](. In the above example with a ¥95/$15 offer and a ¥5/$2 offer, the situation is different if my transaction has both `tfPartialPayment` and `tfLimitQuality` enabled. If we keep my `SendMax` of 20 USD and a destination `Amount` of 100 CNY, then the limit quality is still `5`. However, because I am doing a partial payment, the transaction sends as much as it can instead of failing if the full destination amount cannot be sent. This means that my transaction consumes the ¥95/$15 offer, whose quality is about `6.3`, but it rejects the ¥5/$2 offer because that offer's quality of `2.5` is worse than the quality limit of `5`. In the end, my transaction only delivers ¥95 instead of the full ¥100, but it avoids wasting money on poor exchange rates. +## Credential IDs + +You can send money to an account that uses [Deposit Authorization](../../../../concepts/accounts/depositauth.md) by providing the `CredentialIDs` field with an exact set of credentials that are preauthorized by the recipient. The set of credentials must match a [DepositPreauth entry](../../ledger-data/ledger-entry-types/depositpreauth.md) in the ledger. + +The credentials provided in the `CredentialIDs` field must all be valid, meaning: + +- The provided credentials must exist. +- The provided credentials must have been accepted by the subject. +- None of the provided credentials may be expired. +- The sender of this transaction must be the subject of each of the credentials. + +If you provide credentials even though the destination account does not use Deposit Authorization, the credentials are not needed but they are still checked for validity. + +### Special Case for Destination Accounts Below the Reserve + +If an account has Deposit Authorization enabled, but its current XRP balance is less than the [reserve requirement](../../../../concepts/accounts/reserves.md), there is a special exception to Deposit Authorization where anyone can send a Payment transaction, without preauthorization, for up to the base account reserve; this exists as an emergency measure to prevent an account from getting "stuck" without enough XRP to transact. To qualify for this special case, the payment MUST NOT use the `CredentialIDs` field. + {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/references/protocol/transactions/types/paymentchannelclaim.md b/docs/references/protocol/transactions/types/paymentchannelclaim.md index b3926b9b55..39cbc819ab 100644 --- a/docs/references/protocol/transactions/types/paymentchannelclaim.md +++ b/docs/references/protocol/transactions/types/paymentchannelclaim.md @@ -46,18 +46,18 @@ The **destination address** of a channel can: {% raw-partial file="/docs/_snippets/tx-fields-intro.md" /%} - -| Field | JSON Type | [Internal Type][] | Description | -|:------------|:----------|:------------------|:-------------------------------| -| `Channel` | String | Hash256 | The unique ID of the channel, as a 64-character hexadecimal string. | -| `Balance` | String | Amount | _(Optional)_ Total amount of [XRP, in drops][Currency Amount], delivered by this channel after processing this claim. Required to deliver XRP. Must be more than the total amount delivered by the channel so far, but not greater than the `Amount` of the signed claim. Must be provided except when closing the channel. | -| `Amount` | String | Amount | _(Optional)_ The amount of [XRP, in drops][Currency Amount], authorized by the `Signature`. This must match the amount in the signed message. This is the cumulative amount of XRP that can be dispensed by the channel, including XRP previously redeemed. | -| `Signature` | String | Blob | _(Optional)_ The signature of this claim, as hexadecimal. The signed message contains the channel ID and the amount of the claim. Required unless the sender of the transaction is the source address of the channel. | -| `PublicKey` | String | Blob | _(Optional)_ The public key used for the signature, as hexadecimal. This must match the `PublicKey` stored in the ledger for the channel. Required unless the sender of the transaction is the source address of the channel and the `Signature` field is omitted. (The transaction includes the public key so that `rippled` can check the validity of the signature before trying to apply the transaction to the ledger.) | +| Field | JSON Type | [Internal Type][] | Required? | Description | +|:------------|:----------|:------------------|:----------|:------------| +| `Amount` | String | Amount | No | The amount of [XRP, in drops][Currency Amount], authorized by the `Signature`. This must match the amount in the signed message. This is the cumulative amount of XRP that can be dispensed by the channel, including XRP previously redeemed. | +| `Balance` | String | Amount | No | Total amount of [XRP, in drops][Currency Amount], delivered by this channel after processing this claim. Required to deliver XRP. Must be more than the total amount delivered by the channel so far, but not greater than the `Amount` of the signed claim. Must be provided except when closing the channel. | +| `Channel` | String | Hash256 | Yes | The unique ID of the channel, as a 64-character hexadecimal string. | +| `CredentialIDs` | Array of Strings | Vector256 | No | Set of Credentials to authorize a deposit made by this transaction. Each member of the array must be the ledger entry ID of a Credential entry in the ledger. For details, see [Credential IDs](./payment.md#credential-ids). | +| `PublicKey` | String | Blob | No | The public key used for the signature, as hexadecimal. This must match the `PublicKey` stored in the ledger for the channel. Required unless the sender of the transaction is the source address of the channel and the `Signature` field is omitted. (The transaction includes the public key so that `rippled` can check the validity of the signature before trying to apply the transaction to the ledger.) | +| `Signature` | String | Blob | No | The signature of this claim, as hexadecimal. The signed message contains the channel ID and the amount of the claim. Required unless the sender of the transaction is the source address of the channel. | -If the payment channel was created before the [fixPayChanRecipientOwnerDir amendment](/resources/known-amendments.md#fixpaychanrecipientownerdir) became enabled (on 2020-05-01), it is possible that the destination of the payment channel has been [deleted](../../../../concepts/accounts/deleting-accounts.md) and does not currently exist in the ledger. If the destination has been deleted, the source account cannot send XRP from the channel to the destination; instead, the transaction fails with `tecNO_DST`. (And, of course, the deleted account cannot send any transactions at all.) Other uses of this transaction type are unaffected when the destination account has been deleted, including adjusting the channel expiration, closing a channel with no XRP, or removing a channel that has passed its expiration time. +If the payment channel was created before the [fixPayChanRecipientOwnerDir amendment](/resources/known-amendments.md#fixpaychanrecipientownerdir) became enabled (on 2020-05-01), it is possible that the destination account has been [deleted](../../../../concepts/accounts/deleting-accounts.md) and does not currently exist in the ledger. If the destination has been deleted, the source account cannot send XRP from the channel to the destination; instead, the transaction fails with `tecNO_DST`. Other uses of this transaction type are unaffected when the destination account has been deleted, including adjusting the channel expiration, closing a channel with no XRP, or removing a channel that has passed its expiration time. ## PaymentChannelClaim Flags diff --git a/sidebars.yaml b/sidebars.yaml index 3fcc68c655..7017d7073b 100644 --- a/sidebars.yaml +++ b/sidebars.yaml @@ -160,6 +160,7 @@ - page: docs/concepts/decentralized-storage/index.md expanded: false items: + - page: docs/concepts/decentralized-storage/credentials.md - page: docs/concepts/decentralized-storage/decentralized-identifiers.md - page: docs/concepts/decentralized-storage/price-oracles.md - page: docs/tutorials/index.md @@ -326,6 +327,7 @@ - page: docs/references/protocol/ledger-data/ledger-entry-types/amm.md - page: docs/references/protocol/ledger-data/ledger-entry-types/bridge.md - page: docs/references/protocol/ledger-data/ledger-entry-types/check.md + - page: docs/references/protocol/ledger-data/ledger-entry-types/credential.md - page: docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth.md - page: docs/references/protocol/ledger-data/ledger-entry-types/did.md - page: docs/references/protocol/ledger-data/ledger-entry-types/directorynode.md @@ -358,6 +360,9 @@ - page: docs/references/protocol/transactions/types/ammdeposit.md - page: docs/references/protocol/transactions/types/ammvote.md - page: docs/references/protocol/transactions/types/ammwithdraw.md + - page: docs/references/protocol/transactions/types/credentialaccept.md + - page: docs/references/protocol/transactions/types/credentialcreate.md + - page: docs/references/protocol/transactions/types/credentialdelete.md - page: docs/references/protocol/transactions/types/checkcancel.md - page: docs/references/protocol/transactions/types/checkcash.md - page: docs/references/protocol/transactions/types/checkcreate.md From 9737788bb93bd6fba9a30e7fc22761ca44d4e7d3 Mon Sep 17 00:00:00 2001 From: tequ Date: Thu, 19 Dec 2024 00:08:30 +0900 Subject: [PATCH 2/8] [JA] credentials --- .../decentralized-storage/credentials.md | 48 ++++ .../ledger-methods/ledger_entry.md | 211 ++++++++++++------ .../deposit_authorized.md | 66 ++++-- .../ledger-entry-types/credential.md | 65 ++++++ .../ledger-entry-types/depositpreauth.md | 83 +++++-- .../transactions/types/accountdelete.md | 33 +-- .../transactions/types/credentialaccept.md | 49 ++++ .../transactions/types/credentialcreate.md | 51 +++++ .../transactions/types/credentialdelete.md | 51 +++++ .../transactions/types/depositpreauth.md | 83 +++++-- .../transactions/types/escrowfinish.md | 28 +-- .../protocol/transactions/types/payment.md | 27 ++- .../transactions/types/paymentchannelclaim.md | 28 +-- docs/_snippets/common-links.md | 6 + 14 files changed, 658 insertions(+), 171 deletions(-) create mode 100644 @l10n/ja/docs/concepts/decentralized-storage/credentials.md create mode 100644 @l10n/ja/docs/references/protocol/ledger-data/ledger-entry-types/credential.md create mode 100644 @l10n/ja/docs/references/protocol/transactions/types/credentialaccept.md create mode 100644 @l10n/ja/docs/references/protocol/transactions/types/credentialcreate.md create mode 100644 @l10n/ja/docs/references/protocol/transactions/types/credentialdelete.md diff --git a/@l10n/ja/docs/concepts/decentralized-storage/credentials.md b/@l10n/ja/docs/concepts/decentralized-storage/credentials.md new file mode 100644 index 0000000000..af9d6e4146 --- /dev/null +++ b/@l10n/ja/docs/concepts/decentralized-storage/credentials.md @@ -0,0 +1,48 @@ +# Credentials + +Credentials(資格情報)機能は、プライバシーと分散化を尊重しながら、XRP Ledgerブロックチェーンを使用して認可とコンプライアンス要件を管理するためのツールセットです。この機能は、[Deposit Authorization](../../concepts/accounts/depositauth.md)を含むXRP Ledgerの他の機能を拡張し、相互接続します。この機能の目的は、[KYC (Know Your Customer)](https://ja.wikipedia.org/wiki/KYC)などのコンプライアンスチェックのプロセスを効率化し、XRP Ledgerエコシステム内でさらなる信頼ベースのアプリケーションを可能にすることです。 + +Credentials標準の設計は、[W3C Verifiable Credentials標準](https://www.w3.org/TR/vc-data-model-2.0/)から着想を得ています。XRP Ledgerのコンテキストで意味をなす範囲で互換性を持たせることを意図しています。データ構造とフォーマットには若干の違いがあります。例えば、資格情報の対象はURLではなくXRP Ledgerアドレスによって識別されます。 + + +## 概要 + +_Credentials_ は、レジャーに保存可能な署名付きの声明であり、ユーザのアイデンティティ、法的地位、またはその他の状態を証明することができます。この機能には、XRP Ledger上での資格情報の発行、保存、検証が含まれ、同時にユーザのプライバシーニーズもサポートします。 + +この機能は、以下の役割を持つ関係者のエコシステムのために設計されています: + +- 正しい資格情報を持つユーザに特定のアクションや相互作用を制限したい _認証者_ +- 基準を満たすユーザに資格情報を提供する _発行者_ +- 発行者から資格情報を取得し、その資格情報を使用して認証者と相互作用する _ユーザ_ + +各資格情報は、特定のユーザのXRP Ledgerアカウントに適用され、特定の資格情報発行者によって証明されます。資格情報が示す正確な資格は、発行者によって定義されるオープンエンドなものです。些細なものから重要なもの、広範なものから狭いものまで、範囲は様々です。資格情報が示す内容の例として次のようなものが挙げられます。 + +- ユーザが特定の国または国々による制裁の対象でないこと +- ユーザが米国における適格投資家の地位を有すること +- ユーザが特定のビデオゲームで特定のレベルに到達していること + +### 用途 + +XRP Ledger内では、Deposit Authorizationを使用して、送信アカウントを個別に承認する代わりに、正しい資格情報を持つ送信者を自動的に許可することができます。将来のAmendmentにより、トークンの保有、貸付プールへの参加、AMMへの貢献など、他の機能へのアクセスを制限するために資格情報を拡張することができます。 + +XRP Ledgerに保存された資格情報は、特にDID(分散型識別子)と関連付けて、レジャー外のアクティビティの認可にも使用できます。 + +## 利用フロー + +資格情報の典型的な利用フローには、以下の例で説明するように、異なる役割を持つ3つの関係者が関与します: + +* Verityは、法的コンプライアンスを確保するために、適切にKYCされたアカウントとのみ相互作用したい規制対象ビジネスです。これによりVerityは _認証者_ となります。なぜなら、どのアカウントが彼らと相互作用できる(認可される)かを設定するからです。 +* Isabelは、アカウントを審査し、アカウントが本人であることを証明する資格情報を発行する資格情報発行者です。 +* Aliceは、Verityと相互作用したいユーザです。 + +3者全てにXRP Ledgerアカウントが必要です。フローは以下のように進みます: + +1. Verityは、認可されたアカウントのみが相互作用できるようにアカウントを設定します。Isabelがアカウントを適切に審査し、関連する資格情報を発行することを信頼しているため、Isabelが発行した資格情報を受け入れるようにアカウントを設定します。 +2. Aliceは必要な書類をプライベートに、オフチェーンでIsabelに提出します。 +3. IsabelはAliceの書類を確認し、Aliceの信頼性を証明する資格情報を作成します。 +4. Aliceは資格情報を受け入れ、それを有効にします。 +5. これでAliceはVerityと相互作用/資金を送ることができます。 + +重要なのは、AliceがIsabelに送信する書類には、Aliceのアイデンティティを確認するために必要な個人を特定できる情報やプライベート情報が含まれる可能性がありますが、この情報はブロックチェーン上に公開または保存されることはなく、Verityがそれを見る必要もないということです。また、Isabelを信頼する他のビジネスも同じ資格情報を受け入れることができるため、Aliceは相互作用したい各関係者に対して繰り返し再検証する必要がありません。 + +資格情報を取り消すために、Isabelはレジャーからそれを削除できます。Aliceも自身の資格情報を削除できます。 diff --git a/@l10n/ja/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md b/@l10n/ja/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md index f724be870a..ded5cace69 100644 --- a/@l10n/ja/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md +++ b/@l10n/ja/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md @@ -2,7 +2,7 @@ html: ledger_entry.html parent: ledger-methods.html seo: - description: XRP Ledgerの1つのレジャーオブジェクトを生フォーマットで返します。 + description: XRP Ledgerの1つのレジャーエントリを生フォーマットで返します。 label: - ブロックチェーン - データ保持 @@ -10,7 +10,7 @@ label: # ledger_entry [[ソース]](https://github.com/xrplf/rippled/blob/master/src/ripple/rpc/handlers/LedgerEntry.cpp "Source") -`ledger_entry`メソッドは、XRP Ledgerの1つのレジャーオブジェクトを生フォーマットで返します。取得可能な各種オブジェクトについては、[レジャーフォーマット][]をご覧ください。 +`ledger_entry`メソッドは、XRP Ledgerの1つのレジャーエントリを生フォーマットで返します。取得可能な各種エントリについては、[レジャーフォーマット][]をご覧ください。 ## リクエストのフォーマット @@ -22,29 +22,30 @@ label: | フィールド | 型 | 説明 | |:------------------------|:-----------------------|:----------------------| -| `binary` | ブール値 | _(省略可)_ `true`の場合、リクエストしたレジャーオブジェクトの内容がXRP Ledgerの[バイナリ形式](../../../protocol/binary-format.md)の16進数の文字列として返されます。それ以外の場合はデータがJSONフォーマットで返されます。デフォルトは`false`です。{% badge href="https://github.com/XRPLF/rippled/releases/tag/1.2.0" %}更新: rippled 1.2.0{% /badge %} | +| `binary` | ブール値 | _(省略可)_ `true`の場合、リクエストしたレジャーエントリの内容がXRP Ledgerの[バイナリ形式](../../../protocol/binary-format.md)の16進数の文字列として返されます。それ以外の場合はデータがJSONフォーマットで返されます。デフォルトは`false`です。{% badge href="https://github.com/XRPLF/rippled/releases/tag/1.2.0" %}更新: rippled 1.2.0{% /badge %} | | `ledger_hash` | 文字列 | _(省略可)_ 使用するレジャーバージョンの20バイトの16進数の文字列。([レジャーの指定][]をご覧ください。 | | `ledger_index` | 文字列 または 符号なし整数 | _(省略可)_ 使用するレジャーの[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列("validated"や"closed"、"current"など)。([レジャーの指定][]をご覧ください。 | `generator`と`ledger`パラメータは非推奨であり、予告なく削除される可能性があります。 -上記の一般的なフィールドに加えて、オブジェクトを取得するタイプを示すために、以下のフィールドのうち *正確に1つ* を指定する必要があります。有効なフィールドは以下のとおりです。 +上記の一般的なフィールドに加えて、エントリを取得するタイプを示すために、以下のフィールドのうち *正確に1つ* を指定する必要があります。有効なフィールドは以下のとおりです。 - [ledger\_entry](#ledger_entry) - [リクエストのフォーマット](#リクエストのフォーマット) - [一般的なフィールド](#一般的なフィールド) - - [IDからレジャーオブジェクトを取得する](#idからレジャーオブジェクトを取得する) - - [AccountRootオブジェクトを取得する](#accountrootオブジェクトを取得する) - - [AMMオブジェクトを取得する](#ammオブジェクトを取得する) - - [Bridgeオブジェクトを取得する](#bridgeオブジェクトを取得する) - - [Directorynodeオブジェクトを取得する](#directorynodeオブジェクトを取得する) - - [Offerオブジェクトを取得する](#offerオブジェクトを取得する) - - [RippleStateオブジェクトを取得する](#ripplestateオブジェクトを取得する) - - [Checkオブジェクトを取得する](#checkオブジェクトを取得する) - - [Escrowオブジェクトを取得する](#escrowオブジェクトを取得する) - - [Paychannelオブジェクトを取得する](#paychannelオブジェクトを取得する) - - [DepositPreauthオブジェクトを取得する](#depositpreauthオブジェクトを取得する) - - [Ticketオブジェクトを取得する](#ticketオブジェクトを取得する) + - [IDからレジャーエントリを取得する](#idからレジャーオントリを取得する) + - [AccountRootエントリを取得する](#accountrootエントリを取得する) + - [AMMエントリを取得する](#ammエントリを取得する) + - [Bridgeエントリを取得する](#bridgeエントリを取得する) + - [Credentialエントリを取得する](#credentialエントリを取得する) + - [Directorynodeエントリを取得する](#directorynodeエントリを取得する) + - [Offerエントリを取得する](#offerエントリを取得する) + - [RippleStateエントリを取得する](#ripplestateエントリを取得する) + - [Checkエントリを取得する](#checkエントリを取得する) + - [Escrowエントリを取得する](#escrowエントリを取得する) + - [Paychannelエントリを取得する](#paychannelエントリを取得する) + - [DepositPreauthエントリを取得する](#depositpreauthエントリを取得する) + - [Ticketエントリを取得する](#ticketエントリを取得する) - [Nft Pageを取得する](#nft-pageを取得する) - [レスポンスのフォーマット](#レスポンスのフォーマット) - [考えられるエラー](#考えられるエラー) @@ -52,13 +53,14 @@ label: {% admonition type="warning" name="注意" %}リクエストでこれらの型固有のフィールドを1つ以上指定した場合、サーバはそのうちの1つだけの結果を取得します。サーバがどれを選択するかは定義されていないため、こうした指定方法は避けるべきです。{% /admonition %} -### IDからレジャーオブジェクトを取得する +### IDからレジャーエントリを取得する + -ユニークな ID を使用して、任意のタイプのレジャーオブジェクトを取得します。 +ユニークな ID を使用して、任意のタイプのレジャーエントリを取得します。 | フィールド | 型 | 説明 | |:---------|:-------|:----------------------------------------------------------| -| `index` | 文字列 | レジャーから取得する1オブジェクトの[オブジェクトID](../../../protocol/ledger-data/common-fields.md)を、64文字(256ビット)の16進数の文字列。 | +| `index` | 文字列 | レジャーから取得する1エントリの[レジャーエントリID](../../../protocol/ledger-data/common-fields.md)を、64文字(256ビット)の16進数の文字列。 | {% tabs %} @@ -97,7 +99,7 @@ rippled json ledger_entry '{ "index": "7DB0788C020F02780A673DC74757F23823FA3014C [試してみる >](/resources/dev-tools/websocket-api-tool#ledger_entry-by-object-id) {% admonition type="success" name="ヒント" %} -このタイプのリクエストは、レジャーデータにシングルトンオブジェクトが存在する場合、そのIDは常に同一であるため、任意のシングルトンオブジェクトを取得するために使用できます。たとえば +このタイプのリクエストは、レジャーデータにシングルトンエントリが存在する場合、そのIDは常に同一であるため、任意のシングルトンエントリを取得するために使用できます。たとえば - [`Amendments`](../../../protocol/ledger-data/ledger-entry-types/amendments.md) - `7DB0788C020F02780A673DC74757F23823FA3014C1866E72CC4CD8B226CD6EF4` - [`FeeSettings`](../../../protocol/ledger-data/ledger-entry-types/feesettings.md) - `4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A651` @@ -107,13 +109,14 @@ rippled json ledger_entry '{ "index": "7DB0788C020F02780A673DC74757F23823FA3014C -### AccountRootオブジェクトを取得する +### AccountRootエントリを取得する + -アドレスから[AccountRootオブジェクト](../../../protocol/ledger-data/ledger-entry-types/accountroot.md)を取得します。これは[account_infoメソッド][]とほぼ同じです。 +アドレスから[AccountRootエントリ](../../../protocol/ledger-data/ledger-entry-types/accountroot.md)を取得します。これは[account_infoメソッド][]とほぼ同じです。 | フィールド | 型 | 説明 | |:----------- ---|:--------------------|:----------------------| -| `account_root` | 文字列 - [アドレス][] | 取得する[AccountRootオブジェクト](../../../protocol/ledger-data/ledger-entry-types/accountroot.md)の標準アドレス。 | +| `account_root` | 文字列 - [アドレス][] | 取得する[AccountRootエントリ](../../../protocol/ledger-data/ledger-entry-types/accountroot.md)の標準アドレス。 | {% tabs %} @@ -154,17 +157,18 @@ rippled json ledger_entry '{ "account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 -### AMMオブジェクトを取得する +### AMMエントリを取得する + _([AMM amendment][]により追加されました。)_ -レジャーからAutomated Market-Maker(AMM)オブジェクトを取得します。これは[amm_infoメソッド][]と似ていますが、`ledger_entry`は保存されているレジャーエントリのみを返します。 +レジャーからAutomated Market-Maker(AMM)エントリを取得します。これは[amm_infoメソッド][]と似ていますが、`ledger_entry`は保存されているレジャーエントリのみを返します。 | フィールド | 型 | 説明 | |:-------------|:---------------------|:----------------------| -| `amm` | オブジェクトまたは文字列 | 取得する[AMM](../../../protocol/ledger-data/ledger-entry-types/amm.md)。文字列を指定する場合は、AMMの[オブジェクトID](../../../protocol/ledger-data/common-fields.md)を16進数で指定しなければなりません。オブジェクトを指定する場合は、`asset`と`asset2`のサブフィールドを含む必要があります。 | -| `amm.asset` | オブジェクト | このAMMのプールにある2つの資産のうちのひとつを、[金額なしの通貨オブジェクト](../../../protocol/data-types/currency-formats.md#金額なしでの通貨の指定)として指定します。 | -| `amm.asset2` | オブジェクト | このAMMのプールにある2つの資産のうちのもうひとつを、[金額なしの通貨オブジェクト](../../../protocol/data-types/currency-formats.md#金額なしでの通貨の指定)として指定します。 | +| `amm` | オブジェクトまたは文字列 | 取得する[AMM](../../../protocol/ledger-data/ledger-entry-types/amm.md)。文字列を指定する場合は、AMMの[レジャーエントリID](../../../protocol/ledger-data/common-fields.md)を16進数で指定しなければなりません。エントリを指定する場合は、`asset`と`asset2`のサブフィールドを含む必要があります。 | +| `amm.asset` | オブジェクト | このAMMのプールにある2つの資産のうちのひとつを、[金額なしの通貨エントリ](../../../protocol/data-types/currency-formats.md#金額なしでの通貨の指定)として指定します。 | +| `amm.asset2` | オブジェクト | このAMMのプールにある2つの資産のうちのもうひとつを、[金額なしの通貨エントリ](../../../protocol/data-types/currency-formats.md#金額なしでの通貨の指定)として指定します。 | {% tabs %} @@ -220,7 +224,8 @@ rippled json ledger_entry '{ "amm": { "asset": { "currency": "XRP" }, "asset2": [試してみる >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fs.devnet.rippletest.net%3A51233%2F#ledger_entry-amm) -### Bridgeオブジェクトを取得する +### Bridgeエントリを取得する + _([XChainBridge amendment][]が必要です {% not-enabled /%})_ @@ -290,14 +295,67 @@ rippled json ledger_entry '{ "bridge_account": "rnQAXXWoFNN6PEqwqsdTngCtFPCrmfuq [試してみよう! >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fs.devnet.rippletest.net%3A51233%2F#ledger_entry-bridge) +### Credentialエントリを取得する -### DirectoryNodeオブジェクトを取得する +[Credentialエントリ](../../../protocol/ledger-data/ledger-entry-types/credential.md)を取得します。 -他のレジャーオブジェクトのリストを含む[DirectoryNode](../../../protocol/ledger-data/ledger-entry-types/directorynode.md)を取得します。文字列(DirectoryのオブジェクトID)またはオブジェクトを指定します。 +| フィールド | 型 | 必須? | 説明 | +| :--------------------------- | :------------------------- | :---- | ---- | +| `credential` | オブジェクト または 文字列 | はい | 取得する[Credentialエントリ](../../../protocol/ledger-data/ledger-entry-types/credential.md)を指定します。文字列の場合は、エントリの[レジャーエントリID](../../../protocol/ledger-data/common-fields.md)を16進数で指定します。オブジェクトの場合は、`subject`, `issuer`, `credential_type`のサブフィールドが必要です。 | +| `credential.subject` | 文字列 - [Address][] | はい | 資格情報の対象となるアカウント。 | +| `credential.issuer` | 文字列 - [Address][] | はい | 資格情報を発行したアカウント。 | +| `credential.credential_type` | 文字列 - 16進数文字列 | はい | 資格情報の種類。 | + +WebSocket: + +```json +{ + "id": "example_get_credential", + "command": "ledger_entry", + "credential": { + "subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "credential_type": "6D795F63726564656E7469616C" + }, + "ledger_index": "validated" +} +``` + +JSON-RPC: + +```json +{ + "method": "ledger_entry", + "params": [{ + "credential": { + "subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "credential_type": "6D795F63726564656E7469616C" + }, + "ledger_index": "validated" + }] +} +``` + +Commandline: + +```bash +rippled json ledger_entry '{ "credential": {"subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", "issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX","credential_type": "6D795F63726564656E7469616C"}, "ledger_index": "validated" }' +``` + + + + +### DirectoryNodeエントリを取得する + + +他のレジャーエントリのリストを含む[DirectoryNode](../../../protocol/ledger-data/ledger-entry-types/directorynode.md)を取得します。文字列(DirectoryのレジャーエントリID)またはオブジェクトを指定します。 | フィールド | 型 | 説明 | |:------------------------|:---------------------------|:----------------------| -| `directory` | オブジェクト または 文字列 | 取得する[DirectoryNode](../../../protocol/ledger-data/ledger-entry-types/directorynode.md)。文字列の場合は、ディレクトリの[オブジェクトID](../../../protocol/ledger-data/common-fields.md)を16進数で指定します。オブジェクトの場合は、サブフィールドとして`dir_root`または`owner`が必要で、オプションとして`sub_index`サブフィールドを指定可能です。 | +| `directory` | オブジェクト または 文字列 | 取得する[DirectoryNode](../../../protocol/ledger-data/ledger-entry-types/directorynode.md)。文字列の場合は、ディレクトリの[レジャーエントリID](../../../protocol/ledger-data/common-fields.md)を16進数で指定します。オブジェクトの場合は、サブフィールドとして`dir_root`または`owner`が必要で、オプションとして`sub_index`サブフィールドを指定可能です。 | | `directory.sub_index` | 符号なし整数 | _(省略可)_ 指定された場合、その"ページ"以降の[DirectoryNode](../../../protocol/ledger-data/ledger-entry-types/directorynode.md)にジャンプします。 | | `directory.dir_root` | 文字列 | _(省略可)_ 取得するディレクトリを表す一意のインデックス。 | | `directory.owner` | 文字列 | _(省略可)_ このディレクトリに関連付けられているアカウントの一意のアドレス。 | @@ -347,15 +405,16 @@ rippled json ledger_entry '{ "directory": { "owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwu -### Offerオブジェクトを取得する +### Offerエントリを取得する + -通貨交換のオファーを定義した [Offer オブジェクト](../../../protocol/ledger-data/ledger-entry-types/offer.md) を取得します。文字列 (オファーの一意なインデックス) あるいはオブジェクトを指定します。 +通貨交換のオファーを定義した [Offer エントリ](../../../protocol/ledger-data/ledger-entry-types/offer.md) を取得します。文字列 (オファーの一意なインデックス) あるいはオブジェクトを指定します。 | フィールド | 型 | 説明 | |:------------------------|:---------------------------|:----------------------| -| `offer` | オブジェクトまたは 文字列 | 取得する[オファーオブジェクト](../../../protocol/ledger-data/ledger-entry-types/offer.md)。文字列の場合、オファーに対する[一意のオブジェクトID](../../../protocol/ledger-data/common-fields.md)を指定します。オブジェクトの場合、オファーを一意に識別するためのサブフィールド`account`と`seq`を指定します。 | +| `offer` | オブジェクトまたは 文字列 | 取得する[オファーエントリ](../../../protocol/ledger-data/ledger-entry-types/offer.md)。文字列の場合、オファーに対する[一意のレジャーエントリID](../../../protocol/ledger-data/common-fields.md)を指定します。レジャーエントリの場合、オファーを一意に識別するためのサブフィールド`account`と`seq`を指定します。 | | `offer.account` | 文字列 - [アドレス][] | _(`offer`がオブジェクト形式で指定されている場合、必須)_ オファーを作成したアカウント。 | -| `offer.seq` | 符号なし整数 | _(`offer`がオブジェクト形式で指定されている場合、必須)_ オファーオブジェクトを作成したトランザクションの[シーケンス番号][]。 | +| `offer.seq` | 符号なし整数 | _(`offer`がオブジェクト形式で指定されている場合、必須)_ オファーエントリを作成したトランザクションの[シーケンス番号][]。 | {% tabs %} @@ -402,15 +461,16 @@ rippled json ledger_entry '{ "offer": { "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJY -### RippleStateオブジェクトを取得する +### RippleStateエントリを取得する + -2つのアカウント間の(XRP以外の)通貨残高を追跡する[RippleStateオブジェクト](../../../protocol/ledger-data/ledger-entry-types/ripplestate.md)を取得します。 +2つのアカウント間の(XRP以外の)通貨残高を追跡する[RippleStateエントリ](../../../protocol/ledger-data/ledger-entry-types/ripplestate.md)を取得します。 | フィールド | 型 | 説明 | |:------------------------|:---------------------------|:----------------------| -| `ripple_state` | オブジェクト | 取得するRippleState(trust line)オブジェクトを指定するオブジェクト。取得するRippleStateエントリを一意に指定するには、`accounts`と`currency`のサブフィールドが必要です。 | -| `ripple_state.accounts` | 配列 | _(`ripple_state`が指定されている場合、必須)_ この[RippleStateオブジェクト](../../../protocol/ledger-data/ledger-entry-types/ripplestate.md)によってリンクされた2つのアカウントを長さ2の配列で指定します。 | -| `ripple_state.currency` | 文字列 | _(`ripple_state`が指定されている場合、必須)_ 取得する[RippleStateオブジェクト](../../../protocol/ledger-data/ledger-entry-types/ripplestate.md)の[通貨コード][]を指定します。 | +| `ripple_state` | オブジェクト | 取得するRippleState(trust line)エントリを指定するレジャーエントリ。取得するRippleStateエントリを一意に指定するには、`accounts`と`currency`のサブフィールドが必要です。 | +| `ripple_state.accounts` | 配列 | _(`ripple_state`が指定されている場合、必須)_ この[RippleStateエントリ](../../../protocol/ledger-data/ledger-entry-types/ripplestate.md)によってリンクされた2つのアカウントを長さ2の配列で指定します。 | +| `ripple_state.currency` | 文字列 | _(`ripple_state`が指定されている場合、必須)_ 取得する[RippleStateエントリ](../../../protocol/ledger-data/ledger-entry-types/ripplestate.md)の[通貨コード][]を指定します。 | {% tabs %} @@ -461,13 +521,14 @@ rippled json ledger_entry '{ "ripple_state": { "accounts": ["rf1BiGeXwwQoi8Z2ueF -### Checkオブジェクトを取得する +### Checkエントリを取得する + -[Checkオブジェクト](../../../protocol/ledger-data/ledger-entry-types/check.md)を取得します。{% badge href="https://github.com/XRPLF/rippled/releases/tag/1.0.0" %}新規: rippled 1.0.0{% /badge %}. +[Checkエントリ](../../../protocol/ledger-data/ledger-entry-types/check.md)を取得します。{% badge href="https://github.com/XRPLF/rippled/releases/tag/1.0.0" %}新規: rippled 1.0.0{% /badge %}. | フィールド | 型 | 説明 | |:---------|:------|:----------------------| -| `check` | 文字列 | 取得する[Checkオブジェクト](../../../protocol/ledger-data/ledger-entry-types/check.md)の[オブジェクトID](../../../protocol/ledger-data/common-fields.md)。 | +| `check` | 文字列 | 取得する[Checkエントリ](../../../protocol/ledger-data/ledger-entry-types/check.md)の[レジャーエントリID](../../../protocol/ledger-data/common-fields.md)。 | {% tabs %} @@ -506,15 +567,16 @@ rippled json ledger_entry '{ "check": "C4A46CCD8F096E994C4B0DEAB6CE98E722FC17D79 -### Escrowオブジェクトを取得する +### Escrowエントリを取得する + -[Escrowオブジェクト](../../../protocol/ledger-data/ledger-entry-types/escrow.md)を取得します。文字列(エスクローのオブジェクトID)またはオブジェクトとして指定します。{% badge href="https://github.com/XRPLF/rippled/releases/tag/1.0.0" %}新規: rippled 1.0.0{% /badge %} +[Escrowエントリ](../../../protocol/ledger-data/ledger-entry-types/escrow.md)を取得します。文字列(エスクローのエントリID)またはオブジェクトとして指定します。{% badge href="https://github.com/XRPLF/rippled/releases/tag/1.0.0" %}新規: rippled 1.0.0{% /badge %} | フィールド | 型 | 説明 | |:------------------------|:---------------------------|:----------------------| -| `escrow` | オブジェクト または 文字列 | 取得する[Escrowオブジェクト](../../../protocol/ledger-data/ledger-entry-types/escrow.md)を指定します。文字列の場合は、エスクローの[オブジェクトID](../../../protocol/ledger-data/common-fields.md)を16進数で指定します。オブジェクトの場合、`owner`と`seq`サブフィールドを指定します。. | -| `escrow.owner` | 文字列 - [アドレス][] | _(`escrow`がオブジェクト形式で指定されている場合、必須)_ Escrowオブジェクトの所有者(送信者)。 | -| `escrow.seq` | 符号なし整数 | _(`escrow`がオブジェクト形式で指定されている場合、必須)_ エスクローオブジェクトを作成したトランザクションの[シーケンス番号][]。 | +| `escrow` | オブジェクト または 文字列 | 取得する[Escrowエントリ](../../../protocol/ledger-data/ledger-entry-types/escrow.md)を指定します。文字列の場合は、エスクローの[レジャーエントリID](../../../protocol/ledger-data/common-fields.md)を16進数で指定します。オブジェクトの場合、`owner`と`seq`サブフィールドを指定します。. | +| `escrow.owner` | 文字列 - [アドレス][] | _(`escrow`がオブジェクト形式で指定されている場合、必須)_ Escrowエントリの所有者(送信者)。 | +| `escrow.seq` | 符号なし整数 | _(`escrow`がオブジェクト形式で指定されている場合、必須)_ エスクローエントリを作成したトランザクションの[シーケンス番号][]。 | {% tabs %} @@ -559,13 +621,13 @@ rippled json ledger_entry '{ "escrow": { "owner": "rL4fPHi2FWGwRGRQSH7gBcxkuo2b9 -### PayChannelオブジェクトを取得する - -非同期決済用のXRPを保持する[PayChannelオブジェクト](../../../protocol/ledger-data/ledger-entry-types/paychannel.md)を取得します。{% badge href="https://github.com/XRPLF/rippled/releases/tag/1.0.0" %}新規: rippled 1.0.0{% /badge %}. +### PayChannelエントリを取得する + +非同期決済用のXRPを保持する[PayChannelエントリ](../../../protocol/ledger-data/ledger-entry-types/paychannel.md)を取得します。{% badge href="https://github.com/XRPLF/rippled/releases/tag/1.0.0" %}新規: rippled 1.0.0{% /badge %}. | フィールド | 型 | 説明 | |:------------------|:-------|:------------------------------------------------| -| `payment_channel` | 文字列 | 取得する[PayChannelオブジェクト](../../../protocol/ledger-data/ledger-entry-types/paychannel.md)の[オブジェクトID](../../../protocol/ledger-data/common-fields.md)。 | +| `payment_channel` | 文字列 | 取得する[PayChannelエントリ](../../../protocol/ledger-data/ledger-entry-types/paychannel.md)の[エントリID](../../../protocol/ledger-data/common-fields.md)。 | {% tabs %} @@ -603,15 +665,24 @@ rippled json ledger_entry '{ "payment_channel": "C7F634794B79DB40E87179A9D1BF05D [試してみる >](/resources/dev-tools/websocket-api-tool#ledger_entry-paychannel) -### DepositPreauthオブジェクトを取得する +### DepositPreauthエントリを取得する + -[DepositPreauthオブジェクト](../../../protocol/ledger-data/ledger-entry-types/depositpreauth.md)を取得します。このオブジェクトは、[Deposit Authorization](../../../../concepts/accounts/depositauth.md)を必要とする口座への支払いの事前承認を記録します。文字列(DepositPreauthのオブジェクトID)またはオブジェクトとして指定します。{% badge href="https://github.com/XRPLF/rippled/releases/tag/1.1.0" %}新規: rippled 1.1.0{% /badge %}. +[DepositPreauthエントリ](../../../protocol/ledger-data/ledger-entry-types/depositpreauth.md)を取得します。このエントリは、[Deposit Authorization](../../../../concepts/accounts/depositauth.md)を必要とする口座への支払いの事前承認を記録します。文字列(DepositPreauthのエントリID)またはオブジェクトとして指定します。 -| フィールド | 型 | 説明 | -|:-----------------------------|:-----------------------|:-----------------------| -| `deposit_preauth` | オブジェクト または 文字列 | 取得する[DepositPreauthオブジェクト](../../../protocol/ledger-data/ledger-entry-types/depositpreauth.md)を指定します。文字列の場合、DepositPreauthオブジェクトの[オブジェクトID](../../../protocol/ledger-data/common-fields.md)を16進数で指定します。オブジェクトの場合、`owner`と`authorized`のサブフィールドを指定します。 | -| `deposit_preauth.owner` | 文字列 - [アドレス][] | _(`deposit_preauth`がオブジェクト形式で指定されている場合、必須)_ 事前承認を行ったアカウント。 | -| `deposit_preauth.authorized` | 文字列 - [アドレス][] | _(`deposit_preauth`がオブジェクト形式で指定されている場合、必須)_ 事前承認を受けたアカウント。 | +| フィールド | 型 | 必須? | 説明 | +| :--------------------------------------- | :------------------------- | :----- | ---- | +| `deposit_preauth` | オブジェクト または 文字列 | はい | 取得するDepositPreauthを指定します。文字列の場合は、DepositPreauthエントリの[レジャーエントリID][]を16進数で指定する必要があります。オブジェクトの場合は、`owner`サブフィールドと、`authorized`または`authorize_credentials`サブフィールドのいずれかが必要です。 | +| `deposit_preauth.owner` | 文字列 - [アドレス][] | はい | 事前承認を行ったアカウント | +| `deposit_preauth.authorized` | 文字列 - [アドレス][] | いいえ | 事前承認を受けたアカウント。 | +| `deposit_preauth.authorized_credentials` | 配列 | いいえ | 事前承認を受けた資格情報のセット | + +`deposit_preauth.authorized_credentials`配列の各メンバは、提供されている場合、次のネストされたフィールドを含める必要があります。 + +| フィールド | 型 | 必須? | 説明 | +| :---------------- | :-------------------- | :---- | :--------------------------------- | +| `issuer` | 文字列 - [アドレス][] | はい | 資格情報の発行アカウントのアドレス | +| `credential_type` | 文字列 - 16進数 | はい | 発行された資格情報のタイプ | {% tabs %} @@ -655,14 +726,15 @@ rippled json ledger_entry '{ "deposit_preauth": { "owner": "rf1BiGeXwwQoi8Z2ueFY [試してみる >](/resources/dev-tools/websocket-api-tool#ledger_entry-depositpreauth) -### Ticketオブジェクトを取得する +### Ticketエントリを取得する + -将来の使用のために確保された[シーケンス番号][]を表す[Ticketオブジェクト](../../../protocol/ledger-data/ledger-entry-types/ticket.md)を取得します。文字列(TicketのオブジェクトID)またはオブジェクトを指定します。 _([TicketBatch amendment][]により追加されました。)_ +将来の使用のために確保された[シーケンス番号][]を表す[Ticketエントリ](../../../protocol/ledger-data/ledger-entry-types/ticket.md)を取得します。文字列(TicketのエントリID)またはオブジェクトを指定します。 _([TicketBatch amendment][]により追加されました。)_ | フィールド | 型 | 説明 | |:--------------------|:-----------------------|:----------------------| -| `ticket` | オブジェクト または 文字列 | 取得する[Ticketオブジェクト](../../../protocol/ledger-data/ledger-entry-types/ticket.md)。文字列の場合、チケットの[オブジェクトID](../../../protocol/ledger-data/common-fields.md)を16進数で指定します。オブジェクトの場合、チケットエントリを一意に指定するために`account`と`ticket_seq`サブフィールドを指定します。 | -| `ticket.account` | 文字列 - [アドレス][] | _(`ticket`がオブジェクト形式で指定されている場合、必須)_ Ticketオブジェクトの所有者を指定します。 | +| `ticket` | エントリ または 文字列 | 取得する[Ticketエントリ](../../../protocol/ledger-data/ledger-entry-types/ticket.md)。文字列の場合、チケットの[レジャーエントリID](../../../protocol/ledger-data/common-fields.md)を16進数で指定します。オブジェクトの場合、チケットエントリを一意に指定するために`account`と`ticket_seq`サブフィールドを指定します。 | +| `ticket.account` | 文字列 - [アドレス][] | _(`ticket`がオブジェクト形式で指定されている場合、必須)_ Ticketエントリの所有者を指定します。 | | `ticket.ticket_seq` | 数値 | _(`ticket`がオブジェクト形式で指定されている場合、必須)_ 取得するTicketのTicketシーケンス番号を指定します。 | {% tabs %} @@ -708,12 +780,13 @@ rippled json ledger_entry '{ "ticket": { "account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJ ### NFT Pageを取得する + NFT ページを生のレジャー形式で取得します。 | フィールド | 型 | 説明 | |:------------------------|:-------|:----------------------| -| `nft_page` | 文字列 | 取得する[NFTページ](../../../protocol/ledger-data/ledger-entry-types/nftokenpage.md)の[オブジェクトID](../../../protocol/ledger-data/common-fields.md)。 | +| `nft_page` | 文字列 | 取得する[NFTページ](../../../protocol/ledger-data/ledger-entry-types/nftokenpage.md)の[レジャーエントリID](../../../protocol/ledger-data/common-fields.md)。 | {% tabs %} @@ -756,10 +829,10 @@ rippled json ledger_entry '{ "nft_page": "255DD86DDF59D778081A06D02701E9B2C9F4F0 | フィールド | 型 | 説明 | |:---------------|:-----------------|:-----------------------------------------| -| `index` | 文字列 | [レジャーオブジェクト](../../../protocol/ledger-data/ledger-entry-types/index.md)の一意のID。 | +| `index` | 文字列 | [レジャーエントリ](../../../protocol/ledger-data/ledger-entry-types/index.md)の一意のID。 | | `ledger_index` | 符号なし整数 | このデータを取得する際に使用したレジャーの [レジャーインデックス][]。 | -| `node` | オブジェクト | _(`"binary": true`が指定されている場合、省略)_ [レジャーフォーマット][]に基づいた、この元帳オブジェクトのデータを含むオブジェクト。 | -| `node_binary` | 文字列 | _(`"binary": true`が指定されていない場合、省略)_ レジャーオブジェクトの[バイナリ形式](../../../protocol/binary-format.md)を16進数で表したもの。 | +| `node` | オブジェクト | _(`"binary": true`が指定されている場合、省略)_ [レジャーフォーマット][]に基づいた、このレジャーエントリのデータを含むエントリ。 | +| `node_binary` | 文字列 | _(`"binary": true`が指定されていない場合、省略)_ レジャーエントリの[バイナリ形式](../../../protocol/binary-format.md)を16進数で表したもの。 | 処理が成功したレスポンスの例: @@ -869,7 +942,7 @@ rippled json ledger_entry '{ "nft_page": "255DD86DDF59D778081A06D02701E9B2C9F4F0 * いずれかの[汎用エラータイプ][]。 * `deprecatedFeature` - 削除されたフィールド(`generator`など)がリクエストに指定されていました。 -* `entryNotFound` - リクエストされたレジャーオブジェクトはレジャーに存在しません。 +* `entryNotFound` - リクエストされたレジャーエントリはレジャーに存在しません。 * `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。 * `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバが保有していません。 * `malformedAddress` - リクエストの[アドレス][]フィールドが誤って指定されています。 diff --git a/@l10n/ja/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/deposit_authorized.md b/@l10n/ja/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/deposit_authorized.md index 5dbd31a54c..d278e14578 100644 --- a/@l10n/ja/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/deposit_authorized.md +++ b/@l10n/ja/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/deposit_authorized.md @@ -1,6 +1,4 @@ --- -html: deposit_authorized.html -parent: path-and-order-book-methods.html seo: description: あるアカウントに別のアカウントへ支払を直接送金する権限があるかどうかを示します。 labels: @@ -24,6 +22,10 @@ labels: "command": "deposit_authorized", "source_account": "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de", "destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "credentials": [ + "A182EFBD154C9E80195082F86C1C8952FC0760A654B886F61BB0A59803B4387B", + "383D269D6C7417D0A8716B09F5DB329FB17B45A5EFDBAFB82FF04BC420DCF7D5" + ], "ledger_index": "validated" } ``` @@ -37,6 +39,10 @@ labels: { "source_account": "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de", "destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "credentials": [ + "A182EFBD154C9E80195082F86C1C8952FC0760A654B886F61BB0A59803B4387B", + "383D269D6C7417D0A8716B09F5DB329FB17B45A5EFDBAFB82FF04BC420DCF7D5" + ], "ledger_index": "validated" } ] @@ -45,23 +51,27 @@ labels: {% /tab %} {% tab label="コマンドライン" %} + ```bash #Syntax: deposit_authorized [] rippled deposit_authorized rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8 validated ``` {% /tab %} - {% /tabs %} リクエストには以下のパラメーターが含まれます。 -| `Field` | 型 | 説明 | -|:----------------------|:---------------------------|:------------------------| -| `source_account` | 文字列 - [アドレス][] | 発生し得る支払の送金元。 | -| `destination_account` | 文字列 - [アドレス][] | 発生し得る支払の送金先。 | -| `ledger_hash` | 文字列 | _(省略可)_ 使用するレジャーバージョンの32バイトの16進文字列。([レジャーの指定][]をご覧ください) | -| `ledger_index` | 文字列または符号なし整数 | _(省略可)_ 使用するレジャーの[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]をご覧ください) | +| フィールド | 型 | 必須? | 説明 | +| :-------------------- | :----------------------- | :----- | ---- | +| `source_account` | 文字列 - [アドレス][] | はい | 発生し得る支払いの送金元。 | +| `destination_account` | 文字列 - [アドレス][] | はい | 発生し得る支払いの送金先。 | +| `ledger_hash` | [ハッシュ][] | いいえ | 使用するレジャーバージョンの32バイトの16進文字列。([レジャーの指定][]をご覧ください) | +| `ledger_index` | [レジャーインデックス][] | いいえ | 使用するレジャーの[レジャーインデックス][]、またはレジャーを自動的に選択するためのショートカット文字列。([レジャーの指定][]をご覧ください) | +| `credentials` | 配列 | いいえ | 送金元が送金先に送金できるかどうかを確認する際に考慮する資格情報のセット。配列の各メンバは、レジャーの[Credentialエントリ][]の一意のIDでなければなりません。空の配列は許可されません。 | +{% admonition type="info" name="注記" %} +送金元が送金先に送金できるかどうかを確認する際に、送金先が事前承認した資格情報のセットと完全に一致しない資格情報のセットを提供した場合、送金は承認されません。この動作はトランザクション処理の動作と一致しています。 +{% /admonition %} ## レスポンスのフォーマット @@ -74,6 +84,10 @@ rippled deposit_authorized rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de rsUiUMpnrgxQp24dJY { "id": 1, "result": { + "credentials": [ + "A182EFBD154C9E80195082F86C1C8952FC0760A654B886F61BB0A59803B4387B", + "383D269D6C7417D0A8716B09F5DB329FB17B45A5EFDBAFB82FF04BC420DCF7D5" + ], "deposit_authorized": true, "destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", "ledger_hash": "BD03A10653ED9D77DCA859B7A735BF0580088A8F287FA2C5403E0A19C58EF322", @@ -91,6 +105,10 @@ rippled deposit_authorized rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de rsUiUMpnrgxQp24dJY ```json { "result": { + "credentials": [ + "A182EFBD154C9E80195082F86C1C8952FC0760A654B886F61BB0A59803B4387B", + "383D269D6C7417D0A8716B09F5DB329FB17B45A5EFDBAFB82FF04BC420DCF7D5" + ], "deposit_authorized": true, "destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", "ledger_hash": "BD03A10653ED9D77DCA859B7A735BF0580088A8F287FA2C5403E0A19C58EF322", @@ -110,6 +128,10 @@ Loading: "/etc/rippled.cfg" { "result" : { + "credentials": [ + "A182EFBD154C9E80195082F86C1C8952FC0760A654B886F61BB0A59803B4387B", + "383D269D6C7417D0A8716B09F5DB329FB17B45A5EFDBAFB82FF04BC420DCF7D5" + ], "deposit_authorized" : true, "destination_account" : "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", "ledger_hash" : "BD03A10653ED9D77DCA859B7A735BF0580088A8F287FA2C5403E0A19C58EF322", @@ -121,30 +143,34 @@ Loading: "/etc/rippled.cfg" } ``` {% /tab %} - {% /tabs %} このレスポンスは[標準フォーマット][]に従っており、正常に完了した場合は結果に次のフィールドが含まれます。 -| `Field` | 型 | 説明 | -|:-----------------------|:--------------------------|:------------------------| -| `deposit_authorized` | ブール値 | 指定の支払元アカウントから支払先アカウントへの直接送金が承認されているかどうか。`true`の場合、支払先アカウントで[Deposit Authorization](../../../../concepts/accounts/depositauth.md)を必要としていないか、または支払元アカウントが事前承認されています。 | -| `destination_account` | 文字列 - [アドレス][] | リクエストに指定されている宛先アカウント。 | -| `ledger_hash` | 文字列 | _(省略される場合があります)_ このレスポンスの生成に使用されたレジャーの識別用ハッシュ。 | -| `ledger_index` | 数値 - [レジャーインデックス][] | _(省略される場合があります)_ このレスポンスの生成に使用されたレジャーバージョンのレジャーインデックス。 | -| `ledger_current_index` | 数値 - [レジャーインデックス][] | _(省略される場合があります)_ このレスポンスの生成に使用された現在処理中のレジャーバージョンのレジャーインデックス。 | -| `source_account` | 文字列 - [アドレス][] | リクエストに指定されている支払元アカウント。 | -| `validated` | ブール値 | _(省略される場合があります)_`true`の場合、検証済みレジャーバージョンからの情報が取り込まれます。 | +| フィールド | 型 | 必須? | 説明 | +| :--------------------- | :------------------------------ | :---- | ---- | +| `credentials` | [ハッシュ][]の配列 | No | リクエストに指定されている資格情報のセット。 | +| `deposit_authorized` | 真偽値 | Yes | 指定の支払元アカウントが指定の支払先アカウントへの直接送金を承認されているかどうか。`true`の場合、支払先アカウントで[Deposit Authorization](../../../../concepts/accounts/depositauth.md)を必要としていないか、または支払元アカウントが事前承認されています。 | +| `destination_account` | 文字列 - [アドレス][] | Yes | リクエストに指定されている宛先アカウント。 | +| `ledger_hash` | 文字列 | No | このレスポンスの生成に使用されたレジャーの識別用ハッシュ。 | +| `ledger_index` | 数値 - [レジャーインデックス][] | No | このレスポンスの生成に使用されたレジャーバージョンのレジャーインデックス。 | +| `ledger_current_index` | 数値 - [レジャーインデックス][] | No | このレスポンスの生成に使用された現在処理中のレジャーバージョンのレジャーインデックス。 | +| `source_account` | 文字列 - [アドレス][] | Yes | リクエストに指定されている支払元アカウント。 | +| `validated` | 真偽値 | No | 検証済みレジャーバージョンからの情報が取り込まれます。 | -{% admonition type="info" name="注記" %}`deposit_authorized`ステータスが`true`でも、指定の支払元から指定の支払先への送金が可能であるとは保証されません。たとえば、支払先アカウントに指定通貨の[トラストライン](../../../../concepts/tokens/fungible-tokens/index.md)がない場合や、送金に十分な流動性がない場合があります。{% /admonition %} +{% admonition type="info" name="注記" %} +`deposit_authorized`ステータスが`true`でも、指定の支払元から指定の支払先への送金が可能であるとは保証されません。たとえば、支払先アカウントに指定通貨の[トラストライン](../../../../concepts/tokens/fungible-tokens/index.md)がない場合や、送金に十分な流動性がない場合があります。 +{% /admonition %} ## 考えられるエラー * いずれかの[汎用エラータイプ][]。 * `invalidParams` - 1つ以上のフィールドの指定が正しくないか、1つ以上の必須フィールドが指定されていません。 * `actMalformed` - リクエストの`source_account`フィールドまたは`destination_account`フィールドに指定されている[アドレス][]のフォーマットが適切ではありません。(入力ミスが含まれていたり、長さが正しくない場合は、チェックサムは失敗します。) +* `badCredentials` - 提供された資格情報の少なくとも1つが存在しない、期限切れである、または受け入れられていません。 * `dstActNotFound` - リクエストの`destination_account`フィールドがレジャーのアカウントに対応していません。 * `lgrNotFound` - `ledger_hash`または`ledger_index`で指定したレジャーが存在しないか、存在してはいるもののサーバが保有していません。 * `srcActNotFound` - リクエストの`source_account`フィールドがレジャーのアカウントに対応していません。 + {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/@l10n/ja/docs/references/protocol/ledger-data/ledger-entry-types/credential.md b/@l10n/ja/docs/references/protocol/ledger-data/ledger-entry-types/credential.md new file mode 100644 index 0000000000..697345ee21 --- /dev/null +++ b/@l10n/ja/docs/references/protocol/ledger-data/ledger-entry-types/credential.md @@ -0,0 +1,65 @@ +--- +seo: + description: 支払いの事前承認に使用できる、資格発行者アカウントによる対象アカウントについての証明。 +--- +# Credential + +`Credential`エントリは[資格情報](../../../../concepts/decentralized-storage/credentials.md)を表し、_対象(subject)_ アカウントについての _資格発行者(credential issuer)_ アカウントからの証明を含みます。この証明の意味は発行者によって定義されます。 + +## CredentialのJSONの例 + +```json +{ + "LedgerEntryType": "Credential", + "Flags": 65536, + "Subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "Issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "IssuerNode": "0000000000000000", + "CredentialType": "6D795F63726564656E7469616C", + "PreviousTxnID": "8089451B193AAD110ACED3D62BE79BB523658545E6EE8B7BB0BE573FED9BCBFB", + "PreviousTxnLgrSeq": 234644, + "SubjectNode": "0000000000000000", + "index": "A738A1E6E8505E1FC77BBB9FEF84FF9A9C609F2739E0F9573CDD6367100A0AA9" +} +``` + + + +## Credentialのフィールド + +[共通フィールド](../common-fields.md)に加えて、{% code-page-name /%}エントリには以下のフィールドがあります。 + +| フィールド | JSON型 | [内部の型][] | 必須? | 説明 | +| :------------------ | :-------------------- | :----------- | :----- | ---- | +| `CredentialType` | 文字列 - 16進数 | Blob | はい | このエントリが表す資格情報の種類を定義する任意のデータ。最小長は1バイトで最大長は64バイトです。 | +| `Expiration` | 数値 | UInt32 | いいえ | 資格情報が期限切れとなる時間([リップルエポックからの秒数][])。 | +| `Issuer` | 文字列 - [アドレス][] | AccountID | はい | この資格情報を発行したアカウント。 | +| `IssuerNode` | 文字列 | UInt64 | はい | ディレクトリが複数のページで構成される場合に、発行者のディレクトリのどのページがこのエントリにリンクしているかを示すヒント。 | +| `PreviousTxnID` | 文字列 - [ハッシュ][] | Hash256 | はい | このエントリを最後に変更したトランザクションの識別ハッシュ。 | +| `PreviousTxnLgrSeq` | 数値 | UInt32 | はい | このオブジェクトを最後に変更したトランザクションを含む[レジャーインデックス][Ledger Index]。 | +| `Subject` | 文字列 - [アドレス][] | AccountID | はい | この資格情報の対象となるアカウント。 | +| `SubjectNode` | 文字列 | UInt64 | はい | ディレクトリが複数のページで構成される場合に、対象の所有者ディレクトリのどのページがこのエントリにリンクしているかを示すヒント。 | +| `URI` | 文字列 - 16進数 | Blob | いいえ | 資格情報に関する任意の追加データ(例:W3C形式の検証可能な資格情報を取得できるURL)。 | + +## Credentialのフラグ + +Credentialエントリでは、`Flags`フィールドに以下のフラグを組み合わせることができます: + +| フラグ名 | 16進値 | 10進値 | 説明 | +| ------------- | ------------ | ------ | ---- | +| `lsfAccepted` | `0x00010000` | 65536 | 有効な場合、資格情報の対象者が資格情報を承認したことを示します。そうでない場合、発行者が資格情報を作成しましたが、対象者がまだ承認していないため、有効ではありません。 | + +## Credentialの準備金 + +資格情報エントリは、対象者が資格情報を承認している場合、対象アカウントの所有者準備金の1アイテムとしてカウントされます。そうでない場合、資格情報エントリは発行者アカウントの準備金の1アイテムとしてカウントされます。 + +## Credential IDのフォーマット + +Credentialエントリの一意のIDは、以下の値を順番に連結したもののSHA-512Halfハッシュです。 + +* `Credential`スペースキー(`0x0044`) +* `Subject`フィールドの値 +* `Issuer`フィールドの値 +* `CredentialType`フィールドの値 + +{% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/@l10n/ja/docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth.md b/@l10n/ja/docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth.md index 7a04f32500..e4640906a5 100644 --- a/@l10n/ja/docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth.md +++ b/@l10n/ja/docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth.md @@ -1,5 +1,5 @@ --- -html: depositpreauth-object.html #depositpreauth.html is taken by the tx type +html: depositpreauth-object.html parent: ledger-entry-types.html seo: description: 承認を必要とするアカウントへの送金ペイメントの事前承認の記録です。 @@ -9,12 +9,17 @@ labels: # DepositPreauth [[ソース]](https://github.com/XRPLF/rippled/blob/master/src/ripple/protocol/impl/LedgerFormats.cpp#L172-L178 "Source") -`DepositPreauth`オブジェクトはアカウント間の事前承認を追跡します。[DepositPreauthトランザクション][]によりこれらのオブジェクトが作成されます。 +`DepositPreauth`エントリは、1つのアカウントからの事前承認を追跡します。常に[DepositPreauthトランザクション][]を送信することで事前承認を作成できますが、[Deposit Authorization](../../../../concepts/accounts/depositauth.md)を使用していない限り、効果はありません。 -これは、事前承認を付与したアカウントに[Deposit Authorization](../../../../concepts/accounts/depositauth.md)が不要な場合は、トランザクションの処理に影響しません。その場合、事前承認されたアカウントから、事前承認を付与したアカウントに対して、支払やその他のトランザクションを直接送信できます。事前認証は一方向であり、反対方向の支払には影響しません。 +事前承認は、特定のアカウントからの送金を許可します。そのアカウントは、[Deposit Authorization](../../../../concepts/accounts/depositauth.md)を使用していない限り、あなたに直接送金できません。事前承認は一方向であり、反対方向の支払いには影響しません。 + +特定の _アカウント_ または _資格情報のセット_ を事前承認することができます。資格情報のセットの場合、レジャー上で一致する資格情報のセットを持つアカウントであれば、あなたに送金することができます。 _(資格情報による事前承認には[Credentials amendment][]が必要です。{% not-enabled /%})_ ## {% $frontmatter.seo.title %}のJSONの例 +{% tabs %} + +{% tab label="個別アカウントの事前承認" %} ```json { "LedgerEntryType" : "DepositPreauth", @@ -27,20 +32,55 @@ labels: "index" : "4A255038CC3ADCC1A9C91509279B59908251728D0DAADB248FFE297D0F7E068C" } ``` +{% /tab %} + +{% tab label="資格情報による事前承認" %} +```json +{ + "LedgerEntryType": "DepositPreauth", + "Account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "AuthorizeCredentials": [{ + "Credential": { + "Issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "CredentialType": "6D795F63726564656E7469616C" + } + }], + "Flags": 0, + "OwnerNode": "0000000000000000", + "PreviousTxnID": "FD2A4E9E317C7FEF112D22ADEB9E2C6DC3C2AB6E2AD96A50B76EBB9DEB39EA77", + "PreviousTxnLgrSeq": 7, + "index": "F2B8550ADF60FD268157262C1C54E1D1014BDEA361CE848B6F48556348327E5F" +} +``` +{% /tab %} +{% /tabs %} ## {% $frontmatter.seo.title %}のフィールド [共通フィールド][]に加えて、{% $frontmatter.seo.title %}エントリは以下のフィールドを使用します。 -| フィールド | JSONの型 | [内部の型][] | 必須? | 説明 | -|:--------------------|:---------|:-----------|:------|:---------| -| `Account` | 文字列 | Account | はい | 事前承認を付与したアカウント。(事前承認支払の宛先。) | -| `Authorize` | 文字列 | Account | はい | 事前承認を受けたアカウント。(事前承認支払の送金元。) | -| `LedgerEntryType` | 文字列 | UInt16 | はい | 値`0x0070`が文字列`DepositPreauth`にマッピングされている場合は、これがDepositPreauthオブジェクトであることを示します。 | -| `OwnerNode` | 文字列 | UInt64 | はい | 送金元アドレスの所有者のディレクトリが複数ページで構成されている場合に、このオブジェクトにリンクしているページを示すヒントです。**注記:** このオブジェクトには、オブジェクトを含む所有者ディレクトリへの直接リンクは含まれていません。これは、その値を`Account`から取得できるためです。 | -| `PreviousTxnID` | 文字列 | Hash256 | はい | 最後にこのオブジェクトを変更したトランザクションの識別用ハッシュ。 | -| `PreviousTxnLgrSeq` | 数値 | UInt32 | はい | 最後にこのオブジェクトを変更したトランザクションが記録された[レジャーインデックス][]。 | +| フィールド | JSONの型 | [内部の型][] | 必須? | 説明 | +| :--------------------- | :-------------------- | :----------- | :----- | ---- | +| `Account` | 文字列 | Account | はい | 事前承認を付与したアカウント。(事前承認支払の宛先) | +| `Authorize` | 文字列 | Account | いいえ | 事前承認を受けたアカウント。(事前承認支払の送金元) | +| `AuthorizeCredentials` | 配列 | Array | いいえ | 事前承認を受けた資格情報のセット。(これらの資格情報を持つアカウントは事前承認されます。)この配列の長さは最小1、最大8です。 | +| `LedgerEntryType` | 文字列 | UInt16 | はい | 値`0x0070`が文字列`DepositPreauth`にマッピングされている場合は、これがDepositPreauthオブジェクトであることを示します。 | +| `OwnerNode` | 文字列 | UInt64 | はい | 送金元アドレスの所有者のディレクトリが複数ページで構成されている場合に、このオブジェクトにリンクしているページを示すヒントです。**注記:** このオブジェクトには、オブジェクトを含む所有者ディレクトリへの直接リンクは含まれていません。これは、その値を`Account`から取得できるためです。 | +| `PreviousTxnID` | 文字列 - [ハッシュ][] | Hash256 | はい | このオブジェクトを最後に変更したトランザクションの識別用ハッシュ。 | +| `PreviousTxnLgrSeq` | 数値 | UInt32 | はい | このオブジェクトを最後に変更したトランザクションが記録された[レジャーインデックス][]。 | +各エントリには、`Authorize`フィールドまたは`AuthorizeCredentials`フィールドのいずれかが必要ですが、両方を持つことはできません。 + +### Authorized Credentialオブジェクト + +エントリに`AuthorizeCredentials`フィールドがある場合、その配列の各メンバは、以下の形式で1つの資格情報を識別する内部オブジェクトです。 + +| フィールド | JSONの型 | [内部の型][] | 必須? | 説明 | +| :--------------- | :-------------------- | :----------- | :---- | :----------------- | +| `Issuer` | 文字列 - [アドレス][] | AccountID | はい | 資格情報の発行者。 | +| `CredentialType` | 文字列 - 16進数 | Blob | はい | 資格情報の種類。 | + +アカウントは、指定されたすべての資格情報を保持している必要があります。 ## {% $frontmatter.seo.title %}のフラグ @@ -52,10 +92,23 @@ labels: ## DepositPreauth IDのフォーマット -`DepositPreauth`オブジェクトのIDは、以下の値がこの順序で連結されている[SHA-512ハーフ][]です。 +`DepositPreauth`エントリのIDは、承認するアカウントが1つの場合と、資格情報のセットが1つの場合で、以下の2つのフォーマットがあります。 -* DepositPreauthスペースキー(`0x0070`) -* このオブジェクトの所有者(このオブジェクトを作成した[DepositPreauthトランザクション][]の送信者、つまり事前承認を付与したユーザ)のAccountID。 -* 事前承認されたアカウント(このオブジェクトを作成した[DepositPreauthトランザクション][]の`Authorized`フィールド、つまり事前承認を受けたユーザ)のAccountID。 +### 個別アカウントの事前承認 + +この場合、IDは以下の値の[SHA-512Half][]です。 + +* DepositPreauthスペースキー(`0x0070`) +* このオブジェクトの所有者(このオブジェクトを作成した[DepositPreauthトランザクション][]の送信者、つまり事前承認を付与したユーザ)のAccountID +* `Authorize`フィールドのAccountID + +### 資格情報による事前承認 +_([Credentials amendment][]が必要です。 {% not-enabled /%})_ + +この場合、IDは以下の値の[SHA-512Half][]です。 + +* 資格情報による事前承認のスペースキー (`0x0050`) +* このオブジェクトの所有者(このオブジェクトを作成した[DepositPreauthトランザクション][]の送信者、つまり事前承認を付与したユーザ)のAccountID +* `AuthorizeCredentials`フィールドの内容 {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/@l10n/ja/docs/references/protocol/transactions/types/accountdelete.md b/@l10n/ja/docs/references/protocol/transactions/types/accountdelete.md index dab5e6d76b..805351d624 100644 --- a/@l10n/ja/docs/references/protocol/transactions/types/accountdelete.md +++ b/@l10n/ja/docs/references/protocol/transactions/types/accountdelete.md @@ -2,7 +2,7 @@ html: accountdelete.html parent: transaction-types.html seo: - description: Delete an account. + description: アカウントの削除 labels: - アカウント --- @@ -29,27 +29,28 @@ AccountDeleteトランザクションは、XRP Ledgerで[アカウント](../../ ``` {% raw-partial file="/@l10n/ja/docs/_snippets/tx-fields-intro.md" /%} - -| フィールド | JSONの型 | [内部の型][] | 説明 | -|:-----------------|:-----------------|:------------------|:-------------------| -| `Destination` | 文字列 - [アドレス][] | AccountID | 送金元アカウントを削除した後に残ったXRPを受信するアカウントのアドレス。レジャーの資金供給されたアカウントである必要があります。送金元アカウントにすることはできません。 | -| `DestinationTag` | 数値 | UInt32 | _(省略可)_ ホストされた受取人、または削除されたアカウントの残りのXRPの受取人に関するその他の情報を識別する任意の[宛先タグ](../../../../concepts/transactions/source-and-destination-tags.md)。 | + +| フィールド | JSONの型 | [内部の型][] | 必須? | 説明 | +| :--------------- | :-------------------- | :----------- | :----- | ---- | +| `CredentialIDs` | 文字列の配列 | Vector256 | いいえ | このトランザクションによる入金を承認する資格情報のセット。配列の各メンバーは、レジャー内のCredentialエントリのレジャーエントリIDでなければなりません。詳細については、[Credential ID](./payment.md#credential-ids)をご覧ください。 | +| `Destination` | 文字列 - [アドレス][] | AccountID | はい | 送金元アカウントを削除した後の残りのXRPを受け取るアカウントのアドレス。レジャー内の資金供給のあるアカウントでなければならず、送金元アカウントであってはいけません。 | +| `DestinationTag` | 数値 | UInt32 | いいえ | 削除されたアカウントの残りのXRPの受取人を識別する任意の[宛先タグ](../../../../concepts/transactions/source-and-destination-tags.md)、または受取人のその他の情報。 | ## エラーケース すべてのトランザクションで発生する可能性のあるエラーに加えて、{% $frontmatter.seo.title %}トランザクションでは、次の[トランザクション結果コード](../transaction-results/index.md)が発生する可能性があります。 -| エラーコード | 説明 | -|:-----------|:------------| -| `temDISABLED` | [DeletableAccounts Amendment](/resources/known-amendments.md#deletableaccounts)が有効でない場合に発生します。 | -| `temDST_IS_SRC` | `Destination`がトランザクションの送金元(`Account`フィールド)と一致している場合に発生します。 | -| `tecDST_TAG_NEEDED` | `Destination`アカウントに[宛先タグ](../../../../concepts/transactions/source-and-destination-tags.md)が必要であるのに、`DestinationTag`フィールドが指定されていない場合に発生します。 | -| `tecNO_DST` | `Destination`アカウントが、レジャーの資金供給のあるアカウントではない場合に発生します。 | -| `tecNO_PERMISSION` | `Destination`アカウントに[Deposit Authorization](../../../../concepts/accounts/depositauth.md)が必要で、送金元が事前に承認されていない場合に発生します。 | -| `tecTOO_SOON` | 送金元の`Sequence`番号が大きすぎる場合に発生します。トランザクションの`Sequence`番号に256を加えた値が、現行の[レジャーインデックス][]より小さい値でなければなりません。 | -| `tecHAS_OBLIGATIONS` | 削除するアカウントが、レジャーの削除できないオブジェクトに接続されている場合に発生します。([escrow](../../../../concepts/payment-types/escrow.md)など、他のアカウントによって作成されたオブジェクトが含まれます。) | -| `tefTOO_BIG` | 送金元アカウントが、レジャーの1,000個を超えるオブジェクトにリンクされている場合に発生します。これらのオブジェクトの一部が先行して個別に削除された場合、トランザクションは再試行で成功する可能性があります。 | +| エラーコード | 説明 | +| :------------------- | ---- | +| `temDISABLED` | [DeletableAccounts Amendment](/resources/known-amendments.md#deletableaccounts)が有効でない場合に発生します。 | +| `temDST_IS_SRC` | `Destination`がトランザクションの送金元(`Account`フィールド)と一致している場合に発生します。 | +| `tecDST_TAG_NEEDED` | `Destination`アカウントに[宛先タグ](../../../../concepts/transactions/source-and-destination-tags.md)が必要であるのに、`DestinationTag`フィールドが指定されていない場合に発生します。 | +| `tecNO_DST` | `Destination`アカウントが、レジャーの資金供給のあるアカウントではない場合に発生します。 | +| `tecNO_PERMISSION` | `Destination`アカウントに[Deposit Authorization](../../../../concepts/accounts/depositauth.md)が必要で、送金元が事前に承認されていない場合に発生します。 | +| `tecTOO_SOON` | 送金元の`Sequence`番号が大きすぎる場合に発生します。トランザクションの`Sequence`番号に256を加えた値が、現行の[レジャーインデックス][]より小さい値でなければなりません。 | +| `tecHAS_OBLIGATIONS` | 削除するアカウントが、レジャーの削除できないオブジェクトに接続されている場合に発生します。([escrow](../../../../concepts/payment-types/escrow.md)など、他のアカウントによって作成されたオブジェクトが含まれます。) | +| `tefTOO_BIG` | 送金元アカウントが、レジャーの1,000個を超えるオブジェクトにリンクされている場合に発生します。これらのオブジェクトの一部が先行して個別に削除された場合、トランザクションは再試行で成功する可能性があります。 | {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/@l10n/ja/docs/references/protocol/transactions/types/credentialaccept.md b/@l10n/ja/docs/references/protocol/transactions/types/credentialaccept.md new file mode 100644 index 0000000000..e4f8f6163e --- /dev/null +++ b/@l10n/ja/docs/references/protocol/transactions/types/credentialaccept.md @@ -0,0 +1,49 @@ +--- +seo: + description: アカウントに仮発行された資格情報を承認します。 +--- +# CredentialAccept + +CredentialAcceptトランザクションは資格情報を承認し、その資格情報を有効にします。資格情報の対象者のみがこの操作を実行できます。 + +## CredentialAccept JSONの例 + +```json +{ + "TransactionType" : "CredentialAccept", + "Account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "Issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "CredentialType": "6D795F63726564656E7469616C", + "Fee": "10", + "Flags": 0, + "Sequence": 234203 +} +``` + + +## CredentialAcceptのフィールド + +[共通フィールド][]に加えて、CredentialAcceptトランザクションは以下のフィールドを使用します。 + +| フィールド | JSONの型 | [内部の型][] | 必須? | 説明 | +| :--------------- | :-------------------- | :---------------- | :----- | ---- | +| `Issuer` | 文字列 - [アドレス][] | AccountID | はい | 資格情報を作成した発行者のアドレス。 | +| `CredentialType` | 文字列 | Blob | はい | 資格情報の種類を定義する任意のデータ。最小サイズは1バイト、最大は64バイトです。 | + +`Account`フィールド(このトランザクションの送信者)は、資格情報の対象者でなければなりません。 + +`Account`、`Issuer`、`CredentialType`の組み合わせは、レジャー上に存在し、まだ承認されていない`Credential`レジャーエントリと一致する必要があります。一致しない場合、トランザクションは失敗します。 + + +## エラーケース + +| エラーコード | 説明 | +| :---------------------- | ---- | +| `tecDUPLICATE` | 指定された資格情報は既に承認されています。 | +| `tecEXPIRED` | 指定された資格情報の有効期限が過去の時点になっています。(この場合、トランザクションは期限切れの資格情報をレジャーから削除します。) | +| `tecNO_ENTRY` | トランザクションの`Account`、`Issuer`、`CredentialType`フィールドで一意に識別される資格情報がレジャー上に存在しません。 | +| `temDISABLED` | 関連するAmendmentが有効になっていません。 | +| `temINVALID_ACCOUNT_ID` | 提供された`Issuer`フィールドが無効です。例えば、[ACCOUNT_ZERO](../../../../concepts/accounts/addresses.md#特別なアドレス)が含まれている場合など。 | + + +{% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/@l10n/ja/docs/references/protocol/transactions/types/credentialcreate.md b/@l10n/ja/docs/references/protocol/transactions/types/credentialcreate.md new file mode 100644 index 0000000000..eac5d58b77 --- /dev/null +++ b/@l10n/ja/docs/references/protocol/transactions/types/credentialcreate.md @@ -0,0 +1,51 @@ +--- +seo: + description: アカウントに対して暫定的に資格情報を発行します。 +--- + +# CredentialCreate + +CredentialCreateトランザクションは、レジャーにCredentialを作成します。Credential(資格情報)の発行者はこのトランザクションを使用して、暫定的に資格情報を発行します。Credentialは、その対象アカウントが[CredentialAcceptトランザクション][]で承認するまで有効になりません。 + +## CredentialCreate JSONの例 + +```json +{ + "TransactionType" : "CredentialCreate", + "Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "Subject": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "CredentialType": "6D795F63726564656E7469616C", + "Fee": "10", + "Flags": 0, + "Sequence": 234200 +} +``` + + +## CredentialCreateのフィールド + +[共通フィールド][]に加えて、CredentialCreateトランザクションは以下のフィールドを使用します。 + +| フィールド | JSON型 | [内部の型][] | 必須? | 説明 | +| :--------------- | :-------------------- | :----------- | :----- | ---- | +| `Subject` | 文字列 - [アドレス][] | AccountID | はい | 資格情報の対象アカウント。 | +| `CredentialType` | 文字列 - 16進数 | Blob | はい | このエントリが表す資格情報の種類を定義する任意のデータ。最小長は1バイトで、最大長は64バイトです。 | +| `Expiration` | 数値 | UInt32 | いいえ | この資格情報が期限切れとみなされる時間([リップルエポックからの秒数][])。 | +| `URI` | 文字列 | Blob | いいえ | 関連する検証可能な資格情報ドキュメントを参照できるURLなど、資格情報に関する任意の追加データ。存在する場合、最小長は1バイトで最大は256バイトです。 | + +トランザクションの`Account`フィールド(送信者)は、資格情報の発行者です。発行者と対象(Subject)アカウントは同じアカウントでも構いません。 + +## エラーケース + +すべてのトランザクションで発生する可能性のあるエラーの他に、CredentialCreateトランザクションでは以下の[トランザクション結果コード](../transaction-results/index.md)が発生する可能性があります。 + +| エラーコード | 説明 | +| :---------------------- | ---- | +| `tecDUPLICATE` | 同じSubject、Issuer、およびCredentialTypeを持つCredentialがすでに存在しています。 | +| `tecEXPIRED` | Credentialの有効期限に過去の日時が設定されています。 | +| `tecNO_TARGET` | `Subject`フィールドで指定されたアカウントはレジャーで資金提供されているアカウントではありません。 | +| `temDISABLED` | 関連するAmendmentが有効になっていません。 | +| `temINVALID_ACCOUNT_ID` | 提供された`Subject`フィールドが無効です。例えば、[ACCOUNT_ZERO](../../../../concepts/accounts/addresses.md#特別なアドレス)が含まれている場合です。 | + + +{% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/@l10n/ja/docs/references/protocol/transactions/types/credentialdelete.md b/@l10n/ja/docs/references/protocol/transactions/types/credentialdelete.md new file mode 100644 index 0000000000..7896b94802 --- /dev/null +++ b/@l10n/ja/docs/references/protocol/transactions/types/credentialdelete.md @@ -0,0 +1,51 @@ +--- +seo: + description: レジャーから認証情報を削除し、事実上失効させます。 +--- +# CredentialDelete + +CredentialDeleteトランザクションは、レジャーから認証情報を削除し、事実上失効させます。ユーザは[準備金要件](../../../../concepts/accounts/reserves.md)を調整するために、不要な資格情報を削除することもできます。 + + +## CredentialDelete JSONの例 + +```json +{ + "TransactionType" : "CredentialDelete", + "Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "Subject": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", + "CredentialType": "6D795F63726564656E7469616C", + "Fee": "10", + "Flags": 0, + "Sequence": 234203 +} +``` + + +## CredentialDeleteのフィールド + + +[共通フィールド][]に加えて、CredentialDeleteトランザクションは以下のフィールドを使用します。 + +| フィールド | JSON型 | [内部の型][] | 必須? | 説明 | +| :--------------- | :-------------------- | :----------- | :----- | ---- | +| `CredentialType` | 文字列 - 16進数 | Blob | はい | 削除する資格情報の種類を定義する任意のデータ。最小長は1バイトで、最大長は256バイトです。 | +| `Subject` | 文字列 - [アドレス][] | AccountID | いいえ | 削除する資格情報の対象者。省略された場合、`Account`(トランザクションの送信者)を資格情報の対象者として使用します。 | +| `Issuer` | 文字列 - [アドレス][] | AccountID | いいえ | 削除する資格情報の発行者。省略された場合、`Account`(トランザクションの送信者)を資格情報の発行者として使用します。 | + +`Subject`フィールド、`Issuer`フィールド、またはその両方を指定する必要があります。 + +このトランザクションは、指定された対象者、発行者、および資格情報の種類を持つ[Credentialレジャーエントリ](../../ledger-data/ledger-entry-types/credential.md)を探し、トランザクションの送信者に権限がある場合にそのエントリを削除します。資格情報の保持者または発行者は、いつでもそれを削除できます。資格情報が期限切れの場合、誰でも削除できます。 + + +## エラーケース + +| エラーコード | 説明 | +| :---------------------- | ---- | +| `temDISABLED` | 関連するAmendmentが有効になっていません。 | +| `temINVALID_ACCOUNT_ID` | 提供された`Subject`または`Issuer`フィールドが無効です。例えば、[ACCOUNT_ZERO](../../../../concepts/accounts/addresses.md#特別なアドレス)が含まれている場合です。 | +| `tecNO_PERMISSION` | 送信者が資格情報の発行者でも対象者でもなく、資格情報が期限切れでもありません。 | +| `tecNO_ENTRY` | 指定された資格情報がレジャーに存在しません。 | + + +{% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/@l10n/ja/docs/references/protocol/transactions/types/depositpreauth.md b/@l10n/ja/docs/references/protocol/transactions/types/depositpreauth.md index 43693f05e0..53f4b778b8 100644 --- a/@l10n/ja/docs/references/protocol/transactions/types/depositpreauth.md +++ b/@l10n/ja/docs/references/protocol/transactions/types/depositpreauth.md @@ -11,40 +11,83 @@ labels: _[DepositPreauth Amendment][]により追加されました。_ -DepositPreauthトランザクションは別のアカウントに対し、このトランザクションの送信者に支払いを送金することを事前承認します。これは、このトランザクションの送信者が[Deposit Authorization](../../../../concepts/accounts/depositauth.md)を使用している(または使用する予定がある)場合にのみ有用です。 +DepositPreauthトランザクションは、あなたのアカウントへの支払いを送金するための事前承認を付与します。これは、あなたが[Deposit Authorization](../../../../concepts/accounts/depositauth.md)を使用している(または使用する予定がある)場合にのみ有用です。 -{% admonition type="success" name="ヒント" %}このトランザクションを使用して、Deposit Authorizationを有効にする前に特定の取引相手を事前承認できます。これは、Deposit Authorizationの義務化への円滑な移行に役立ちます。{% /admonition %} +{% admonition type="success" name="ヒント" %}このトランザクションを使用して、Deposit Authorizationを有効にする前に事前承認できます。これは、Deposit Authorizationの義務化への円滑な移行に役立ちます。{% /admonition %} ## {% $frontmatter.seo.title %} JSONの例 +{% tabs %} + +{% tab label="個別アカウントの事前承認" %} ```json { - "TransactionType" : "DepositPreauth", - "Account" : "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", - "Authorize" : "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de", - "Fee" : "10", - "Flags" : 2147483648, - "Sequence" : 2 + "TransactionType" : "DepositPreauth", + "Account" : "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "Authorize" : "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de", + "Fee" : "10", + "Flags" : 2147483648, + "Sequence" : 2 } ``` +{% /tab %} + +{% tab label="資格情報による事前承認" %} +```json +{ + "TransactionType" : "DepositPreauth", + "Account" : "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8", + "AuthorizeCredentials": [{ + "Credential": { + "Issuer": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", + "CredentialType": "6D795F63726564656E7469616C" + } + }], + "Fee" : "10", + "Flags": 0, + "Sequence": 230984 +} +``` +{% /tab %} +{% /tabs %} + +[トランザクションを試してみる >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fxrplcluster.com%2F&req=%7B%22id%22%3A%22example_DepositPreauth%22%2C%22command%22%3A%22tx%22%2C%22transaction%22%3A%22CB1BF910C93D050254C049E9003DA1A265C107E0C8DE4A7CFF55FADFD39D5656%22%2C%22binary%22%3Afalse%7D) {% raw-partial file="/@l10n/ja/docs/_snippets/tx-fields-intro.md" /%} - + +| フィールド | JSONの型 | [内部の型][] | 必須? | 説明 | +| :----------------------- | :-------------------- | :----------- | :----- | ---- | +| `Authorize` | 文字列 - [アドレス][] | AccountID | いいえ | 事前承認するアカウント。 | +| `AuthorizeCredentials` | 配列 | STArray | いいえ | 承認する資格証明書のセット。 _([Credentials amendment][]が必要です。 {% not-enabled /%})_ | +| `Unauthorize` | 文字列 | AccountID | いいえ | 事前承認を取り消すアカウント。 | +| `UnauthorizeCredentials` | 配列 | STArray | いいえ | 事前承認を取り消す資格証明書のセット。 _([Credentials amendment][]が必要です。 {% not-enabled /%})_ | + +`Authorize`, `AuthorizeCredentials`, `Unauthorize`, or `UnauthorizeCredentials`の**いずれか**を提供する必要があります。 + +このトランザクションが成功すると、提供されたフィールドに基づいて、[DepositPreauthエントリ](../../ledger-data/ledger-entry-types/depositpreauth.md)が作成または削除されます。 -| フィールド | JSONの型 | [内部の型][] | 説明 | -|:--------------|:----------|:------------------|:-----| -| `Authorize` | 文字列 | AccountID | _(省略可)_ 事前承認する送信者のXRP Ledgerアドレス。 | -| `Unauthorize` | 文字列 | AccountID | _(省略可)_ 事前承認を取り消す必要がある送信者のXRP Ledgerアドレス。 | +### AuthorizeCredentialsオブジェクト -`Authorize`または`Unauthorize`_のいずれか_ を指定する必要がありますが、両方は指定しないでください。 +提供される場合、`AuthorizeCredentials`フィールドまたは`UnauthorizeCredentials`フィールドの各メンバーは、次のフィールドを持つ内部オブジェクトでなければなりません。 -このトランザクションには以下の制限があります。 +| フィールド | JSONの型 | [内部の型][] | 必須? | 説明 | +| :--------------- | :-------------------- | :----------- | :---- | :------------------- | +| `Issuer` | 文字列 - [アドレス][] | AccountID | はい | 資格証明書の発行者。 | +| `CredentialType` | 文字列 - 16進数値 | Blob | はい | 資格証明書のタイプ。 | -- アカウントはそのアカウント自体のアドレスを事前承認(または承認解除)できません。このような操作をすると、[`temCANNOT_PREAUTH_SELF`](../transaction-results/tem-codes.md)で失敗します。 -- すでに事前承認済みのアカウントを事前承認しようとすると、[`tecDUPLICATE`](../transaction-results/tec-codes.md)で失敗します。 -- 事前承認されていないアカウントを承認解除しようとすると、[`tecNO_ENTRY`](../transaction-results/tec-codes.md)で失敗します。 -- レジャーで資金が供給されていないアドレスを事前承認しようとすると、[`tecNO_TARGET`](../transaction-results/tec-codes.md)で失敗します。 -- 承認を追加すると[DepositPreauthオブジェクト](../../ledger-data/ledger-entry-types/depositpreauth.md)がレジャーに追加されて、[所有者の必要準備金](../../../../concepts/accounts/reserves.md#所有者準備金)に反映されます。トランザクションの送信者に、増額された準備金の支払いに十分なXRPがない場合、トランザクションは[`tecINSUFFICIENT_RESERVE`](../transaction-results/tec-codes.md)で失敗します。アカウントの送信者の所有オブジェクトが最大数に達している場合、トランザクションは[`tecDIR_FULL`](../transaction-results/tec-codes.md)で失敗します。 +## エラーケース + +すべてのトランザクションで発生する可能性のあるエラータイプに加えて、DepositPreauthトランザクションは次のエラーコードを生成することがあります。 + +| エラーコード | 説明 | +| :------------------------ | ---- | +| `tecDUPLICATE` | トランザクションはすでに存在する事前承認を作成します。 | +| `tecINSUFFICIENT_RESERVE` | 送信者は[準備金要件](../../../../concepts/accounts/reserves.md)を満たしていません。(DepositPreauthエントリは承認者の所有者準備金に1つのアイテムとしてカウントされます。) | +| `tecNO_ENTRY` | トランザクションは存在しない事前承認を取り消そうとしました。 | +| `tecNO_ISSUER` | 指定された資格証明書発行者の1つ以上がレジャーに存在しません。 | +| `tecNO_TARGET` | トランザクションは、レジャーの資金提供アカウントではないアカウントを承認しようとしました。 | +| `temCANNOT_PREAUTH_SELF` | `Authorize`フィールドのアドレスはトランザクションの送信者です。自分自身を事前承認することはできません。 | +| `temDISABLED` | 必要なAmendmentが有効になっていません。 | {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/@l10n/ja/docs/references/protocol/transactions/types/escrowfinish.md b/@l10n/ja/docs/references/protocol/transactions/types/escrowfinish.md index 0ad4007e26..aac76c5efd 100644 --- a/@l10n/ja/docs/references/protocol/transactions/types/escrowfinish.md +++ b/@l10n/ja/docs/references/protocol/transactions/types/escrowfinish.md @@ -2,7 +2,7 @@ html: escrowfinish.html parent: transaction-types.html seo: - description: 保留中の支払いから受取人へXRPを送金します。 + description: エスクローされたXRPを受取人へ送金します。 labels: - Escrow --- @@ -10,9 +10,9 @@ labels: [[ソース]](https://github.com/XRPLF/rippled/blob/master/src/ripple/app/tx/impl/Escrow.cpp "Source") -_[Escrow Amendment][]により追加されました。_ +エスクロー(保留中の支払い)から受取人へXRPを送金します。 -保留中の支払いから受取人へXRPを送金します。 +_[Escrow Amendment][]により追加されました。_ ## {% $frontmatter.seo.title %} JSONの例 @@ -28,24 +28,24 @@ _[Escrow Amendment][]により追加されました。_ ``` {% raw-partial file="/@l10n/ja/docs/_snippets/tx-fields-intro.md" /%} - -| フィールド | JSONの型 | [内部の型][] | 説明 | -|:----------------|:-----------------|:------------------|:--------------------| -| `Owner` | 文字列 | AccountID | 保留中の支払いに資金を供給した支払元アカウントのアドレス。 | -| `OfferSequence` | 符号なし整数 | UInt32 | 終了する保留中の支払いを作成した[EscrowCreateトランザクション][]のトランザクションシーケンス。 | -| `Condition` | 文字列 | Blob | _(省略可)_ 以前に指定された保留中の支払いの[PREIMAGE-SHA-256 Crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1)に一致する16進数値。 | -| `Fulfillment` | 文字列 | Blob | _(省略可)_ 保留中の支払いの`Condition`に一致する[PREIMAGE-SHA-256 Crypto-condition fulfillment](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1.4)の16進数値。 | +| フィールド | JSONの型 | [内部の型][] | 必須? | 説明 | +| :-------------- | :----------- | :----------- | :----- | ---- | +| `Owner` | 文字列 | AccountID | はい | エスクローに資金を供給した支払元アカウントのアドレス。 | +| `OfferSequence` | 数値 | UInt32 | はい | 対象となるエスクローを作成した[EscrowCreateトランザクション][]のトランザクションシーケンス。 | +| `Condition` | 文字列 | Blob | いいえ | 以前に指定されたエスクローの[PREIMAGE-SHA-256 Crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1)に一致する16進数値。 | +| `CredentialIDs` | 文字列の配列 | Vector256 | いいえ | このトランザクションによって作成されたエスクローによる資金提供を承認する資格証明書のセット。各配列のメンバーは、レジャーの資格証明書エントリのレジャーエントリIDでなければなりません。詳細については、[Credential ID](./payment.md#credential-ids)をご覧ください。 | +| `Fulfillment` | 文字列 | Blob | いいえ | エスクローの`Condition`に一致する[PREIMAGE-SHA-256 crypto-condition fulfillment](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1.4)の16進数値。 | すべてのアカウントがEscrowFinishトランザクションを送信できます。 -- 保留中の支払いに`FinishAfter`時刻が設定されている場合、この時刻よりも前にはこれを実行できません。具体的には、対応する[EscrowCreateトランザクション][]で指定されている`FinishAfter`時刻が、最後に閉鎖されたレジャーの閉鎖時刻よりも後の場合、EscrowFinishトランザクションは失敗します。 -- 保留中の支払いに`Condition`が指定されている場合に、その条件に対応する`Fulfillment`を指定しないと、この支払いを実行できません。 -- 有効期限切れの保留中の支払いは実行できません。具体的には、対応する[EscrowCreateトランザクション][]で指定されている`CancelAfter`時刻が、最後に閉鎖されたレジャーの閉鎖時刻よりも前の場合、EscrowFinishトランザクションは失敗します。 +- エスクローに`FinishAfter`時刻が設定されている場合、この時刻よりも前にはこれを実行(Finish)できません。具体的には、対応する[EscrowCreateトランザクション][]で指定されている`FinishAfter`時刻が、最後に閉鎖されたレジャーの閉鎖時刻よりも後の場合、EscrowFinishトランザクションは失敗します。 +- エスクローに`Condition`が指定されている場合に、その条件に対応する`Fulfillment`を指定しないと、この支払いを実行(Finish)できません。 +- 有効期限切れのエスクローは実行(Finish)できません。具体的には、対応する[EscrowCreateトランザクション][]で指定されている`CancelAfter`時刻が、最後に閉鎖されたレジャーの閉鎖時刻よりも前の場合、EscrowFinishトランザクションは失敗します。 {% admonition type="info" name="注記" %}EscrowFinishトランザクションにフルフィルメントが含まれている場合、このトランザクションを送信するための最小[トランザクションコスト](../../../../concepts/transactions/transaction-cost.md)が増加します。トランザクションにフルフィルメントが含まれていない場合、トランザクションコストは標準の10 dropです。トランザクションにフルフィルメントが含まれている場合、トランザクションコストは330 [XRP drop][XRPのdrop数]に加えて、プリイメージサイズの16バイトごとに更に10 dropです。{% /admonition %} -[本番環境以外のネットワーク](../../../../concepts/networks-and-servers/parallel-networks.md)では、保留中のescrowの送金先アカウントを[削除](../../../../concepts/accounts/deleting-accounts.md)できる場合があります。この場合、 escrowを終了しようとしても結果`tecNO_TARGET`で失敗しますが、 escrowオブジェクトは通常期限切れになる場合を除き、維持されます。別の支払いで送金先アカウントが再作成された場合、 escrowは正常に終了できます。escrowの送金先アカウントは、[fix1523 Amendment](/resources/known-amendments.md#fix1523)が有効になる前にescrowが作成された場合にのみ削除できます。本番環境の XRP Ledgerにはそのようなescrowは存在しないため、本番環境のXRP Ledgerではこのようなエッジケースには対応できません。また、このエッジケースは、fix1523とescrowのAmendmentを同時に有効にするテストネットワークでも不可能です。これは、[新しいジェネシスレジャーを開始](../../../../infrastructure/testing-and-auditing/start-a-new-genesis-ledger-in-stand-alone-mode.md)するときのデフォルトです。 +[本番環境以外のネットワーク](../../../../concepts/networks-and-servers/parallel-networks.md)では、Escrowの送金先アカウントを[削除](../../../../concepts/accounts/deleting-accounts.md)できる場合があります。この場合、 Escrowを終了しようとしても結果`tecNO_TARGET`で失敗しますが、Escrowオブジェクトは通常期限切れになる場合を除き、維持されます。別の支払いで送金先アカウントが再作成された場合、 Escrowは正常に終了できます。Escrowの送金先アカウントは、[fix1523 Amendment](/resources/known-amendments.md#fix1523)が有効になる前にEscrowが作成された場合にのみ削除できます。本番環境の XRP LedgerにはそのようなEscrowは存在しないため、本番環境のXRP Ledgerではこのようなエッジケースには対応できません。また、このエッジケースは、fix1523とEscrowのAmendmentを同時に有効にするテストネットワークでも不可能です。これは、[新しいジェネシスレジャーを開始](../../../../infrastructure/testing-and-auditing/start-a-new-genesis-ledger-in-stand-alone-mode.md)するときのデフォルトです。 {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/@l10n/ja/docs/references/protocol/transactions/types/payment.md b/@l10n/ja/docs/references/protocol/transactions/types/payment.md index f84f838883..0dfbcff0ca 100644 --- a/@l10n/ja/docs/references/protocol/transactions/types/payment.md +++ b/@l10n/ja/docs/references/protocol/transactions/types/payment.md @@ -34,15 +34,16 @@ Paymentは、[アカウントを作成](#アカウントの作成)する唯一 } ``` -[Query example transaction. >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fxrplcluster.com%2F&req=%7B%22id%22%3A%22example_Payment%22%2C%22command%22%3A%22tx%22%2C%22transaction%22%3A%227BF105CFE4EFE78ADB63FE4E03A851440551FE189FD4B51CAAD9279C9F534F0E%22%2C%22binary%22%3Afalse%7D) +[トランザクションを取得してみる >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fxrplcluster.com%2F&req=%7B%22id%22%3A%22example_Payment%22%2C%22command%22%3A%22tx%22%2C%22transaction%22%3A%227BF105CFE4EFE78ADB63FE4E03A851440551FE189FD4B51CAAD9279C9F534F0E%22%2C%22binary%22%3Afalse%7D) {% raw-partial file="/@l10n/ja/docs/_snippets/tx-fields-intro.md" /%} - + | フィールド | JSONの型 | [内部の型][] | 説明 | |:---------------|:--------------|:------------------|:-----------------| | `Amount` | [通貨額][] | Amount | 送金する通貨額。XRP以外の金額の場合、入れ子フィールドの名前では、アルファベットの小文字のみ使用してください。[**tfPartialPayment**フラグ](#paymentのフラグ)が設定されている場合は、この金額を _上限_ とする金額を送金します。 | +| `CredentialIDs` | 文字列の配列 | Vector256 | いいえ | このトランザクションによって作成される入金を承認するための、受取人によって事前承認された資格証明のセット。配列の各メンバは、レジャーのCredentialエントリのレジャーエントリIDでなければなりません。(_[**Credentials** amendment](../../../../concepts/amendments/index.md#credentials)が必要です。_ {% not-enabled /%}) | | `Destination` | 文字列 | AccountID | 支払いを受取るアカウントの一意アドレス。 | | `DestinationTag` | 数値 | UInt32 | _(省略可)_ 宛先(支払先となる、ホスティングされている受取人)への支払い理由を明確にするための任意のタグ。 | | `InvoiceID` | 文字列 | Hash256 | _(省略可)_ この支払いの具体的な理由または識別子を表現する任意の256ビットハッシュ。 | @@ -50,6 +51,7 @@ Paymentは、[アカウントを作成](#アカウントの作成)する唯一 | `SendMax` | [通貨額][] | Amount | _(省略可)_ [送金手数料](../../../../concepts/tokens/transfer-fees.md)、為替レート、[スリッページ](http://en.wikipedia.org/wiki/Slippage_%28finance%29)を含め、このトランザクションに関して支払い元通貨での負担を許容する上限額。[トランザクションの送信コストとして消却されるXRP](../../../../concepts/transactions/transaction-cost.md)は含めないでください。XRP以外の金額の場合、入れ子フィールドの名前では、アルファベットの小文字のみ使用してください。クロスカレンシー支払いまたは複数のトークンを伴う支払いについては、このフィールドを入力する必要があります。XRP間の支払いでは省略する必要があります。 | | `DeliverMin` | [通貨額][] | Amount | _(省略可)_ このトランザクションで送金する、宛先通貨での最少金額。[Partial Payments](../../../../concepts/payment-types/partial-payments.md)の場合のみ有効になります。XRP以外の金額の場合、入れ子フィールドの名前では、アルファベットの小文字のみ使用してください。 | +トランザクションを指定する際は、`Amount`または`DeliverMax`のいずれかを指定する必要がありますが、両方を指定することはできません。JSONでトランザクションを表示する場合、API v1では常に`Amount`を使用し、API v2(以降)では常に`DeliverMax`を使用します。 ## Paymentの種類 @@ -83,7 +85,7 @@ Paymentトランザクションタイプは、いくつかの異なるタイプ Payment型のトランザクションでは、資金供給のないアドレスに対して十分なXRPを送金することで、XRP Ledgerに新規のアカウントを作成できます。資金供給のないアドレスに対するその他のトランザクションは、常に失敗します。 -詳細は、[アカウント](../../../../concepts/accounts/index.md#アカウントの作成)をご覧ください。 +詳細は、[アカウントの作成](../../../../concepts/accounts/index.md#アカウントの作成)をご覧ください。 ## パス @@ -112,7 +114,7 @@ Payment型のトランザクションについては、[`Flags`フィールド]( ## Partial Payments -Partial Paymentsを利用すると、受取られる金額を減額することによって、支払いを成功させることができます。Partial Paymentsが有用なのは、追加的なコストを発生させずに[支払いを返金](../../../../concepts/payment-types/bouncing-payments.md)する場合です。その一方で、成功したトランザクションの`Amount`フィールドに、送金された金額が常に正しく記述されていることを前提としている環境において、悪用されるおそれもあります。 +Partial Paymentsを利用すると、受取られる金額を減額することによって、支払いを成功させることができます。Partial Paymentsが有用なのは、追加的なコストを発生させずに[支払いを返金](../../../../concepts/payment-types/bouncing-payments.md)する場合です。その一方で、成功したトランザクションの`Amount`フィールドに、送金された金額が常に正しく記述されていることを前提としている環境において、悪用されるおそれもあります。これらの理由から、API v2以降では、`Amount`フィールドの名前を`DeliverMax`に変更しました。 Partial Paymentsとは、**tfPartialPayment**フラグが有効になっている[Paymentトランザクション][]です。Partial Paymentsは、`SendMax`値を超える金額を送金することなく、`DeliverMin`フィールド以上の正の金額(`DeliverMin`が指定されていない場合、任意の正の金額)を送金する場合に成功します。 @@ -137,4 +139,21 @@ tfLimitQualityフラグが最も有用となるのは、[Partial Payments](../.. 95人民元/15米ドルのオファーと5人民元/2米ドルのオファーがある上の例で、トランザクションに関してtfPartialPaymentとtfLimitQualityの両方が有効になっている場合、状況は異なります。20米ドルの`SendMax`および100人民元の宛先`Amount`を維持する場合も、クオリティの制限は`5`です。ただし、実行しようとするのはPartial Paymentsであるため、宛先に対する送金の全額を一度で送金できない場合、トランザクションを失敗とするのではなく、送金可能な最大限の金額が送金されます。つまり、トランザクションでは、クオリティが約`6.3`である95人民元/15米ドルのオファーは受け入れますが、5人民元/2米ドルのオファーはクオリティが`2.5`であり、クオリティの制限の`5`より低いため、拒否します。最終的に、トランザクションで送金されるのは満額の100人民元ではなく95人民元になりますが、不利な為替レートで資金を浪費することを避けられます。 +## Credential ID + +[Deposit Authorization](../../../../concepts/accounts/depositauth.md)を使用しているアカウントに対して、受取人によって事前承認された資格証明のセットを`CredentialIDs`フィールドで提供することで、そのアカウントに対して送金することができます。資格証明のセットは、[DepositPreauthエントリ](../../ledger-data/ledger-entry-types/depositpreauth.md)と一致していなければなりません。 + +`CredentialIDs`フィールドで提供された資格証明はすべて有効である必要があります。つまり、以下の条件をすべて満たしている必要があります。 + +- 提供された資格証明は存在している必要があります。 +- 提供された資格証明は、受取人によって承認されている必要があります。 +- 提供された資格証明は、期限切れではない必要があります。 +- このトランザクションの送信者は、提供された資格証明のすべての受取人である必要があります。 + +提供された資格証明が、Deposit Authorizationを使用していないアカウントに対して提供されている場合、資格証明は不要ですが、有効性は依然としてチェックされます。 + +### 準備金を下回るアカウントに対する特別な送金のケース + +Deposit Authorizationを使用しているアカウントが、そのアカウントの現在のXRP残高が[準備金要件](../../../../concepts/accounts/reserves.md)よりも少ない場合、Deposit Authorizationには、誰でもPaymentトランザクションを送信できる特別な例外があります。これは、アカウントが「取引できない」状態になるのを防ぐための緊急措置です。この特別なケースに該当するには、`CredentialIDs`フィールドを使用してはいけません。 + {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/@l10n/ja/docs/references/protocol/transactions/types/paymentchannelclaim.md b/@l10n/ja/docs/references/protocol/transactions/types/paymentchannelclaim.md index ade067e285..1b0d08cfd3 100644 --- a/@l10n/ja/docs/references/protocol/transactions/types/paymentchannelclaim.md +++ b/@l10n/ja/docs/references/protocol/transactions/types/paymentchannelclaim.md @@ -41,30 +41,32 @@ Channelの**宛先アドレス**は以下の操作を実行できます。 } ``` +[トランザクションを取得してみる >](/resources/dev-tools/websocket-api-tool?server=wss%3A%2F%2Fxrplcluster.com%2F&req=%7B%22id%22%3A%22example_PaymentChannelClaim%22%2C%22command%22%3A%22tx%22%2C%22transaction%22%3A%229C0CAAC3DD1A74461132DA4451F9E53BDF4C93DFDBEFCE1B10021EC569013B33%22%2C%22binary%22%3Afalse%7D) + {% raw-partial file="/@l10n/ja/docs/_snippets/tx-fields-intro.md" /%} - -| フィールド | JSONの型 | [内部の型][] | 説明 | -|:------------|:----------|:------------------|:-------------------------------| -| `Channel` | 文字列 | Hash256 | Channelの一意のID(64文字の16進文字列)。 | -| `Balance` | 文字列 | Amount | _(省略可)_ このクレームの処理後にこのChannelから送金される[XRP、drop単位][通貨額]。XRPを送金する場合に必須です。Channelからこれまでに送金された総額よりも大きく、署名済みクレームの`Amount`よりも少ない額である必要があります。Channelを閉鎖する場合を除き、指定する必要があります。 | -| `Amount` | 文字列 | Amount | _(省略可)_ `Signature`により承認された[XRP、drop単位][通貨額]の額。これは、署名済みメッセージの額に一致している必要があります。これは、Channelが利用できるXRPの累計額であり、以前に精算されたXRPを含みます。 | -| `Signature` | 文字列 | Blob | _(省略可)_ クレームの署名です(16進数)。署名付きメッセージには、Channel IDとクレームの額が含まれています。トランザクションの送信者がChannelの支払元アドレスでない場合には必須です。 | -| `PublicKey` | 文字列 | Blob | _(省略可)_ 署名に使用する公開鍵(16進数)。公開鍵はレジャーに保管されているこのChannelの`PublicKey`と一致している必要があります。トランザクションの送信者がChannelの支払元アドレスでない場合には必須です。また`Signature`フィールドは省略されます。(`rippled`がトランザクションをレジャーに適用する前に署名の有効性をチェックできるように、トランザクションにPubKeyが指定されています。) | +| フィールド | JSONの型 | [内部の型][] | 必須? | 説明 | +| :-------------- | :----------- | :----------- | :----- | ---- | +| `Amount` | 文字列 | Amount | いいえ | `Signature`により承認された[XRP、drop単位][通貨額]の額。これは、署名済みメッセージの額に一致している必要があります。これは、Channelが利用できるXRPの累計額であり、以前に精算されたXRPを含みます。 | +| `Balance` | 文字列 | Amount | いいえ | このクレームの処理後にこのChannelから送金される[XRP、drop単位][通貨額]。XRPを送金する場合に必須です。Channelからこれまでに送金された総額よりも大きく、署名済みクレームの`Amount`よりも少ない額である必要があります。Channelを閉鎖する場合を除き、指定する必要があります。 | +| `Channel` | 文字列 | Hash256 | はい | Channelの一意のID(64文字の16進文字列) | +| `CredentialIDs` | 文字列の配列 | Vector256 | いいえ | このトランザクションによる入金を承認するための資格情報のセット。配列の各要素は、レジャーのCredentialエントリのレジャエントリIDでなければなりません。詳細は、[Credential ID](./payment.md#credential-id)をご覧ください。 | +| `PublicKey` | 文字列 | Blob | いいえ | 署名に使用する公開鍵(16進数)。公開鍵はレジャーに保管されているこのChannelの`PublicKey`と一致している必要があります。トランザクションの送信者がChannelの支払元アドレスでない場合には必須です。また`Signature`フィールドは省略されます。(`rippled`がトランザクションをレジャーに適用する前に署名の有効性をチェックできるように、トランザクションにPubKeyが指定されています。) | +| `Signature` | 文字列 | Blob | いいえ | クレームの署名(16進数)。署名付きメッセージには、Channel IDとクレームの額が含まれています。トランザクションの送信者がChannelの支払元アドレスでない場合には必須です。 | -[DeletableAccounts Amendment](/resources/known-amendments.md#deletableaccounts)が有効であり、 _かつ_ Payment Channelの作成時に[fixPayChanRecipientOwnerDir Amendment](/resources/known-amendments.md#fixpaychanrecipientownerdir)が有効でなかった場合は、Payment Channelの送金先が[削除](../../../../concepts/accounts/deleting-accounts.md)され、現在レジャーに存在しない可能性があります。宛先が削除されている場合、支払元アカウントはチャネルから宛先にXRPを送金できません。トランザクションは`tecNO_DST`で失敗します。(もちろん、削除されたアカウントがトランザクションを送信することはできません。)宛先アカウントが削除されている場合に、このトランザクションタイプを他の用途(チャネルの有効期限の調整、XRPのないチャネルのクローズ、有効期限を過ぎたチャネルの削除など)で使用しても影響はありません。 +[DeletableAccounts Amendment](/resources/known-amendments.md#deletableaccounts)が有効であり、 _かつ_ Payment Channelの作成時に[fixPayChanRecipientOwnerDir Amendment](/resources/known-amendments.md#fixpaychanrecipientownerdir)が有効でなかった場合は、Payment Channelの送金先が[削除](../../../../concepts/accounts/deleting-accounts.md)され、現在レジャーに存在しない可能性があります。宛先が削除されている場合、支払元アカウントはチャネルから宛先にXRPを送金できません。トランザクションは`tecNO_DST`で失敗します。宛先アカウントが削除されている場合に、このトランザクションタイプを他の用途(チャネルの有効期限の調整、XRPのないチャネルのクローズ、有効期限を過ぎたチャネルの削除など)で使用しても影響はありません。 ## PaymentChannelClaimフラグ PaymentChannelClaimタイプのトランザクションについては、[`Flags`フィールド](../common-fields.md#flagsフィールド)で以下の値が追加でサポートされます。 -| フラグ名 | 16進数値 | 10進数値 | 説明 | -|:----------|:-----------|:--------------|:------------------------------------| -| `tfRenew` | 0x00010000 | 65536 | Channelの`Expiration`時刻をクリアします。(`Expiration`は、Channelの変更できない`CancelAfter`時刻とは異なります。)このフラグは、Payment Channelの支払元アドレスだけが使用できます。 | -| `tfClose` | 0x00020000 | 131072 | Channelの閉鎖を要求します。このフラグは、Channelの支払元アドレスと宛先アドレスだけが使用できます。このフラグにより、現在のクレームの処理後にChannelにこれ以上のXRPが割り当てられない場合、または宛先アドレスが使用している場合に、Channelが即時に閉鎖されます。XRPがまだChannelに保有されているときに、支払元アドレスがこのフラグを使用した場合、`SettleDelay`秒の経過後にChannelが閉鎖するようにスケジュールされます。(具体的には、Channelの`Expiration`は、前のレジャーの閉鎖時刻にChannelの`SettleDelay`の時間を加算した時刻に設定されます。ただし、Channelにこの時刻よりも早い`Expiration`時刻がすでに設定されている場合を除きます。)XRPがまだChannelに保有されているときに、宛先アドレスがこのフラグを使用した場合、クレーム処理後に残っているXRPはすべて支払元アドレスに返金されます。 | +| フラグ名 | 16進数値 | 10進数値 | 説明 | +| :-------- | :----------- | :------- | ---- | +| `tfRenew` | `0x00010000` | 65536 | Channelの`Expiration`時刻をクリアします。(`Expiration`は、Channelの変更できない`CancelAfter`時刻とは異なります。)このフラグは、Payment Channelの支払元アドレスだけが使用できます。 | +| `tfClose` | `0x00020000` | 131072 | Channelの閉鎖を要求します。このフラグは、Channelの支払元アドレスと宛先アドレスだけが使用できます。このフラグにより、現在のクレームの処理後にChannelにこれ以上のXRPが割り当てられない場合、または宛先アドレスが使用している場合に、Channelが即時に閉鎖されます。XRPがまだChannelに保有されているときに、支払元アドレスがこのフラグを使用した場合、`SettleDelay`秒の経過後にChannelが閉鎖するようにスケジュールされます。(具体的には、Channelの`Expiration`は、前のレジャーの閉鎖時刻にChannelの`SettleDelay`の時間を加算した時刻に設定されます。ただし、Channelにこの時刻よりも早い`Expiration`時刻がすでに設定されている場合を除きます。) XRPがまだChannelに保有されているときに、宛先アドレスがこのフラグを使用した場合、クレーム処理後に残っているXRPはすべて支払元アドレスに返金されます。 | {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/_snippets/common-links.md b/docs/_snippets/common-links.md index ed2d89963a..0884c8f059 100644 --- a/docs/_snippets/common-links.md +++ b/docs/_snippets/common-links.md @@ -88,6 +88,11 @@ [Checkオブジェクト]: /docs/references/protocol/ledger-data/ledger-entry-types/check.md [Clawback amendment]: /resources/known-amendments.md#clawback [Clawbackの修正]: /resources/known-amendments.md#clawback +[CredentialAccept transaction]: /docs/references/protocol/transactions/types/credentialaccept.md +[CredentialAccept transactions]: /docs/references/protocol/transactions/types/credentialaccept.md +[CredentialAccept トランザクション]: /docs/references/protocol/transactions/types/credentialaccept.md +[CredentialAccept]: /docs/references/protocol/transactions/types/credentialaccept.md +[CredentialAcceptトランザクション]: /docs/references/protocol/transactions/types/credentialaccept.md [Crypto-Conditions Specification]: https://tools.ietf.org/html/draft-thomas-crypto-conditions-04 [CryptoConditions amendment]: /resources/known-amendments.md#cryptoconditions [CryptoConditionsSuite amendment]: /resources/known-amendments.md#cryptoconditionssuite @@ -637,6 +642,7 @@ [ripple_path_find メソッド]: /docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/ripple_path_find.md [ripple_path_findメソッド]: /docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/ripple_path_find.md [seconds since the Ripple Epoch]: /docs/references/protocol/data-types/basic-data-types.md#specifying-time +[リップルエポックからの秒数]: /docs/references/protocol/data-types/basic-data-types.md#specifying-time [server_info command]: /docs/references/http-websocket-apis/public-api-methods/server-info-methods/server_info.md [server_info method]: /docs/references/http-websocket-apis/public-api-methods/server-info-methods/server_info.md [server_info メソッド]: /docs/references/http-websocket-apis/public-api-methods/server-info-methods/server_info.md From 46a524eb9512b9a5903a783e958558d0cdcedb34 Mon Sep 17 00:00:00 2001 From: Rome Reginelli Date: Wed, 18 Dec 2024 14:30:17 -0800 Subject: [PATCH 3/8] Apply suggestions from @tequdev review Co-authored-by: tequ --- docs/concepts/decentralized-storage/credentials.md | 2 +- .../public-api-methods/ledger-methods/ledger_entry.md | 4 ++-- .../path-and-order-book-methods/deposit_authorized.md | 8 ++++---- .../protocol/ledger-data/ledger-entry-types/credential.md | 2 +- .../ledger-data/ledger-entry-types/depositpreauth.md | 2 +- .../protocol/transactions/types/credentialaccept.md | 4 ++-- .../protocol/transactions/types/credentialcreate.md | 6 +++--- .../protocol/transactions/types/credentialdelete.md | 6 +++--- .../protocol/transactions/types/depositpreauth.md | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/concepts/decentralized-storage/credentials.md b/docs/concepts/decentralized-storage/credentials.md index d6855afd5a..6ec539e967 100644 --- a/docs/concepts/decentralized-storage/credentials.md +++ b/docs/concepts/decentralized-storage/credentials.md @@ -1,6 +1,6 @@ # Credentials -The Credentials feature is a set of tools for managing authorization and compliance requirements using the XRP Ledger blockchain, while respecting privacy and decentralization. This feature extends and interconnects with other features of the XRP Ledger including [Deposit Authorization](https://xrpl.org/docs/concepts/accounts/depositauth). The goal of this feature is to streamline the process of compliance checks such as [KYC (Know Your Customer)](https://en.wikipedia.org/wiki/Know_your_customer) and to enable further trust-based applications within the XRP Ledger ecosystem. +The Credentials feature is a set of tools for managing authorization and compliance requirements using the XRP Ledger blockchain, while respecting privacy and decentralization. This feature extends and interconnects with other features of the XRP Ledger including [Deposit Authorization](../../concepts/accounts/depositauth.md)). The goal of this feature is to streamline the process of compliance checks such as [KYC (Know Your Customer)](https://en.wikipedia.org/wiki/Know_your_customer) and to enable further trust-based applications within the XRP Ledger ecosystem. The design of the Credentials standard draws from the [W3C Verifiable Credentials standard](https://www.w3.org/TR/vc-data-model-2.0/). It is intended to be compatible to an extent that makes sense in the context of the XRP Ledger. There are some differences in data structures and formatting: for example, the subject of a credential is identified by an XRP Ledger address rather than a URL. diff --git a/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md b/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md index c838003457..4052e5048c 100644 --- a/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md +++ b/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger_entry.md @@ -112,7 +112,7 @@ You can use this type of request to get any singleton ledger entry, if it exists ### Get AccountRoot Entry - + Retrieve an [AccountRoot entry](../../../protocol/ledger-data/ledger-entry-types/accountroot.md) by its address. This is roughly equivalent to the [account_info method][]. @@ -160,7 +160,7 @@ rippled json ledger_entry '{ "account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 ### Get AMM Entry - + _(Added by the [AMM amendment][])_ diff --git a/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/deposit_authorized.md b/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/deposit_authorized.md index 10b3cee95f..2f62caabc5 100644 --- a/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/deposit_authorized.md +++ b/docs/references/http-websocket-apis/public-api-methods/path-and-order-book-methods/deposit_authorized.md @@ -8,7 +8,7 @@ labels: # deposit_authorized [[Source]](https://github.com/XRPLF/rippled/blob/817d2339b8632cb2f97d3edd6f7af33aa7631744/src/ripple/rpc/handlers/DepositAuthorized.cpp "Source") -The `deposit_authorized` command indicates whether one account is authorized to send payments directly to another. See [Deposit Authorization](https://xrpl.org/docs/concepts/accounts/depositauth/) for information on how to require authorization to deliver money to your account. +The `deposit_authorized` command indicates whether one account is authorized to send payments directly to another. See [Deposit Authorization](../../../../concepts/accounts/depositauth.md) for information on how to require authorization to deliver money to your account. ## Request Format An example of the request format: @@ -65,7 +65,7 @@ The request includes the following parameters: |:----------------------|:---------------------|:----------|-------------| | `source_account` | String - [Address][] | Yes | The sender of a possible payment. | | `destination_account` | String - [Address][] | Yes | The recipient of a possible payment. | -| `ledger_hash` | [Hash][] | No | A 20-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) | +| `ledger_hash` | [Hash][] | No | A 32-byte hex string for the ledger version to use. (See [Specifying Ledgers][]) | | `ledger_index` | [Ledger Index][] | No | The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. (See [Specifying Ledgers][]) | | `credentials` | Array | No | A set of credentials to take into account when checking if the sender can send funds to the destination. Each member of the array must be the unique ID of a [Credential entry][] in the ledger. Cannot be an empty array. | @@ -150,7 +150,7 @@ The response follows the [standard format][], with a successful result containin | Field | Type | Required? | Description | |:-----------------------|:--------------------------|:----------|:--------------| | `credentials` | Array of [Hash][] | No | The credentials specified in the request, if any. | -| `deposit_authorized` | Boolean | Yes | Whether the specified source account is authorized to send payments directly to the destination account. If `true`, either the destination account does not require [deposit authorization](https://xrpl.org/docs/concepts/accounts/depositauth) or the source account is preauthorized. | +| `deposit_authorized` | Boolean | Yes | Whether the specified source account is authorized to send payments directly to the destination account. If `true`, either the destination account does not require [deposit authorization](../../../../concepts/accounts/depositauth.md) or the source account is preauthorized. | | `destination_account` | String - [Address][] | Yes | The destination account specified in the request. | | `ledger_hash` | String | No | The identifying hash of the ledger that was used to generate this response. | | `ledger_index` | Number - [Ledger Index][] | No | The ledger index of the ledger version that was used to generate this response. | @@ -159,7 +159,7 @@ The response follows the [standard format][], with a successful result containin | `validated` | Boolean | No | If `true`, the information comes from a validated ledger version. | {% admonition type="info" name="Note" %} -A `deposit_authorized` status of `true` does not guarantee that a payment can be sent from the specified source to the specified destination. For example, the destination account may not have a [trust line](https://xrpl.org/docs/concepts/tokens/fungible-tokens) for the specified currency, or there may not be enough liquidity to deliver a payment. +A `deposit_authorized` status of `true` does not guarantee that a payment can be sent from the specified source to the specified destination. For example, the destination account may not have a [trust line](../../../../concepts/tokens/fungible-tokens/index.md) for the specified currency, or there may not be enough liquidity to deliver a payment. {% /admonition %} ## Possible Errors diff --git a/docs/references/protocol/ledger-data/ledger-entry-types/credential.md b/docs/references/protocol/ledger-data/ledger-entry-types/credential.md index d400d7941d..406e1ad8cb 100644 --- a/docs/references/protocol/ledger-data/ledger-entry-types/credential.md +++ b/docs/references/protocol/ledger-data/ledger-entry-types/credential.md @@ -4,7 +4,7 @@ seo: --- # Credential -A `Credential` entry represents a [credential](../index.md), which contains an attestation about a _subject_ account from a _credential issuer_ account. The meaning of the attestation is defined by the issuer. +A `Credential` entry represents a [credential](../../../../concepts/decentralized-storage/credentials.md), which contains an attestation about a _subject_ account from a _credential issuer_ account. The meaning of the attestation is defined by the issuer. ## Example Credential JSON diff --git a/docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth.md b/docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth.md index 0f6a98191f..1040f414ff 100644 --- a/docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth.md +++ b/docs/references/protocol/ledger-data/ledger-entry-types/depositpreauth.md @@ -9,7 +9,7 @@ labels: # DepositPreauth [[Source]](https://github.com/XRPLF/rippled/blob/master/src/ripple/protocol/impl/LedgerFormats.cpp#L172-L178 "Source") -A `DepositPreauth` entry tracks a preauthorization from one account. You can always create a preauthorization by sending a [DepositPreauth transaction][], but it has no effect unless you are using [Deposit Authorization](https://xrpl.org/docs/concepts/accounts/depositauth). +A `DepositPreauth` entry tracks a preauthorization from one account. You can always create a preauthorization by sending a [DepositPreauth transaction][], but it has no effect unless you are using [Deposit Authorization](../../../../concepts/accounts/depositauth.md). A preauthorization allows specific others to send money directly to you even if you have Deposit Authorization enabled. Preauthorizations are one-directional, and have no effect on payments going the opposite direction. diff --git a/docs/references/protocol/transactions/types/credentialaccept.md b/docs/references/protocol/transactions/types/credentialaccept.md index 7ca9435cdb..ee9599abc2 100644 --- a/docs/references/protocol/transactions/types/credentialaccept.md +++ b/docs/references/protocol/transactions/types/credentialaccept.md @@ -2,7 +2,7 @@ seo: description: Accept a credential provisionally issued to your account. --- -# CredentialAccept Transaction +# CredentialAccept A CredentialAccept transaction accepts a credential, which makes the credential valid. Only the subject of the credential can do this. @@ -42,7 +42,7 @@ The combination of `Account`, `Issuer`, and `CredentialType` must match a `Crede | `tecEXPIRED` | The specified credential has an expiration time in the past. (In this case, the transaction also deletes the expired credentials from the ledger.) | | `tecNO_ENTRY` | The credential uniquely identified by the `Account`, `Issuer`, and `CredentialType` fields of the transaction does not exist in the ledger. | | `temDISABLED` | The related amendment is not enabled. | -| `temINVALID_ACCOUNT_ID` | The provided `Issuer` field is invalid. For example, it contains [ACCOUNT_ZERO][]. | +| `temINVALID_ACCOUNT_ID` | The provided `Issuer` field is invalid. For example, it contains [ACCOUNT_ZERO](../../../../concepts/accounts/addresses.md#special-addresses). | {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/references/protocol/transactions/types/credentialcreate.md b/docs/references/protocol/transactions/types/credentialcreate.md index 90f5b6216b..6e37c383dc 100644 --- a/docs/references/protocol/transactions/types/credentialcreate.md +++ b/docs/references/protocol/transactions/types/credentialcreate.md @@ -3,7 +3,7 @@ seo: description: Provisionally issue a credential to a subject account. --- -# CredentialCreate Transaction +# CredentialCreate A CredentialCreate transaction creates a credential in the ledger. The issuer of the credential uses this transaction to provisionally issue a credential. The credential is not valid until the subject of the credential accepts it with a [CredentialAccept transaction][]. @@ -37,7 +37,7 @@ The `Account` field (the sender) of the transaction is the issuer of the credent ## Error Cases -Besides errors that can occur for all transactions, CredentialCreate transactions can result in the following [transaction result codes][]: +Besides errors that can occur for all transactions, CredentialCreate transactions can result in the following [transaction result codes](../transaction-results/index.md): | Error Code | Description | |:-----------|:------------| @@ -45,7 +45,7 @@ Besides errors that can occur for all transactions, CredentialCreate transaction | `tecEXPIRED` | The credential's expiration time is in the past. | | `tecNO_TARGET` | The account specified in the `Subject` field is not a funded account in the ledger. | | `temDISABLED` | The related amendment is not enabled. | -| `temINVALID_ACCOUNT_ID` | The provided `Subject` field is invalid. For example, it contains [ACCOUNT_ZERO][]. | +| `temINVALID_ACCOUNT_ID` | The provided `Subject` field is invalid. For example, it contains [ACCOUNT_ZERO](../../../../concepts/accounts/addresses.md#special-addresses). | {% raw-partial file="/docs/_snippets/common-links.md" /%} diff --git a/docs/references/protocol/transactions/types/credentialdelete.md b/docs/references/protocol/transactions/types/credentialdelete.md index 923516bd60..6609898983 100644 --- a/docs/references/protocol/transactions/types/credentialdelete.md +++ b/docs/references/protocol/transactions/types/credentialdelete.md @@ -2,9 +2,9 @@ seo: description: Remove a credential from the ledger, effectively revoking it. --- -# CredentialDelete Transaction +# CredentialDelete -A CredentialDelete transaction removes a credential from the ledger, effectively revoking it. Users may also want to delete an unwanted credential to reduce their [reserve requirement][]. +A CredentialDelete transaction removes a credential from the ledger, effectively revoking it. Users may also want to delete an unwanted credential to reduce their [reserve requirement](../../../../concepts/accounts/reserves.md). ## Example CredentialDelete JSON @@ -41,7 +41,7 @@ This transaction looks for a [Credential ledger entry](../../ledger-data/ledger- | Error Code | Description | |:-----------|:------------| | `temDISABLED` | The related amendment is not enabled. | -| `temINVALID_ACCOUNT_ID` | A provided `Subject` or `Issuer` field is invalid. For example, it contains [ACCOUNT_ZERO][]. | +| `temINVALID_ACCOUNT_ID` | A provided `Subject` or `Issuer` field is invalid. For example, it contains [ACCOUNT_ZERO](../../../../concepts/accounts/addresses.md#special-addresses). | | `tecNO_PERMISSION` | The sender is neither the issuer nor subject of the credential, and the credential is not expired. | | `tecNO_ENTRY` | The specified credential does not exist in the ledger. | diff --git a/docs/references/protocol/transactions/types/depositpreauth.md b/docs/references/protocol/transactions/types/depositpreauth.md index da0f71b176..9aa1814ba0 100644 --- a/docs/references/protocol/transactions/types/depositpreauth.md +++ b/docs/references/protocol/transactions/types/depositpreauth.md @@ -83,7 +83,7 @@ In addition to error types that can occur for all transactions, DepositPreauth t | Error Code | Description | |:--------------------------|:------------| | `tecDUPLICATE` | The transaction would create a preauthorization that already exists. | -| `tecINSUFFICIENT_RESERVE` | The sender would not meet the [reserve requirement][] after adding another entry to the ledger. (A DepositPreauth entry counts as one item towards the authorizer's owner reserve.) | +| `tecINSUFFICIENT_RESERVE` | The sender would not meet the [reserve requirement](../../../../concepts/accounts/reserves.md) after adding another entry to the ledger. (A DepositPreauth entry counts as one item towards the authorizer's owner reserve.) | | `tecNO_ENTRY` | The transaction tried to revoke a preauthorization that does not exist in the ledger. | | `tecNO_ISSUER` | One or more specified credential issuers does not exist in the ledger. | | `tecNO_TARGET` | The transaction tried to authorize an account that is not a funded account in the ledger. | From 0fd681ae96445fb21a81df70b48ecef1a1111b98 Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Wed, 18 Dec 2024 14:45:11 -0800 Subject: [PATCH 4/8] Add credential transactions and amendment to common links --- docs/_snippets/common-links.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/_snippets/common-links.md b/docs/_snippets/common-links.md index ed2d89963a..e95390c505 100644 --- a/docs/_snippets/common-links.md +++ b/docs/_snippets/common-links.md @@ -88,6 +88,19 @@ [Checkオブジェクト]: /docs/references/protocol/ledger-data/ledger-entry-types/check.md [Clawback amendment]: /resources/known-amendments.md#clawback [Clawbackの修正]: /resources/known-amendments.md#clawback +[Credentials amendment]: /resources/known-amendments.md#credentials +[CredentialCreate transaction]: /docs/references/protocol/transactions/types/credentialcreate.md +[CredentialCreate transactions]: /docs/references/protocol/transactions/types/credentialcreate.md +[CredentialCreate]: /docs/references/protocol/transactions/types/credentialcreate.md +[CredentialCreateトランザクション]: /docs/references/protocol/transactions/types/credentialcreate.md +[CredentialAccept transaction]: /docs/references/protocol/transactions/types/credentialaccept.md +[CredentialAccept transactions]: /docs/references/protocol/transactions/types/credentialaccept.md +[CredentialAccept]: /docs/references/protocol/transactions/types/credentialaccept.md +[CredentialAcceptトランザクション]: /docs/references/protocol/transactions/types/credentialaccept.md +[CredentialDelete transaction]: /docs/references/protocol/transactions/types/credentialdelete.md +[CredentialDelete transactions]: /docs/references/protocol/transactions/types/credentialdelete.md +[CredentialDelete]: /docs/references/protocol/transactions/types/credentialdelete.md +[CredentialDeleteトランザクション]: /docs/references/protocol/transactions/types/credentialdelete.md [Crypto-Conditions Specification]: https://tools.ietf.org/html/draft-thomas-crypto-conditions-04 [CryptoConditions amendment]: /resources/known-amendments.md#cryptoconditions [CryptoConditionsSuite amendment]: /resources/known-amendments.md#cryptoconditionssuite From 425383b7c42d2194fce8acc7e1db8add5d09b3e9 Mon Sep 17 00:00:00 2001 From: tequ Date: Wed, 9 Apr 2025 18:14:02 +0900 Subject: [PATCH 5/8] fix --- docs/references/protocol/transactions/types/accountdelete.md | 1 + docs/references/protocol/transactions/types/escrowfinish.md | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/references/protocol/transactions/types/accountdelete.md b/docs/references/protocol/transactions/types/accountdelete.md index 08b9ee5721..c97918a6a4 100644 --- a/docs/references/protocol/transactions/types/accountdelete.md +++ b/docs/references/protocol/transactions/types/accountdelete.md @@ -37,6 +37,7 @@ An AccountDelete transaction deletes an [account](../../ledger-data/ledger-entry | `Destination` | String - [Address][] | AccountID | Yes | The address of an account to receive any leftover XRP after deleting the sending account. Must be a funded account in the ledger, and must not be the sending account. | | `DestinationTag` | Number | UInt32 | No | Arbitrary [destination tag](../../../../concepts/transactions/source-and-destination-tags.md) that identifies a hosted recipient or other information for the recipient of the deleted account's leftover XRP. | + ## Special Transaction Cost As an additional deterrent against ledger spam, the AccountDelete transaction requires a much higher than usual [transaction cost](../../../../concepts/transactions/transaction-cost.md): instead of the standard minimum of 0.00001 XRP, AccountDelete must destroy at least the owner reserve amount, currently {% $env.PUBLIC_OWNER_RESERVE %}. This discourages excessive creation of new accounts because the [reserve requirement](../../../../concepts/accounts/reserves.md) cannot be fully recouped by deleting the account. diff --git a/docs/references/protocol/transactions/types/escrowfinish.md b/docs/references/protocol/transactions/types/escrowfinish.md index 863930c718..649ac5477c 100644 --- a/docs/references/protocol/transactions/types/escrowfinish.md +++ b/docs/references/protocol/transactions/types/escrowfinish.md @@ -12,8 +12,6 @@ labels: Deliver XRP from an escrow (held payment) to the recipient. -Deliver XRP from an escrow (held payment) to the recipient. - _Added by the [Escrow amendment][]._ From f49783fdeeddb5cc4659f083400802d453b74887 Mon Sep 17 00:00:00 2001 From: tequ Date: Wed, 9 Apr 2025 18:18:01 +0900 Subject: [PATCH 6/8] fix --- docs/references/protocol/transactions/types/payment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/references/protocol/transactions/types/payment.md b/docs/references/protocol/transactions/types/payment.md index 68337956c1..2cac8c6757 100644 --- a/docs/references/protocol/transactions/types/payment.md +++ b/docs/references/protocol/transactions/types/payment.md @@ -186,7 +186,7 @@ The credentials provided in the `CredentialIDs` field must all be valid, meaning If you provide credentials even though the destination account does not use Deposit Authorization, the credentials are not needed but they are still checked for validity. -### Special Case for Destination Accounts Below the Reserve +## Special Case for Destination Accounts Below the Reserve If an account has Deposit Authorization enabled, but its current XRP balance is less than the [reserve requirement](../../../../concepts/accounts/reserves.md), there is a special exception to Deposit Authorization where anyone can send a Payment transaction, without preauthorization, for up to the base account reserve; this exists as an emergency measure to prevent an account from getting "stuck" without enough XRP to transact. To qualify for this special case, the payment MUST NOT use the `CredentialIDs` field. From 86fb0cd72a1072a3cb6b01b3a36501aeb6acd3b1 Mon Sep 17 00:00:00 2001 From: tequ Date: Wed, 9 Apr 2025 18:21:54 +0900 Subject: [PATCH 7/8] status not_enabled --- .../protocol/ledger-data/ledger-entry-types/credential.md | 1 + .../references/protocol/transactions/types/credentialaccept.md | 1 + .../references/protocol/transactions/types/credentialcreate.md | 1 + .../references/protocol/transactions/types/credentialdelete.md | 1 + 4 files changed, 4 insertions(+) diff --git a/@l10n/ja/docs/references/protocol/ledger-data/ledger-entry-types/credential.md b/@l10n/ja/docs/references/protocol/ledger-data/ledger-entry-types/credential.md index 697345ee21..32b5059f78 100644 --- a/@l10n/ja/docs/references/protocol/ledger-data/ledger-entry-types/credential.md +++ b/@l10n/ja/docs/references/protocol/ledger-data/ledger-entry-types/credential.md @@ -1,6 +1,7 @@ --- seo: description: 支払いの事前承認に使用できる、資格発行者アカウントによる対象アカウントについての証明。 +status: not_enabled --- # Credential diff --git a/@l10n/ja/docs/references/protocol/transactions/types/credentialaccept.md b/@l10n/ja/docs/references/protocol/transactions/types/credentialaccept.md index e4f8f6163e..8dea2bb640 100644 --- a/@l10n/ja/docs/references/protocol/transactions/types/credentialaccept.md +++ b/@l10n/ja/docs/references/protocol/transactions/types/credentialaccept.md @@ -1,6 +1,7 @@ --- seo: description: アカウントに仮発行された資格情報を承認します。 + status: not_enabled --- # CredentialAccept diff --git a/@l10n/ja/docs/references/protocol/transactions/types/credentialcreate.md b/@l10n/ja/docs/references/protocol/transactions/types/credentialcreate.md index eac5d58b77..340ac8df3a 100644 --- a/@l10n/ja/docs/references/protocol/transactions/types/credentialcreate.md +++ b/@l10n/ja/docs/references/protocol/transactions/types/credentialcreate.md @@ -1,6 +1,7 @@ --- seo: description: アカウントに対して暫定的に資格情報を発行します。 + status: not_enabled --- # CredentialCreate diff --git a/@l10n/ja/docs/references/protocol/transactions/types/credentialdelete.md b/@l10n/ja/docs/references/protocol/transactions/types/credentialdelete.md index 7896b94802..47854a7459 100644 --- a/@l10n/ja/docs/references/protocol/transactions/types/credentialdelete.md +++ b/@l10n/ja/docs/references/protocol/transactions/types/credentialdelete.md @@ -1,6 +1,7 @@ --- seo: description: レジャーから認証情報を削除し、事実上失効させます。 + status: not_enabled --- # CredentialDelete From e6d501b74469b48c5d9c61e10d4f05178f307465 Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Fri, 11 Apr 2025 15:39:07 -0700 Subject: [PATCH 8/8] [ja] Fix link --- @l10n/ja/docs/references/protocol/transactions/types/payment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/@l10n/ja/docs/references/protocol/transactions/types/payment.md b/@l10n/ja/docs/references/protocol/transactions/types/payment.md index adf535d354..404e31f3d7 100644 --- a/@l10n/ja/docs/references/protocol/transactions/types/payment.md +++ b/@l10n/ja/docs/references/protocol/transactions/types/payment.md @@ -41,7 +41,7 @@ Paymentは、[アカウントを作成](#アカウントの作成)する唯一 | フィールド | JSONの型 | [内部の型][] | 説明 | | :--------------- | :------------------ | :----------- | ---- | | `Amount` | [通貨額][] | Amount | `DeliverMax`のエイリアス | -| `CredentialIDs` | 文字列の配列 | Vector256 | このトランザクションによって作成される入金を承認するための、受取人によって事前承認された資格証明のセット。配列の各メンバは、レジャーのCredentialエントリのレジャーエントリIDでなければなりません。(_[**Credentials** amendment](../../../../concepts/amendments/index.md#credentials)が必要です。_ {% not-enabled /%}) | +| `CredentialIDs` | 文字列の配列 | Vector256 | このトランザクションによって作成される入金を承認するための、受取人によって事前承認された資格証明のセット。配列の各メンバは、レジャーのCredentialエントリのレジャーエントリIDでなければなりません。(_[**Credentials** amendment](../../../../../resources/known-amendments.md#credentials)が必要です。_ {% not-enabled /%}) | | `DeliverMax` | [Currency Amount][] | Amount | [API v2][]: 送金する通貨額。XRP以外の金額の場合、入れ子フィールドの名前では、アルファベットの小文字のみ使用してください。[**tfPartialPayment**フラグ](#paymentのフラグ)が設定されている場合は、この金額を _上限_ とする金額を送金します。 {% badge href="https://github.com/XRPLF/rippled/releases/tag/2.0.0" %}新規: rippled 2.0.0{% /badge %} | | `DeliverMin` | [通貨額][] | Amount | _(省略可)_ このトランザクションで送金する、宛先通貨での最少金額。[Partial Payments](../../../../concepts/payment-types/partial-payments.md)の場合のみ有効になります。XRP以外の金額の場合、入れ子フィールドの名前では、アルファベットの小文字のみ使用してください。 | | `Destination` | 文字列 | AccountID | 支払いを受取るアカウントの一意アドレス。 |