mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2026-10-10 13:57:58 +00:00
Add credentials/permissioned DEX changes from 3.4.0
This commit is contained in:
@@ -30,6 +30,8 @@ A domain serves as an abstraction layer between credentials and a resource being
|
||||
|
||||
Users do not need to apply to join or leave a domain. When a transaction requires access to a resource that is restricted by a domain, the transaction automatically checks if the account holds a credential matching that domain's accepted credentials, and fails if they have none. The user's credential must be accepted and not expired.
|
||||
|
||||
`OfferCreate` and `Payment` transactions that specify a `DomainID` verify that the domain still exists, failing with `tecNO_PERMISSION` if not. If the domain exists, the transaction also deletes expired credentials from the ledger for any account it checks against the domain (the sender for `OfferCreate`, or the sender and destination for `Payment`).
|
||||
|
||||
## Uses for Permissioned Domains
|
||||
|
||||
Currently, there are no available XRP Ledger features that use permissioned domains. However, amendments that are in development and use domains include:
|
||||
|
||||
@@ -36,7 +36,7 @@ Place an [offer](../../../../concepts/tokens/decentralized-exchange/offers.md) t
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Required? | Description |
|
||||
|:-----------------|:--------------------|:------------------|:----------|-------------|
|
||||
| `DomainID` | String - [Hash][] | UInt256 | No | The ledger entry ID of a permissioned domain. If provided, restrict this offer to the [permissioned DEX](../../../../concepts/tokens/decentralized-exchange/permissioned-dexes.md) of that domain. {% amendment-disclaimer name="PermissionedDEX" /%} |
|
||||
| `DomainID` | String - [Hash][] | UInt256 | No | The ledger entry ID of a permissioned domain. If provided, restrict this offer to the [permissioned DEX](../../../../concepts/tokens/decentralized-exchange/permissioned-dexes.md) of that domain. {% amendment-disclaimer name="PermissionedDEX" /%} If this field is used, the transaction verifies that the domain still exists, failing with `tecNO_PERMISSION` if not. It also deletes the sender's expired credentials from the ledger. {% amendment-disclaimer name="fixCleanup3_4_0" /%} |
|
||||
| [`Expiration`](../../../../concepts/tokens/decentralized-exchange/offers.md#offer-expiration) | Number | UInt32 | No | Time after which the Offer is no longer active, in [seconds since the Ripple Epoch][]. |
|
||||
| `OfferSequence` | Number | UInt32 | No | An Offer to delete first, specified in the same way as [OfferCancel][]. |
|
||||
| `TakerGets` | [Currency Amount][] | Amount | Yes | The amount and type of currency being sold. |
|
||||
|
||||
@@ -46,7 +46,7 @@ Payments are also the only way to [create accounts](#creating-accounts).
|
||||
| `DeliverMin` | [Currency Amount][] | Amount | No | Minimum amount of destination currency this transaction should deliver. Only valid if this is a [partial payment](#partial-payments). |
|
||||
| `Destination` | String - [Address][] | AccountID | Yes | 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. |
|
||||
| `DomainID` | String - [Hash][] | UInt256 | No | The ledger entry ID of a permissioned domain. If this is a cross-currency payment, only use the corresponding [permissioned DEX](../../../../concepts/tokens/decentralized-exchange/permissioned-dexes.md) to convert currency. Both the sender and the recipient must have valid credentials that grant access to the specified domain. This field has no effect if the payment is not cross-currency. {% amendment-disclaimer name="PermissionedDEX" %/} |
|
||||
| `DomainID` | String - [Hash][] | UInt256 | No | The ledger entry ID of a permissioned domain. If this is a cross-currency payment, only use the corresponding [permissioned DEX](../../../../concepts/tokens/decentralized-exchange/permissioned-dexes.md) to convert currency. Both the sender and the recipient must have valid credentials that grant access to the specified domain. This field has no effect if the payment is not cross-currency. {% amendment-disclaimer name="PermissionedDEX" /%} If this field is used, the transaction verifies that the domain still exists, failing with `tecNO_PERMISSION` if not. It also deletes expired credentials from the ledger for the sender and destination accounts it checks against the domain. {% amendment-disclaimer name="fixCleanup3_4_0" /%} |
|
||||
| `InvoiceID` | String - Hexadecimal | UInt256 | No | Arbitrary 256-bit value 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/fungible-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. |
|
||||
@@ -185,6 +185,7 @@ The credentials provided in the `CredentialIDs` field must all be valid, meaning
|
||||
- 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.
|
||||
- None of the provided credentials may be zero. {% amendment-disclaimer name="fixCleanup3_4_0" /%}
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user