Escrow
(Added by the [Escrow amendment][].)
The Escrow
object type represents a held payment of XAH or IOU waiting to be executed or canceled. An [EscrowCreate transaction][] creates an Escrow
object in the ledger. A successful [EscrowFinish][] or [EscrowCancel][] transaction deletes the object.
If the Escrow
object has a crypto-condition, the payment can only succeed if an EscrowFinish transaction provides the corresponding fulfillment that satisfies the condition. (The only supported crypto-condition type is PREIMAGE-SHA-256.) If the Escrow
object has a FinishAfter
time, the held payment can only execute after that time.
An Escrow
object is associated with two addresses:
The owner, who provides the XAH or IOU when creating the
Escrow
object. If the held payment is canceled, the XAH or IOU returns to the owner.The destination, where the XAH or IOU is paid when the held payment succeeds. The destination can be the same as the owner.
Example JSON
Fields
An Escrow
object has the following fields:
Account
String
AccountID
Yes
The address of the owner (sender) of this held payment. This is the account that provided the amount, and gets it back if the held payment is canceled.
Amount
String or Object
Amount
Yes
The amount to be delivered by the held payment.
CancelAfter
Number
UInt32
No
The held payment 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
Destination
String
AccountID
Yes
The destination address where the amount is paid if the held payment 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][].
DestinationTag
Number
UInt32
No
An arbitrary tag to further specify the destination for this held payment, such as a hosted recipient at the destination address.
FinishAfter
Number
UInt32
No
The time, in [seconds since the Ripple Epoch][], after which this held payment can be finished. Any [EscrowFinish transaction][] before this time fails. (Specifically, this is compared with the close time of the previous validated ledger.)
Flags
Number
UInt32
Yes
A bit-map of boolean flags enabled for this object. Currently, the protocol defines no flags for Escrow
objects. The value is always 0
.
LedgerEntryType
String
UInt16
Yes
The value 0x0075
, mapped to the string Escrow
, indicates that this object is an Escrow
object.
OwnerNode
String
UInt64
Yes
A hint indicating which page of the 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.
SourceTag
Number
UInt32
No
An arbitrary tag to further specify the source for this held payment, such as a hosted recipient at the owner's address.
TransferRate
Number
UInt32
No
Escrow ID Format
The ID of an Escrow
object is the [SHA-512Half][] of the following values, concatenated in order:
The Escrow space key (
0x0075
)The AccountID of the sender of the [EscrowCreate transaction][] that created the
Escrow
objectThe Sequence number of the [EscrowCreate transaction][] that created the
Escrow
object If the EscrowCreate transaction used a Ticket, use theTicketSequence
value instead.
Last updated