Last updated



An AccountRoot ledger entry type describes a single account, its settings, and XRP balance.

Example AccountRoot JSON

    "Account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
    "AccountTxnID": "0D5FB50FA65C9FE1538FD7E398FFFE9D1908DFA4576D8D7A020040686F93C77D",
    "Balance": "148446663",
    "Domain": "6D64756F31332E636F6D",
    "EmailHash": "98B4375E1D753E5B91627516F6D70977",
    "Flags": 8388608,
    "LedgerEntryType": "AccountRoot",
    "MessageKey": "0000000000000000000000070000000300",
    "OwnerCount": 3,
    "PreviousTxnID": "0D5FB50FA65C9FE1538FD7E398FFFE9D1908DFA4576D8D7A020040686F93C77D",
    "PreviousTxnLgrSeq": 14091160,
    "Sequence": 336,
    "TransferRate": 1004999999,
    "index": "13F1A95D7AAB7108D5CE7EEAF504B2894B8C674E6D68499076441C4837282BF8"

AccountRoot Fields

In addition to the common fields, AccountRoot entries have the following fields:

FieldJSON TypeInternal TypeRequired?Description
AccountStringAccountIDYesThe identifying (classic) address of this account.
AccountTxnIDStringHash256NoThe identifying hash of the transaction most recently sent by this account. This field must be enabled to use the AccountTxnID transaction field. To enable it, send an AccountSet transaction with the asfAccountTxnID flag enabled.
AMMIDStringHash256No(Requires the AMM amendment) The ledger entry ID of the corresponding AMM ledger entry. Set during account creation; cannot be modified. If present, indicates that this is a special AMM AccountRoot; always omitted on non-AMM accounts.
BalanceStringAmountNoThe account's current XRP balance in drops, represented as a string.
BurnedNFTokensNumberUInt32NoHow many total of this account's issued non-fungible tokens have been burned. This number is always equal or less than MintedNFTokens.
DomainStringBlobNoA domain associated with this account. In JSON, this is the hexadecimal for the ASCII representation of the domain. Cannot be more than 256 bytes in length.
EmailHashStringHash128NoThe md5 hash of an email address. Clients can use this to look up an avatar through services such as Gravatar.
FirstNFTokenSequenceNumberUInt32NoThe account's Sequence Number at the time it minted its first non-fungible-token. (Added by the fixNFTokenRemint amendment)
LedgerEntryTypeStringUInt16YesThe value 0x0061, mapped to the string AccountRoot, indicates that this is an AccountRoot object.
MessageKeyStringBlobNoA public key that may be used to send encrypted messages to this account. In JSON, uses hexadecimal. Must be exactly 33 bytes, with the first byte indicating the key type: 0x02 or 0x03 for secp256k1 keys, 0xED for Ed25519 keys.
MintedNFTokensNumberUInt32NoHow many total non-fungible tokens have been minted by and on behalf of this account. (Added by the NonFungibleTokensV1_1 amendment)
NFTokenMinterStringAccountIDNoAnother account that can mint non-fungible tokens on behalf of this account. (Added by the NonFungibleTokensV1_1 amendment)
OwnerCountNumberUInt32YesThe number of objects this account owns in the ledger, which contributes to its owner reserve.
PreviousTxnIDStringHash256YesThe identifying hash of the transaction that most recently modified this object.
PreviousTxnLgrSeqNumberUInt32YesThe index of the ledger that contains the transaction that most recently modified this object.
RegularKeyStringAccountIDNoThe address of a key pair that can be used to sign transactions for this account instead of the master key. Use a SetRegularKey transaction to change this value.
SequenceNumberUInt32YesThe sequence number of the next valid transaction for this account.
TicketCountNumberUInt32NoHow many Tickets this account owns in the ledger. This is updated automatically to ensure that the account stays within the hard limit of 250 Tickets at a time. This field is omitted if the account has zero Tickets. (Added by the TicketBatch amendment.)
TickSizeNumberUInt8NoHow many significant digits to use for exchange rates of Offers involving currencies issued by this address. Valid values are 3 to 15, inclusive. (Added by the TickSize amendment.)
TransferRateNumberUInt32NoA transfer fee to charge other users for sending currency issued by this account to each other.
WalletLocatorStringHash256NoAn arbitrary 256-bit value that users can set.
WalletSizeNumberUInt32NoUnused. (The code supports this field but there is no way to set it.)

Special AMM AccountRoot Entries

(Requires the AMM amendment)

