The account contains complete information about a user's private wallet. It is linked by the intermediate key derived from the spending key owned by the user. The holder of the spending key is called an account owner.
The account holds the current balance value and
spent offset which separates all notes into spent and unspent. This is sufficient data to retrieve a wallet state.
An account is a tuple where:
- (32 bytes) is an intermediate key derived from the spending key:
- (6 bytes) is a spent offset. It separates used (spent) and unused notes in the Merkle tree . Notes that indexes below are considered to be spent
- (8 bytes) is the current account balance
- (8 bytes) is an energy(XP) unit ("integral" account balance)
- (10 bytes) is a salt. Since a transaction contains the account hash we must use a random salt to hide the possible lack of account changes.
Account transaction data never appears unencrypted in a public field. Only the account owner can decrypt it.
When a user creates their first transaction there will not be an existing account in the Merkle tree. In this case a zero account should be used where all fields are zero except .