Update escrow documentation

This commit is contained in:
Maria Shodunke
2025-10-01 14:08:52 +01:00
parent 30f416780d
commit 7cdf35f032
19 changed files with 125 additions and 51 deletions

View File

@@ -88,6 +88,7 @@ AccountRoot objects can have the following flags combined in the `Flags` field:
| Flag Name | Hex Value | Decimal Value | Corresponding [AccountSet Flag](../../transactions/types/accountset.md#accountset-flags) | Description |
|-----------------------------------|--------------|-------------------|-----------------------------------|----|
| `lsfAllowTrustLineClawback` | `0x80000000` | 2147483648 | `asfAllowTrustLineClawback` | Enable [Clawback](../../../../concepts/tokens/fungible-tokens/clawing-back-tokens.md) for this account. {% amendment-disclaimer name="Clawback" /%} |
| `lsfAllowTrustLineLocking` | `0x40000000` | 1073741824 | `asfAllowTrustLineLocking` | Enable [Escrow](../../../../concepts/payment-types/escrow.md) for Trust Line Tokens issued by this account. {% amendment-disclaimer name="TokenEscrow" /%} |
| `lsfDefaultRipple` | `0x00800000` | 8388608 | `asfDefaultRipple` | Enable [rippling](../../../../concepts/tokens/fungible-tokens/rippling.md) on this addresses's trust lines by default. Required for issuing addresses; discouraged for others. |
| `lsfDepositAuth` | `0x01000000` | 16777216 | `asfDepositAuth` | This account has [DepositAuth](../../../../concepts/accounts/depositauth.md) enabled, meaning it can only receive funds from transactions it sends, and from [preauthorized](../../../../concepts/accounts/depositauth.md#preauthorization) accounts. {% amendment-disclaimer name="DepositAuth" /%} |
| `lsfDisableMaster` | `0x00100000` | 1048576 | `asfDisableMaster` | Disallows use of the master key to sign transactions for this account. |

View File

@@ -5,11 +5,12 @@ labels:
- Escrow
---
# Escrow
[[Source]](https://github.com/XRPLF/rippled/blob/f64cf9187affd69650907d0d92e097eb29693945/include/xrpl/protocol/detail/ledger_entries.macro#L329-L342 "Source")
[[Source]](https://github.com/XRPLF/rippled/blob/master/include/xrpl/protocol/detail/ledger_entries.macro#L344-L359 "Source")
An `Escrow` ledger entry represents an [escrow](../../../../concepts/payment-types/escrow.md), which holds XRP until specific conditions are met. You can create an escrow by sending an [EscrowCreate transaction][].
An `Escrow` ledger entry represents an [escrow](../../../../concepts/payment-types/escrow.md), which holds funds until specific conditions are met. You can create an escrow by sending an [EscrowCreate transaction][].
{% amendment-disclaimer name="Escrow" /%}
{% amendment-disclaimer name="TokenEscrow" mode="updated" /%}
## Example {% $frontmatter.seo.title %} JSON
@@ -39,9 +40,9 @@ In addition to the [common fields](../common-fields.md), {% code-page-name /%} e
| Name | JSON Type | [Internal Type][] | Required? | Description |
|:--------------------|:----------|:------------------|:----------|:-----------------------|
| `Account` | String | AccountID | Yes | The address of the owner (sender) of this escrow. This is the account that provided the XRP, and gets it back if the escrow is canceled. |
| `Amount` | Object or String | Amount | Yes | The amount to be delivered by the payment is escrow. |
| `CancelAfter` | Number | UInt32 | No | The escrow can be canceled if and only if this field is present _and_ the time it specifies has passed. Specifically, this is specified as [seconds since the Ripple Epoch][] and it "has passed" if it's earlier than the close time of the previous validated ledger. |
| `Account` | String | AccountID | Yes | The address of the owner (sender) of this escrow. This is the account that provided the funds, and gets it back if the escrow is canceled. |
| `Amount` | Object or String | Amount | Yes | The amount to be delivered by the payment in escrow. The amount can be XRP, or with the TokenEscrow amendment, a fungible token. {% amendment-disclaimer name="TokenEscrow" mode="updated" /%} |
| `CancelAfter` | Number | UInt32 | No | _(Optional for XRP escrows, but mandatory for token escrows)_ The escrow can be canceled if and only if this field is present _and_ the time it specifies has passed. Specifically, this is specified as [seconds since the Ripple Epoch][] and it "has passed" if it's earlier than the close time of the previous validated ledger. |
| `Condition` | String | Blob | No | A [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1), as hexadecimal. If present, the [EscrowFinish transaction][] must contain a fulfillment that satisfies this condition. |
| `Destination` | String | AccountID | Yes | The destination address where the XRP is paid if the escrow is successful. |
| `DestinationNode` | String | UInt64 | No | A hint indicating which page of the destination's owner directory links to this object, in case the directory consists of multiple pages. Omitted on escrows created before enabling the [fix1523 amendment][]. |
@@ -52,7 +53,8 @@ In addition to the [common fields](../common-fields.md), {% code-page-name /%} e
| `PreviousTxnID` | String | UInt256 | 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 entry. |
| `SourceTag` | Number | UInt32 | No | An arbitrary tag to further specify the source for this escrow, such as a hosted recipient at the owner's address. |
| `TransferRate` | Number | UInt32 | No | The fee to charge when users finish an escrow, initially set on the creation of an escrow contract and updated on subsequent finish transactions. |
| `TransferRate` | Number | UInt32 | No | The transfer rate or fee to charge when users finish an escrow, locked at the creation of an escrow contract and used during settlement. Applicable to Trust Line Tokens and MPTs only. {% amendment-disclaimer name="TokenEscrow" /%} |
| `IssuerNode` | Number | UInt64 | No | The ledger index of the issuer's directory node associated with the `Escrow`. Used when the issuer is neither the source nor destination account. {% amendment-disclaimer name="TokenEscrow" /%} |
## {% $frontmatter.seo.title %} Flags

View File

@@ -41,6 +41,7 @@ In addition to the [common fields](../common-fields.md), {% code-page-name /%} e
| `AssetScale` | Number | UInt8 | Yes | Where to put the decimal place when displaying amounts of this MPT. More formally, the asset scale is a non-negative integer (0, 1, 2, …) such that one standard unit equals 10^(-scale) of a corresponding fractional unit. For example, if a US Dollar Stablecoin has an asset scale of _2_, then 1 unit of that MPT would equal 0.01 US Dollars. This indicates to how many decimal places the MPT can be subdivided. The default is `0`, meaning that the MPT cannot be divided into smaller than 1 unit. |
| `MaximumAmount` | String - Number | UInt64 | No | The maximum number of MPTs that can exist at one time. If omitted, the maximum is currently limited to 2<sup>63</sup>-1. |
| `OutstandingAmount` | String - Number | UInt64 | Yes | The total amount of MPTs of this issuance currently in circulation. This value increases when the issuer sends MPTs to a non-issuer, and decreases whenever the issuer receives MPTs. |
| `LockedAmount` | String - Number | UInt64 | No | The amount of tokens currently locked up (for example, in escrow). {% amendment-disclaimer name="TokenEscrow" /%} |
| `TransferFee` | Number | UInt16 | Yes | This value specifies the fee, in tenths of a basis point, charged by the issuer for secondary sales of the token, if such sales are allowed at all. Valid values for this field are between 0 and 50,000 inclusive. A value of 1 is equivalent to 1/10 of a basis point or 0.001%, allowing transfer rates between 0% and 50%. A `TransferFee` of 50,000 corresponds to 50%. The default value for this field is 0. Any decimals in the transfer fee are rounded down. The fee can be rounded down to zero if the payment is small. Issuers should make sure that their MPT's `AssetScale` is large enough. |
| `MPTokenMetadata` | String - Hexadecimal | Blob | Yes | Arbitrary metadata about this issuance, in hex format. The limit for this field is 1024 bytes. |
| `OwnerNode` | String - Hexadecimal | UInt64 | Yes | A hint indicating which page of the owner directory links to this entry, in case the directory consists of multiple pages. |

View File

@@ -42,8 +42,8 @@ In addition to the [common fields](../common-fields.md), {% code-page-name /%} e
| Name | JSON Type | [Internal Type][] | Required? | Description |
|:--------------------|:----------|:------------------|:----------|:-----------------------|
| `Account` | String | AccountID | Yes | The source address that owns this payment channel. This comes from the sending address of the transaction that created the channel. |
| `Amount` | String | Amount | Yes | Total [XRP, in drops][] or tokens, that have been allocated to this channel. This includes amounts that have been paid to the destination address. This is initially set by the transaction that created the channel and can be increased if the source address sends a `PaymentChannelFund` transaction. |
| `Balance` | Object or String | Amount | Yes | Total already paid out by the channel. The difference between this value and the `Amount` field is how much can still be paid to the destination address with `PaymentChannelClaim` transactions. If the channel closes, the remaining difference is returned to the source address. |
| `Amount` | String | Amount | Yes | Total [XRP, in drops][], that have been allocated to this channel. This includes amounts that have been paid to the destination address. This is initially set by the transaction that created the channel and can be increased if the source address sends a `PaymentChannelFund` transaction. |
| `Balance` | String | Amount | Yes | Total [XRP, in drops][] already paid out by the channel. The difference between this value and the `Amount` field is how much can still be paid to the destination address with `PaymentChannelClaim` transactions. If the channel closes, the remaining difference is returned to the source address. |
| `CancelAfter` | Number | UInt32 | No | The immutable expiration time for this payment channel, in [seconds since the Ripple Epoch][]. This channel is expired if this value is present and smaller than the previous ledger's [`close_time` field](../ledger-header.md). This is optionally set by the transaction that created the channel, and cannot be changed. |
| `Destination` | String | AccountID | Yes | The destination address for this payment channel. While the payment channel is open, this address is the only one that can receive XRP from the channel. This comes from the `Destination` field of the transaction that created the channel. |
| `DestinationTag` | Number | UInt32 | No | An arbitrary tag to further specify the destination for this payment channel, such as a hosted recipient at the destination address. |
@@ -56,7 +56,6 @@ In addition to the [common fields](../common-fields.md), {% code-page-name /%} e
| `PublicKey` | String | Blob | Yes | Public key, in hexadecimal, of the key pair that can be used to sign claims against this channel. This can be any valid secp256k1 or Ed25519 public key. This is set by the transaction that created the channel and must match the public key used in claims against the channel. The channel source address can also send XRP from this channel to the destination without signed claims. |
| `SettleDelay` | Number | UInt32 | Yes | Number of seconds the source address must wait to close the channel if it still has any XRP in it. Smaller values mean that the destination address has less time to redeem any outstanding claims after the source address requests to close the channel. Can be any value that fits in a 32-bit unsigned integer (0 to 2^32-1). This is set by the transaction that creates the channel. |
| `SourceTag` | Number | UInt32 | No | An arbitrary tag to further specify the source for this payment channel, such as a hosted recipient at the owner's address. |
| `TransferRate` | Number | UInt32 | No | The fee to charge when users make claims on a payment channel, initially set on the creation of a payment channel and updated on subsequent funding or claim transactions. |
## Channel Expiration

View File

@@ -58,8 +58,6 @@ In addition to the [common fields](../common-fields.md), {% code-page-name /%} e
| `HighQualityIn` | Number | UInt32 | No | The inbound quality set by the high account, as an integer in the implied ratio `HighQualityIn`:1,000,000,000. As a special case, the value 0 is equivalent to 1 billion, or face value. |
| `HighQualityOut` | Number | UInt32 | No | The outbound quality set by the high account, as an integer in the implied ratio `HighQualityOut`:1,000,000,000. As a special case, the value 0 is equivalent to 1 billion, or face value. |
| `LedgerEntryType` | String | UInt16 | Yes | The value `0x0072`, mapped to the string `RippleState`, indicates that this is a RippleState entry. |
| `LockCount` | Object or String | Amount | No | The total number of lock balances on a `RippleState` ledger object. |
| `LockedBalance` | Object or String | Amount | No | The total number of locked tokens on a `RippleState` ledger object. |
| `LowLimit` | Object | Amount | Yes | The limit that the low account has set on the trust line. The `issuer` is the address of the low account that set this limit. |
| `LowNode` | String | UInt64 | Yes | (Omitted in some historical ledgers) A hint indicating which page of the low account's owner directory links to this entry, in case the directory consists of multiple pages. |
| `LowQualityIn` | Number | UInt32 | No | The inbound quality set by the low account, as an integer in the implied ratio `LowQualityIn`:1,000,000,000. As a special case, the value 0 is equivalent to 1 billion, or face value. |