See the canonical spec:
.TypeScriptimport { Client, Wallet } from 'xrpl'; async function finishEscrow(): Promise<void> { const client = new Client('wss://honeycluster.dev'); await client.connect(); const wallet = Wallet.fromSeed('s...'); const prepared = await client.autofill({ TransactionType: 'EscrowFinish', Account: wallet.address, Owner: 'r...owner', OfferSequence: 123, }); const signed = wallet.sign(prepared); const res = await client.submitAndWait(signed.tx_blob); console.log(res); await client.disconnect(); } finishEscrow().catch(console.error);
| Field | Type | Required | Description |
|---|---|---|---|
Account | String | Yes | The address of the account finishing the escrow |
Owner | String | Yes | The address that created the escrow |
OfferSequence | Number | Yes | Sequence number of the escrow to finish |
Condition | String | No | Hex-encoded condition for conditional escrow |
Fulfillment | String | No | Hex-encoded fulfillment matching the condition |
OfferSequence:
Must reference an existing escrow from the specified owner
The escrow will be finished and XRP transferred to the destination
Condition/Fulfillment:
For conditional escrows, both fields must be provided
Fulfillment must match the Condition specified in EscrowCreate
For time-based escrows, these fields are not required
Note:
Can only be executed after the FinishAfter time has passed
The destination account receives the escrowed XRP
Releases XRP from a completed escrow
Can only be executed after the FinishAfter time has passed
Owner must be the account that created the escrow
OfferSequence identifies the specific escrow to finish
Always use autofill to set fees and sequence safely when using the XRPL client library