See the canonical spec:
.TypeScriptimport { Client, Wallet } from 'xrpl'; async function clawbackTokens(): Promise<void> { const client = new Client('wss://honeycluster.dev'); await client.connect(); const wallet = Wallet.fromSeed('s...'); const prepared = await client.autofill({ TransactionType: 'Clawback', Account: wallet.address, Amount: { currency: 'USD', issuer: 'r...holder', value: '10' }, }); const signed = wallet.sign(prepared); const res = await client.submitAndWait(signed.tx_blob); console.log(res); await client.disconnect(); } clawbackTokens().catch(console.error);
| Field | Type | Required | Description |
|---|---|---|---|
Account | String | Yes | The address of the currency issuer performing the clawback |
Amount | Object | Yes | The currency and amount to claw back |
Amount Object:
Json{ "currency": "USD", "issuer": "r...holder", "value": "10" }
Note:
Can only be executed by the currency issuer
The target account must have the clawback flag enabled
The clawed back tokens are returned to the issuer
This action is irreversible and cannot be undone
Requires the currency to be configured with clawback enabled
Recovers issued currency from accounts with clawback enabled
Can only be executed by the currency issuer
Amount specifies the currency and amount to claw back
Requires the target account to have clawback flag enabled
Always use autofill to set fees and sequence safely when using the XRPL client library