# AccountSet [[Source]](https://github.com/XRPLF/rippled/blob/master/src/xrpld/app/tx/detail/SetAccount.cpp) Modify the settings or properties of an [account in the XRP Ledger](/es-es/docs/concepts/accounts). ## Example JSON ```json { "TransactionType": "AccountSet", "Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "Fee": "12", "Sequence": 5, "Domain": "6578616D706C652E636F6D", "SetFlag": 5, "MessageKey": "03AB40A0490F9B7ED8DF29D246BF2D6269820A0EE7742ACDD457BEA7C7D0931EDB" } ``` ## Fields In addition to the [common fields](/docs/references/protocol/transactions/common-fields), transactions use the following fields: | Field | JSON Type | [Internal Type](/docs/references/protocol/binary-format) | Description | | --- | --- | --- | --- | | [`ClearFlag`](#accountset-flags) | Number | UInt32 | Unique identifier of a flag to disable for this account. | | [`Domain`](#domain) | String | Blob | The domain that owns this account, as a string of hex representing the ASCII for the domain in lowercase. [Cannot be more than 256 bytes in length.](https://github.com/XRPLF/rippled/blob/70d5c624e8cf732a362335642b2f5125ce4b43c1/include/xrpl/protocol/Protocol.h#L98) | | `EmailHash` | String | UInt128 | An arbitrary 128-bit value. Conventionally, clients treat this as the md5 hash of an email address to use for displaying a [Gravatar](http://en.gravatar.com/site/implement/hash/) image. | | `MessageKey` | String | Blob | Public key for sending encrypted messages to this account. To set the key, it must be exactly 33 bytes, with the first byte indicating the key type: `0x02` or `0x03` for secp256k1 keys, `0xED` for Ed25519 keys. To remove the key, use an empty value. | | `NFTokenMinter` | String - [Address](/docs/references/protocol/data-types/basic-data-types#addresses) | AccountID | Another account that can [mint NFTokens for you](/es-es/docs/tutorials/javascript/nfts/assign-an-authorized-minter). | | [`SetFlag`](#accountset-flags) | Number | UInt32 | Integer flag to enable for this account. | | [`TransferRate`](#transferrate) | Number | UInt32 | The fee to charge when users transfer this account's tokens, represented as billionths of a unit. Cannot be more than `2000000000` or less than `1000000000`, except for the special case `0` meaning no fee. | | [`TickSize`](/es-es/docs/concepts/tokens/decentralized-exchange/ticksize) | Number | UInt8 | *(Optional)* Tick size to use for offers involving a currency issued by this address. The exchange rates of those offers is rounded to this many significant digits. Valid values are `3` to `15` inclusive, or `0` to disable. | | `WalletLocator` | String | UInt256 | An arbitrary 256-bit value. If specified, the value is stored as part of the account but has no inherent meaning or requirements. | | `WalletSize` | Number | UInt32 | Not used. This field is valid in AccountSet transactions but does nothing. | (All fields are optional.) If none of these options are provided, then the AccountSet transaction has no effect (beyond destroying the transaction cost). See [Cancel or Skip a Transaction](/es-es/docs/concepts/transactions/finality-of-results/canceling-a-transaction) for more details. ## Domain The `Domain` field is represented as the hex string of the lowercase ASCII of the domain. For example, the domain *example.com* would be represented as `"6578616D706C652E636F6D"`. To remove the `Domain` field from an account, send an AccountSet with the Domain set to an empty string. You can put any domain in your account's `Domain` field. To prove that an account and domain belong to the same person or business, you need a "two-way link": - Accounts you own should have a domain you own in the `Domain` field. - At that domain, host an [xrp-ledger.toml file](/es-es/docs/references/xrp-ledger-toml) listing accounts you own, and optionally other information about how you use the XRP Ledger. ## AccountSet Flags There are several options which can be either enabled or disabled for an account. Account options are represented by different types of flags depending on the situation: * The `AccountSet` transaction type has several "AccountSet Flags" (prefixed **`asf`**) that can enable an option when passed as the `SetFlag` parameter, or disable an option when passed as the `ClearFlag` parameter. Newer options have only this style of flag. You can enable up to one `asf` flag per transaction, and disable up to one `asf` flag per transaction. * The `AccountSet` transaction type has several transaction flags (prefixed **`tf`**) that can be used to enable or disable specific account options when passed in the `Flags` parameter. You can enable and disable a combination of settings in one transaction using multiple `tf` flags, but not all settings have `tf` flags. * The `AccountRoot` ledger object type has several ledger-state-flags (prefixed **`lsf`**) which represent the state of particular account options within a particular ledger. These settings apply until a transaction changes them. To enable or disable Account Flags, use the `SetFlag` and `ClearFlag` parameters of an AccountSet transaction. AccountSet flags have names that begin with **`asf`**. All flags are disabled by default. The available AccountSet flags are: | Flag Name | Decimal Value | Description | | --- | --- | --- | | `asfAccountTxnID` | 5 | Track the ID of this account's most recent transaction. Required for [`AccountTxnID`](/es-es/docs/references/protocol/transactions/common-fields#accounttxnid) | | `asfAllowTrustLineClawback` | 16 | Allow account to claw back tokens it has issued. *(Requires the Clawback amendment.)* Can only be set if the account has an empty owner directory (no trust lines, offers, escrows, payment channels, checks, or signer lists). After you set this flag, it cannot be reverted. The account permanently gains the ability to claw back issued assets on trust lines. | | `asfAllowTrustLineLocking` | 17 | Allow Trust Line tokens issued by this account to be held in [escrow](/es-es/docs/concepts/payment-types/escrow). If not enabled, tokens issued by this account can't be escrowed. After you enable this flag, it cannot be disabled. | | `asfAuthorizedNFTokenMinter` | 10 | Enable to allow another account to mint non-fungible tokens (NFTokens) on this account's behalf. Specify the authorized account in the `NFTokenMinter` field of the [AccountRoot](/es-es/docs/references/protocol/ledger-data/ledger-entry-types/accountroot) object. To remove an authorized minter, enable this flag and omit the `NFTokenMinter` field. | | `asfDefaultRipple` | 8 | Enable [rippling](/es-es/docs/concepts/tokens/fungible-tokens/rippling) on this account's trust lines by default. | | `asfDepositAuth` | 9 | Enable [Deposit Authorization](/es-es/docs/concepts/accounts/depositauth) on this account. | | `asfDisableMaster` | 4 | Disallow use of the master key pair. Can only be enabled if the account has configured another way to sign transactions, such as a [Regular Key](/es-es/docs/concepts/accounts/cryptographic-keys) or a [Signer List](/es-es/docs/concepts/accounts/multi-signing). | | `asfDisallowIncomingCheck` | 13 | Block incoming Checks. | | `asfDisallowIncomingNFTokenOffer` | 12 | Block incoming NFTokenOffers. | | `asfDisallowIncomingPayChan` | 14 | Block incoming Payment Channels. | | `asfDisallowIncomingTrustline` | 15 | Block incoming trust lines. | | `asfDisallowXRP` | 3 | XRP should not be sent to this account. (Advisory; not enforced by the XRP Ledger protocol.) | | `asfGlobalFreeze` | 7 | [Freeze](/es-es/docs/concepts/tokens/fungible-tokens/freezes) all assets issued by this account. | | `asfNoFreeze` | 6 | Permanently give up the ability to [freeze individual trust lines or disable Global Freeze](/es-es/docs/concepts/tokens/fungible-tokens/freezes). This flag can never be disabled after being enabled. | | `asfRequireAuth` | 2 | Require authorization for users to hold balances issued by this address. Can only be enabled if the address has no trust lines connected to it. | | `asfRequireDest` | 1 | Require a destination tag to send transactions to this account. | For reference, here are the corresponding ledger flags for each AccountSet flag: | AccountSet Flag Name | Corresponding Ledger Flag | | --- | --- | | `asfAccountTxnID` | (None) | | `asfAllowTrustLineClawback` | `lsfAllowTrustlineClawback` | | `asfAuthorizedNFTokenMinter` | (None) | | `asfDefaultRipple` | `lsfDefaultRipple` | | `asfDepositAuth` | `lsfDepositAuth` | | `asfDisableMaster` | `lsfDisableMaster` | | `asfDisallowIncomingCheck` | `lsfDisallowIncomingCheck` | | `asfDisallowIncomingNFTokenOffer` | `lsfDisallowIncomingNFTokenOffer` | | `asfDisallowIncomingPayChan` | `lsfDisallowIncomingPayChan` | | `asfDisallowIncomingTrustline` | `lsfDisallowIncomingTrustline` | | `asfDisallowXRP` | `lsfDisallowXRP` | | `asfGlobalFreeze` | `lsfGlobalFreeze` | | `asfNoFreeze` | `lsfNoFreeze` | | `asfRequireAuth` | `lsfRequireAuth` | | `asfRequireDest` | `lsfRequireDestTag` | To enable the `asfDisableMaster` or `asfNoFreeze` flags, you must [authorize the transaction](/es-es/docs/concepts/transactions#authorizing-transactions) by signing it with the master key pair. You cannot use a regular key pair or a multi-signature. You can disable `asfDisableMaster` (that is, re-enable the master key pair) using a regular key pair or multi-signature. The following [Transaction flags](/es-es/docs/references/protocol/transactions/common-fields#flags-field) (`tf` flags), specific to the AccountSet transaction type, serve the same purpose. Due to limited space, some settings do not have associated `tf` flags, and new `tf` flags are not being added to the `AccountSet` transaction type. You can use a combination of `tf` and `asf` flags to enable multiple settings with a single transaction. | Flag Name | Hex Value | Decimal Value | Replaced by AccountSet Flag | | --- | --- | --- | --- | | `tfRequireDestTag` | `0x00010000` | 65536 | `asfRequireDest` (`SetFlag`) | | `tfOptionalDestTag` | `0x00020000` | 131072 | `asfRequireDest` (`ClearFlag`) | | `tfRequireAuth` | `0x00040000` | 262144 | `asfRequireAuth` (`SetFlag`) | | `tfOptionalAuth` | `0x00080000` | 524288 | `asfRequireAuth` (`ClearFlag`) | | `tfDisallowXRP` | `0x00100000` | 1048576 | `asfDisallowXRP` (`SetFlag`) | | `tfAllowXRP` | `0x00200000` | 2097152 | `asfDisallowXRP` (`ClearFlag`) | The numeric values of `tf` and `asf` flags in transactions do not match up with the values they set in the accounts "at rest" in the ledger. To read the flags of an account in the ledger, see [`AccountRoot` flags](/es-es/docs/references/protocol/ledger-data/ledger-entry-types/accountroot#accountroot-flags). ### Blocking Incoming Transactions Incoming transactions with unclear purposes may be an inconvenience for financial institutions, who would have to recognize when a customer made a mistake, and then potentially refund accounts or adjust balances depending on the mistake. The `asfRequireDest` and `asfDisallowXRP` flags are intended to protect users from accidentally sending funds in a way that is unclear about the reason the funds were sent. For example, a destination tag is typically used to identify which hosted balance should be credited when a financial institution receives a payment. If the destination tag is omitted, it may be unclear which account should be credited, creating a need for refunds, among other problems. By using the `asfRequireDest` tag, you can ensure that every incoming payment has a destination tag, which makes it harder for others to send you an ambiguous payment by accident. You can protect against unwanted incoming payments for non-XRP currencies by not creating trust lines in those currencies. Since XRP does not require trust, the `asfDisallowXRP` flag is used to discourage users from sending XRP to an account. However, this flag is not enforced in the XRP Ledger protocol because it could potentially cause accounts to become unusable if they run out of XRP. Instead, client applications should disallow or discourage XRP payments to accounts with the `asfDisallowXRP` flag enabled. If you want to block *all* incoming payments, you can enable [Deposit Authorization](/es-es/docs/concepts/accounts/depositauth). This prevents any transaction from sending money to you, even XRP, unless your account is below the [reserve requirement](/es-es/docs/concepts/accounts/reserves). If the [DisallowIncoming amendment](/resources/known-amendments#disallowincoming) is enabled, you also have the option to block all incoming Checks, NFTokenOffers, Payment Channels, and trust lines. It is generally harmless to be on the receiving end of these objects, but they can block you from deleting your account and it can be confusing to have objects you didn't expect mixed in with the list of objects you created. To block incoming objects, use one or more of these account flags: - `asfDisallowIncomingCheck` - for Check objects - `asfDisallowIncomingNFTOffer` - for NFTokenOffer objects - `asfDisallowIncomingPayChan` - for PayChannel objects - `asfDisallowIncomingTrustline` - for RippleState (trust line) objects When a transaction would create one of these ledger entries, if the destination account has the corresponding flag enabled, the transaction fails with the result code `tecNO_PERMISSION`. Unlike Deposit Authorization, these settings do not prevent you from receiving payments in general. Also, enabling this setting doesn't stop you from creating these types of objects yourself (unless the destination of your transaction is also using the setting, of course). ## TransferRate The `TransferRate` field specifies a fee to charge whenever counterparties transfer the currency you issue. In the HTTP and WebSocket APIs, the transfer fee is represented as an integer, the amount that must be sent for 1 billion units to arrive. For example, a 20% transfer fee is represented as the value `1200000000`. The value cannot be less than 1000000000. (Less than that would indicate giving away money for sending transactions, which is exploitable.) You can specify `0` as a shortcut for `1000000000`, meaning no fee. See [Transfer Fees](/es-es/docs/concepts/tokens/fungible-tokens/transfer-fees) for more information. ## NFTokenMinter To remove an authorized minter, set `ClearFlag` to 10 (`asfAuthorizedNFTokenMinter`) and omit the `NFTokenMinter` field. ## See Also - [AccountRoot entry](/docs/references/protocol/ledger-data/ledger-entry-types/accountroot)