See the canonical spec:
.TypeScriptimport { Client, Wallet } from 'xrpl'; async function cancelEscrow(): Promise<void> { const client = new Client('wss://honeycluster.dev'); await client.connect(); const wallet = Wallet.fromSeed('s...'); const prepared = await client.autofill({ TransactionType: 'EscrowCancel', 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(); } cancelEscrow().catch(console.error);
| Field | Type | Required | Description |
|---|---|---|---|
Account | String | Yes | The address of the account cancelling the escrow |
Owner | String | Yes | The address that created the escrow |
OfferSequence | Number | Yes | Sequence number of the escrow to cancel |
OfferSequence:
Must reference an existing escrow from the specified owner
The escrow will be cancelled and XRP returned to the creator
Note:
Can only be executed after the CancelAfter time has passed
The creator account receives the escrowed XRP back
This action is irreversible once executed
Cancels an escrow and returns XRP to the creator
Can only be executed after the CancelAfter time has passed
Owner must be the account that created the escrow
OfferSequence identifies the specific escrow to cancel
Always use autofill to set fees and sequence safely when using the XRPL client library