Last updated
Edit

EscrowFinish

[Source]

Deliver funds from an escrow to the recipient.

Example EscrowFinish JSON

{
    "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
    "TransactionType": "EscrowFinish",
    "Owner": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
    "OfferSequence": 7,
    "Condition": "A0258020E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855810100",
    "Fulfillment": "A0028000"
}
Query example transaction

EscrowFinish Fields

In addition to the common fields, EscrowFinish transactions use the following fields:

FieldJSON TypeInternal TypeRequired?Description
OwnerString - AddressAccountIDYesThe source account that funded the escrow.
OfferSequenceNumberUInt32YesTransaction sequence of EscrowCreate transaction that created the escrow to finish.
ConditionString - HexadecimalBlobNoThe (previously-supplied) PREIMAGE-SHA-256 crypto-condition of the escrow.
CredentialIDsArray of StringsVector256NoSet 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.
FulfillmentString - HexadecmialBlobNoThe PREIMAGE-SHA-256 crypto-condition fulfillment matching the escrow's Condition.

Any account may submit an EscrowFinish transaction.

  • If the escrow has a FinishAfter time, you cannot execute it before this time. Specifically, if the corresponding EscrowCreate transaction specified a FinishAfter time that is after the close time of the most recently-closed ledger, the EscrowFinish transaction fails.
  • If the escrow has a Condition, you cannot execute it unless you provide a matching Fulfillment for the condition.
  • You cannot execute an escrow after it has expired. Specifically, if the corresponding EscrowCreate transaction specified a CancelAfter time that is before the close time of the most recently-closed ledger, the EscrowFinish transaction fails.

Note
The minimum transaction cost to submit an EscrowFinish transaction increases if it contains a fulfillment. If the transaction has no fulfillment, the transaction cost is the standard ledger base fee, typically 10 drops. If the transaction contains a fulfillment, the transaction cost is 330 drops of XRP plus another 10 drops for every 16 bytes in size of the preimage. Should the validators vote to increase or lower the base fee, the cost per 16 bytes is adjusted accordingly.

In non-production networks, it may be possible to delete 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 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.

Error Cases

Besides errors that can occur for all transactions, EscrowFinish transactions can result in the following transaction result codes:

Error CodeDescription
tecNO_AUTHThe transaction failed because authorization requirements were not met. For example, the issuer requires authorization and the destination is not authorized.
tecNO_LINEThe destination account does not have a trust line with the issuer. For Trust Line Tokens only.
tecNO_ENTRYThe destination account does not hold the MPT.
tecINSUFFICIENT_RESERVEUnable to create a trust line or MPToken due to lack of reserves.
tecFROZENThe token is deep frozen (Trust Line Tokens) or locked (for MPTs).

See Also