See the canonical spec:
.TypeScriptimport { Client, Wallet } from 'xrpl'; async function setAccountFlags(): Promise<void> { const client = new Client('wss://honeycluster.dev'); await client.connect(); const wallet = Wallet.fromSeed('s...'); const prepared = await client.autofill({ TransactionType: 'AccountSet', Account: wallet.address, SetFlag: 8, }); const signed = wallet.sign(prepared); const res = await client.submitAndWait(signed.tx_blob); console.log(res); await client.disconnect(); } setAccountFlags().catch(console.error);
| Field | Type | Required | Description |
|---|---|---|---|
Account | String | Yes | The address of the account to modify |
SetFlag | Number | No | Flag to enable for the account |
ClearFlag | Number | No | Flag to disable for the account |
Domain | String | No | Domain associated with the account |
EmailHash | String | No | Hash of the account's email address |
MessageKey | String | No | Public key for sending encrypted messages |
TransferRate | Number | No | Fee charged for transfers (in parts per million) |
Common Flags:
8 (lsfDefaultRipple): Enable rippling on trust lines
16 (lsfDepositAuth): Require authorization for deposits
32 (lsfDisableMaster): Disable the master key
64 (lsfDisallowXRP): Reject incoming XRP payments
128 (lsfGlobalFreeze): Freeze all trust lines
256 (lsfNoFreeze): Prevent freezing of trust lines
512 (lsfRequireAuth): Require authorization for trust lines
1024 (lsfRequireDestTag): Require destination tags for payments
TransferRate:
Range: 0 to 2000000000
Represents parts per million (e.g., 1000000 = 100%)
Default: 0 (no fee)
Use SetFlag or ClearFlag to modify account flags
Domain, EmailHash, MessageKey, and TransferRate are optional fields
Always use autofill to set fees and sequence safely when using the XRPL client library