See the canonical spec:
.TypeScriptimport { Client, Wallet } from 'xrpl'; async function setDepositPreauth(): Promise<void> { const client = new Client('wss://honeycluster.dev'); await client.connect(); const wallet = Wallet.fromSeed('s...'); const prepared = await client.autofill({ TransactionType: 'DepositPreauth', Account: wallet.address, Authorize: 'r...other', }); const signed = wallet.sign(prepared); const res = await client.submitAndWait(signed.tx_blob); console.log(res); await client.disconnect(); } setDepositPreauth().catch(console.error);
| Field | Type | Required | Description |
|---|---|---|---|
Account | String | Yes | The address of the account setting preauthorization |
Authorize | String | No | The address to authorize for deposits without destination tags |
Unauthorize | String | No | The address to remove preauthorization from |
Usage:
To authorize: Set Authorize field
To remove authorization: Set Unauthorize field
Only one of these fields should be specified
Note:
Allows authorized accounts to send payments without destination tags
Useful for exchanges and services that need to send payments
The authorized account can send payments to this account without specifying a destination tag
Authorizes another account to send payments without destination tags
Authorize specifies the account to authorize
Unauthorize removes authorization from an account
Useful for exchanges and services that need to send payments
Always use autofill to set fees and sequence safely when using the XRPL client library