You can use the AccountSet operation to update account settings. This operation involves the creation of a transaction order.
For more information about the AccountSet operation, see AccountSet Flags in the XRPL documentation.
System change process
All new requests to change the system state follow the same process. To familiarize yourself with this process first, see Manage intents and approvals.
You can set or clear the following settings:
asfGlobalFreeze: Freeze all assets issued by the account.asfNoFreeze: Permanently give up the ability to freeze individual trust lines or disable global freeze on the issuer account. This flag can only be set once and can't be unset.asfRequireAuth: Require authorization for accounts to hold balances issued by this address.asfAllowTrustLineClawback: Allow the issuer account to claw back tokens it has issued. Can only be set before issuing tokens.asfAccountTxnID: Track the ID of this account's most recent transaction.asfDepositAuth: Enable deposit authorization on the holder account. Applies to both tokens and XRP.asfRequireDest: Require a destination tag for incoming payments to the account.asfDefaultRipple: Enable rippling on this account's trust lines by default. For more information, see Rippling in the XRPL documentation.
To update account settings, follow the steps in Manage intents and approvals with a transaction order payload similar to the following example.
{
"payload": {
"id": "8fd2d859-77de-4bcc-976c-3f4ccdfdcc3d",
"accountId": "c8b9519a-be18-4db7-9aca-cce93834841b",
"parameters": {
"operation": {
"type": "AccountSet",
"setFlag": "asfGlobalFreeze",
"clearFlag": "asfNoFreeze",
"transferRate": 1000000000
},
"sourceTag": 123456,
"memos": [],
"feeStrategy": {
"drops": "5",
"type": "SpecifiedAdditionalFee"
},
"maximumFee": "50",
"type": "XRPL"
},
"description": "string",
"customProperties": {},
"type": "v0_CreateTransactionOrder"
}
}Fields of the payload block to note are as follows:
| Field | Description |
|---|---|
id | ID of the transaction order |
accountId | ID of the account to update |
parameters.operation | Details of the operation:
setFlag, clearFlag, or transferRate. For a list of supported settings, see Supported settings. |
parameters.sourceTag | Optional source tag for the XRPL transaction. |
parameters.memos | XRPL memos to include. Use an empty array when there are no memos. |
parameters.feeStrategy | The fee strategy to use for the transaction. For more information, see Fee strategy and maximum fee. |
parameters.maximumFee | The maximum fee, in drops. For more information, see Fee strategy and maximum fee. |
parameters.type | Ledger type, in this case XRPL. |
type | v0_CreateTransactionOrder |