mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-22 12:45:50 +00:00
Update escrow documentation
This commit is contained in:
@@ -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. |
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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. |
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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. |
|
||||
|
||||
@@ -73,6 +73,7 @@ The available AccountSet flags are:
|
||||
|:----------------------------------|:--------------|:--------------|
|
||||
| `asfAccountTxnID` | 5 | Track the ID of this account's most recent transaction. Required for [`AccountTxnID`](../common-fields.md#accounttxnid) |
|
||||
| `asfAllowTrustLineClawback` | 16 | Allow account to claw back tokens it has issued. _(Requires the Clawback amendment.)_ Can only be set if the account has an empty owner directory (no trust lines, offers, escrows, payment channels, checks, or signer lists). After you set this flag, it cannot be reverted. The account permanently gains the ability to claw back issued assets on trust lines. |
|
||||
| `asfAllowTrustLineLocking` | 17 | Allow Trust Line tokens issued by this account to be held in escrow. If not set, attempts to create escrows with this account's tokens will fail. After you set this flag, it cannot be disabled. {% amendment-disclaimer name="TokenEscrow" /%} |
|
||||
| `asfAuthorizedNFTokenMinter` | 10 | Enable to allow another account to mint non-fungible tokens (NFTokens) on this account's behalf. Specify the authorized account in the `NFTokenMinter` field of the [AccountRoot](../../ledger-data/ledger-entry-types/accountroot.md) object. To remove an authorized minter, enable this flag and omit the `NFTokenMinter` field. {% amendment-disclaimer name="NonFungibleTokensV1_1" /%} |
|
||||
| `asfDefaultRipple` | 8 | Enable [rippling](../../../../concepts/tokens/fungible-tokens/rippling.md) on this account's trust lines by default. |
|
||||
| `asfDepositAuth` | 9 | Enable [Deposit Authorization](../../../../concepts/accounts/depositauth.md) on this account. {% amendment-disclaimer name="DepositAuth" /%} |
|
||||
|
||||
@@ -37,6 +37,19 @@ Any account may submit an EscrowCancel transaction.
|
||||
* If the corresponding [EscrowCreate transaction][] did not specify a `CancelAfter` time, the EscrowCancel transaction fails.
|
||||
* Otherwise the EscrowCancel transaction fails if the `CancelAfter` time is after the close time of the most recently-closed ledger.
|
||||
|
||||
## Error Cases
|
||||
|
||||
Besides errors that can occur for all transactions, {% $frontmatter.seo.title %} transactions can result in the following [transaction result codes](../transaction-results/index.md):
|
||||
|
||||
## EscrowFinish Errors
|
||||
|
||||
| Error Code | Description |
|
||||
|:------------------------- |:------------|
|
||||
| `tecNO_AUTH` | The transaction failed because authorization requirements were not met. For example, the issuer requires authorization and the sender is not authorized. |
|
||||
| `tecNO_LINE` | The sender does not have a trust line with the issuer. For Trust Line Tokens only. |
|
||||
| `tecNO_ENTRY` | The sender does not hold the MPT. |
|
||||
| `tecINSUFFICIENT_RESERVE` | Unable to create a trust line or MPToken due to lack of reserves. |
|
||||
|
||||
## See Also
|
||||
|
||||
- [Escrow entry][]
|
||||
|
||||
@@ -9,7 +9,18 @@ labels:
|
||||
|
||||
Set aside funds in an [escrow](../../../../concepts/payment-types/escrow.md) that delivers them to a predetermined recipient when certain conditions are met. If the escrow has an expiration, the funds can also be returned to the sender after it expires.
|
||||
|
||||
{% admonition type="info" name="Fungible Tokens" %}
|
||||
To escrow fungible tokens you must take note of the following:
|
||||
|
||||
- Trust Line Tokens must have the **Allow Trust Line Locking** flag enabled on their account.
|
||||
- Multi-Purpose-Tokens (MPTs) must have both the **Can Escrow** and **Can Transfer** flags enabled.
|
||||
- All token escrows must specify a **Cancel After** time.
|
||||
- If the token requires **authorization**, both sender and recipient must be pre-authorized by the issuer.
|
||||
{% /admonition %}
|
||||
|
||||
{% amendment-disclaimer name="Escrow" /%}
|
||||
{% amendment-disclaimer name="TokenEscrow" mode="updated" /%}
|
||||
|
||||
|
||||
## Example {% $frontmatter.seo.title %} JSON
|
||||
|
||||
@@ -34,29 +45,41 @@ Set aside funds in an [escrow](../../../../concepts/payment-types/escrow.md) tha
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Description |
|
||||
|:-----------------|:----------|:------------------|:--------------------------|
|
||||
| `Amount` | Object or String | Amount | Amount of XRP or fungible tokens to deduct from the sender's balance and escrow. Once escrowed, the payment can either go to the `Destination` address (after the `FinishAfter` time) or be returned to the sender (after the `CancelAfter` time). |
|
||||
| `Destination` | String | AccountID | Address to receive escrowed XRP. |
|
||||
| `CancelAfter` | Number | UInt32 | _(Optional)_ The time, in [seconds since the Ripple Epoch][], when this escrow expires. This value is immutable; the funds can only be returned to the sender after this time. |
|
||||
| `FinishAfter` | Number | UInt32 | _(Optional)_ The time, in [seconds since the Ripple Epoch][], when the escrowed XRP can be released to the recipient. This value is immutable, and the funds can't be accessed until this time. |
|
||||
| `Condition` | String | Blob | _(Optional)_ Hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). The funds can only be delivered to the recipient if this condition is fulfilled. If the condition is not fulfilled before the expiration time specified in the `CancelAfter` field, the XRP can only revert to the sender. |
|
||||
| `Amount` | Object or String | Amount | Amount of XRP, in drops, or fungible tokens to deduct from the sender's balance and escrow. Once escrowed, the payment can either go to the `Destination` address (after the `FinishAfter` time) or be returned to the sender (after the `CancelAfter` time). {% amendment-disclaimer name="TokenEscrow" mode="updated" /%} |
|
||||
| `Destination` | String | AccountID | Address to receive escrowed funds. |
|
||||
| `CancelAfter` | Number | UInt32 | _(Optional for XRP escrows, but mandatory for token escrows)_ The time, in [seconds since the Ripple Epoch][], when this escrow expires. This value is immutable; the funds can only be returned to the sender after this time. Required if the token is a fungible token. |
|
||||
| `FinishAfter` | Number | UInt32 | _(Optional)_ The time, in [seconds since the Ripple Epoch][], when the escrowed funds can be released to the recipient. This value is immutable, and the funds can't be accessed until this time. |
|
||||
| `Condition` | String | Blob | _(Optional)_ Hex value representing a [PREIMAGE-SHA-256 crypto-condition](https://tools.ietf.org/html/draft-thomas-crypto-conditions-02#section-8.1). The funds can only be delivered to the recipient if this condition is fulfilled. If the condition is not fulfilled before the expiration time specified in the `CancelAfter` field, the funds can only revert to the sender. |
|
||||
| `DestinationTag` | Number | UInt32 | _(Optional)_ Arbitrary tag to further specify the destination for this escrowed payment, such as a hosted recipient at the destination address. |
|
||||
|
||||
You must specify one of the following combinations of fields:
|
||||
|
||||
| Summary | `FinishAfter` | `Condition` | `CancelAfter` |
|
||||
|-----------------------------------|---------------|-------------|---------------|
|
||||
| Time-based | ✅ | | |
|
||||
| Time-based (XRP only) | ✅ | | |
|
||||
| Time-based with expiration | ✅ | | ✅ |
|
||||
| Timed conditional | ✅ | ✅ | |
|
||||
| Timed conditional (XRP only) | ✅ | ✅ | |
|
||||
| Timed conditional with expiration | ✅ | ✅ | ✅ |
|
||||
| Conditional with expiration | | ✅ | ✅ |
|
||||
|
||||
It is not possible to create a conditional escrow with no expiration, but you can specify an expiration that is very far in the future.
|
||||
|
||||
{% admonition type="info" name="Note" %}
|
||||
Before the [fix1571 amendment][] became enabled on 2018-06-19, it was possible to create an escrow with `CancelAfter` only. These escrows could be finished by anyone at any time before the specified expiration.
|
||||
Before the [fix1571 amendment][] became enabled on 2018-06-19, it was possible to create an XRP escrow with `CancelAfter` only. These escrows could be finished by anyone at any time before the specified expiration.
|
||||
{% /admonition %}
|
||||
|
||||
## Error Cases
|
||||
|
||||
Besides errors that can occur for all transactions, {% $frontmatter.seo.title %} transactions can result in the following [transaction result codes](../transaction-results/index.md):
|
||||
|
||||
| Error Code | Description |
|
||||
|:--------------------- |:---------------------------------------------|
|
||||
| `tecNO_PERMISSION` | The transaction failed because the necessary permissions for token escrow are not in place. For example, the issuer hasn't enabled the Allow Trust Line Locking flag for a Trust Line Token.|
|
||||
| `tecNO_AUTH` | The transaction failed because authorization requirements for the token were not met. For example, the sender lacks authorization when creating the escrow. |
|
||||
| `tecUNFUNDED` | The sender lacks sufficient spendable balance. For Trust Line Tokens, this means the sender's trust line with the issuer has insufficient available balance. For XRP escrows, this means the sender doesn't have enough XRP. |
|
||||
| `tecOBJECT_NOT_FOUND` | The sender does not hold the MPT. |
|
||||
| `tecFROZEN` | The token is frozen (for Trust Line Tokens) or locked (for MPTs) for the sender. |
|
||||
|
||||
## See Also
|
||||
|
||||
- [Escrow entry][]
|
||||
|
||||
@@ -48,6 +48,20 @@ Any account may submit an EscrowFinish transaction.
|
||||
|
||||
In [non-production networks](../../../../concepts/networks-and-servers/parallel-networks.md), it may be possible [to delete](../../../../concepts/accounts/deleting-accounts.md) the destination account of a pending escrow. In this case, an attempt to finish the escrow fails with the result `tecNO_TARGET`, but the escrow object remains unless it has expired normally. If another payment re-creates the destination account, the escrow can be finished successfully. The destination account of an escrow can only be deleted if the escrow was created before the [fix1523 amendment](/resources/known-amendments.md#fix1523) became enabled. No such escrows exist in the production XRP Ledger, so this edge case is not possible on the production XRP Ledger. This edge case is also not possible in test networks that enable both fix1523 and Escrow amendments at the same time, which is the default when you [start a new genesis ledger](../../../../infrastructure/testing-and-auditing/start-a-new-genesis-ledger-in-stand-alone-mode.md).
|
||||
|
||||
## Error Cases
|
||||
|
||||
Besides errors that can occur for all transactions, {% $frontmatter.seo.title %} transactions can result in the following [transaction result codes](../transaction-results/index.md):
|
||||
|
||||
## EscrowFinish Errors
|
||||
|
||||
| Error Code | Description |
|
||||
|:------------------------- |:------------|
|
||||
| `tecNO_AUTH` | The transaction failed because authorization requirements were not met. For example, the issuer requires authorization and the destination is not authorized. |
|
||||
| `tecNO_LINE` | The destination account does not have a trust line with the issuer. For Trust Line Tokens only. |
|
||||
| `tecNO_ENTRY` | The destination account does not hold the MPT. |
|
||||
| `tecINSUFFICIENT_RESERVE` | Unable to create a trust line or MPToken due to lack of reserves. |
|
||||
| `tecFROZEN` | The token is deep frozen (Trust Line Tokens) or locked (for MPTs). |
|
||||
|
||||
## See Also
|
||||
|
||||
- [Escrow entry][]
|
||||
|
||||
@@ -51,8 +51,8 @@ The **destination address** of a channel can:
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Required? | Description |
|
||||
|:----------------|:---------------------|:------------------|:----------|:------------|
|
||||
| `Amount` | [Currency Amount][] | Amount | No | The amount of [XRP, in drops][Currency Amount], or fungible tokens authorized by the `Signature`. This must match the amount in the signed message. This is the cumulative amount that can be dispensed by the channel, including funds previously redeemed. Non-XRP tokens can only be used if the [TokenEscrow amendment][] {% not-enabled /%} is enabled. |
|
||||
| `Balance` | [Currency Amount][] | Amount | No | Total amount of [XRP, in drops][Currency Amount], or fungible tokens delivered by this channel after processing this claim. Required to deliver XRP or fungible tokens. 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. Non-XRP tokens can only be used if the [TokenEscrow amendment][] {% not-enabled /%} is enabled. |
|
||||
| `Amount` | [Currency Amount][] | Amount | No | The amount of XRP, in drops, 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. Must be provided except when closing the channel.|
|
||||
| `Balance` | [Currency Amount][] | Amount | No | Total amount of XRP, in drops, 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 - Hexadecimal | UInt256 | Yes | The unique ID of the channel. |
|
||||
| `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 - Hexadecimal | Blob | No | The public key used for the signature. 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.) |
|
||||
|
||||
@@ -34,7 +34,7 @@ Create a [payment channel](../../../../concepts/payment-types/payment-channels.m
|
||||
|
||||
| Field | JSON Type | [Internal Type][] | Required? | Description |
|
||||
|:-----------------|:---------------------|:------------------|:----------|:------------|
|
||||
| `Amount` | [Currency Amount][] | Amount | Yes | Amount to deduct from the sender's balance and set aside in this channel. While the channel is open, the amount can only go to the `Destination` address. When the channel closes, any unclaimed amount is returned to the source account's balance. Non-XRP tokens can only be used if the [TokenEscrow amendment][] {% not-enabled /%} is enabled. |
|
||||
| `Amount` | [Currency Amount][] | Amount | Yes | Amount of XRP, in drops, to deduct from the sender's balance and set aside in this channel. While the channel is open, the XRP can only go to the `Destination` address. When the channel closes, any unclaimed XRP is returned to the source account's balance. |
|
||||
| `Destination` | String - [Address][] | AccountID | Yes | The account that can receive money from this channel. This is also known as the "destination address" for the channel. Cannot be the same as the sender (`Account`). |
|
||||
| `SettleDelay` | Number | UInt32 | Yes | Amount of time, in seconds, the source address must wait before closing the channel if it has unclaimed funds. |
|
||||
| `PublicKey` | String - Hexadecimal | Blob | Yes | The 33-byte public key of the key pair the source will use to sign claims against this channel. This can be any secp256k1 or Ed25519 public key. For more information on key pairs, see [Key Derivation](../../../../concepts/accounts/cryptographic-keys.md#key-derivation) <!-- STYLE_OVERRIDE: will --> |
|
||||
|
||||
@@ -30,7 +30,7 @@ Add an additional amount to an open [payment channel](../../../../concepts/payme
|
||||
| Field | JSON Type | [Internal Type][] | Required? | Description |
|
||||
|:-------------|:---------------------|:------------------|:----------|:------------|
|
||||
| `Channel` | String - Hexadecimal | UInt256 | Yes | The unique ID of the channel to fund. |
|
||||
| `Amount` | [Currency Amount][] | Amount | Yes | Amount to add to the channel. Must be a positive amount. Non-XRP tokens can only be used if the [TokenEscrow amendment][] {% not-enabled /%} is enabled. |
|
||||
| `Amount` | [Currency Amount][] | Amount | Yes | Amount of XRP, in drops, to add to the channel. Must be a positive amount of XRP. |
|
||||
| `Expiration` | Number | UInt32 | No | New expiration time to set for the channel, in [seconds since the Ripple Epoch][]. This must be later than either the current time plus the `SettleDelay` of the channel, or the existing `Expiration` of the channel. After the `Expiration` time, any transaction that would access the channel closes the channel without taking its normal action. (`Expiration` is separate from the channel's immutable `CancelAfter` time.) For more information, see the [PayChannel ledger entry type](../../ledger-data/ledger-entry-types/paychannel.md). |
|
||||
|
||||
## Error Cases
|
||||
|
||||
Reference in New Issue
Block a user