Escrow

[Source]

(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

{
    "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
    "Amount": "10000",
    "CancelAfter": 545440232,
    "Condition": "A0258020A82A88B2DF843A54F58772E4A3861866ECDB4157645DD9AE528C1D3AEEDABAB6810120",
    "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
    "DestinationTag": 23480,
    "FinishAfter": 545354132,
    "Flags": 0,
    "LedgerEntryType": "Escrow",
    "OwnerNode": "0000000000000000",
    "DestinationNode": "0000000000000000",
    "PreviousTxnID": "C44F2EB84196B9AD820313DBEBA6316A15C9A2D35787579ED172B87A30131DA7",
    "PreviousTxnLgrSeq": 28991004,
    "SourceTag": 11747,
    "index": "DC5F3851D8A1AB622F957761E5963BC5BD439D5C24AC6AD7AC4523F0640244AC"
}

Fields

An Escrow object has the following fields:

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 object

  • The Sequence number of the [EscrowCreate transaction][] that created the Escrow object If the EscrowCreate transaction used a Ticket, use the TicketSequence value instead.

Last updated