Automated Market Makers use an AccountRoot ledger entry to issue their LP Tokens and hold the assets in the AMM pool, and an AMM ledger entry for tracking some of the details of the AMM. The address of an AMM's AccountRoot is randomized so that users cannot identify and fund the address in advance of the AMM being created. Unlike normal accounts, AMM AccountRoot objects are created with the following settings:

  • lsfDisableMaster enabled and no means of authorizing transactions. This ensures no one can control the account directly, and it cannot send transactions.
  • lsfDepositAuth enabled and no accounts preauthorized. This ensures that the only way to add money to the AMM Account is using the AMMDeposit transaction.
  • lsfDefaultRipple enabled. This ensures that users can send and trade the AMM's LP Tokens among themselves.

In addition, the following special rules apply to an AMM's AccountRoot entry:

  • It is not subject to the reserve requirement. It can hold XRP only if XRP is one of the two assets in the AMM's pool.
  • It cannot be the destination of Checks, Escrows, or Payment Channels. Any transactions that would create such entries instead fail with the result code tecNO_PERMISSION.
  • Users cannot create trust lines to it for anything other than the AMM's LP Tokens. Transactions that would create such trust lines instead fail with result code tecNO_PERMISSION. (The AMM does have two trust lines to hold the tokens in its pool, or one trust line if the other asset in its pool is XRP.)
  • If the Clawback amendment is also enabled, the issuer cannot clawback funds from an AMM.

Other than those exceptions, these accounts are like ordinary accounts; the LP Tokens they issue behave like other tokens except that those tokens can also be used in AMM-related transactions. You can check an AMM's balances and the history of transactions that affected it the same way you would with a regular account.

AccountRoot Flags

Many AccountRoot flags correspond to options you can change with an AccountSet transaction. However, the bit values used in the ledger are different than the values used to enable or disable those flags in a transaction. Ledger flags have names that begin with lsf.

AccountRoot objects can have the following flags combined in the Flags field:

Flag NameHex ValueDecimal ValueCorresponding AccountSet FlagDescription
lsfAllowTrustLineClawback0x800000002147483648asfAllowTrustLineClawbackEnable Clawback for this account. (Requires the Clawback amendment.)
lsfDefaultRipple0x008000008388608asfDefaultRippleEnable rippling on this addresses's trust lines by default. Required for issuing addresses; discouraged for others.
lsfDepositAuth0x0100000016777216asfDepositAuthThis account has DepositAuth enabled, meaning it can only receive funds from transactions it sends, and from preauthorized accounts. (Added by the DepositAuth amendment)
lsfDisableMaster0x001000001048576asfDisableMasterDisallows use of the master key to sign transactions for this account.
lsfDisallowIncomingCheck0x08000000134217728asfDisallowIncomingCheckThis account blocks incoming Checks. (Added by the DisallowIncoming amendment.)
lsfDisallowIncomingNFTokenOffer0x0400000067108864asfDisallowIncomingNFTokenOfferThis account blocks incoming NFTokenOffers. (Added by the DisallowIncoming amendment.)
lsfDisallowIncomingPayChan0x10000000268435456asfDisallowIncomingPayChanThis account blocks incoming Payment Channels. (Added by the DisallowIncoming amendment.)
lsfDisallowIncomingTrustline0x20000000536870912asfDisallowIncomingTrustlineThis account blocks incoming trust lines. (Added by the DisallowIncoming amendment.)
lsfDisallowXRP0x00080000524288asfDisallowXRPClient applications should not send XRP to this account. (Advisory; not enforced by the protocol.)
lsfGlobalFreeze0x004000004194304asfGlobalFreezeAll assets issued by this account are frozen.
lsfNoFreeze0x002000002097152asfNoFreezeThis account cannot freeze trust lines connected to it. Once enabled, cannot be disabled.
lsfPasswordSpent0x0001000065536(None)This account has used its free SetRegularKey transaction.
lsfRequireAuth0x00040000262144asfRequireAuthThis account must individually approve other users for those users to hold this account's tokens.
lsfRequireDestTag0x00020000131072asfRequireDestRequires incoming payments to specify a Destination Tag.

AccountRoot Reserve

The reserve for an AccountRoot entry is the base reserve, currently 10 XRP, except in the case of a special AMM AccountRoot.

This XRP cannot be sent to others but it can be burned as part of the transaction cost.

AccountRoot ID Format

The ID of an AccountRoot entry is the SHA-512Half of the following values, concatenated in order:

  • The Account space key (0x0061)
  • The AccountID of the account