-
Notifications
You must be signed in to change notification settings - Fork 0
Accounts
Accounts are a relatively unknown and a bit "underused" feature of Monero and Monero wallets. An account is something like a sub-wallet within a wallet. Wallet apps supporting accounts behave as if accounts had their separate list of subaddresses, received and sent transactions, and outputs. If you try to spend more XMR than you have in a particular account, supporting wallets are supposed to reject the transfer instead of resorting to use XMR from different accounts to reach the requested sum.
In fact, in the CLI wallet, which fully supports accounts by a number of commands, there is hardly anything that spans several accounts, and almost all commands are automatically taking place within the borders of the currently selected account.
Not all Monero wallet apps support accounts to the same degree; some, especially smartphone wallets, seem to lack them altogether.
Subaddresses "know" by the use of so-called indexes which account they belong to. There is one index (sometimes called major number) for the account, and a second one (sometimes called minor number) for the subaddress within an account. (0, 0) is the primary address of a wallet.
If you use accounts for a wallet and restore it from seed, the accounts will get restored together with the subaddresses they contain, although any labels that you used for any of those objects won't.
On the one hand you need considerable "infrastructure" in the form of commands in the user interface of a wallet app to support accounts, and code in wallet2
that cares about accounts and e.g. does the necessary filtering by account when selecting outputs for transactions to build. On the other hand you get the advantage of a single seed versus multiple seeds if you had separate wallets instead of a single one with accounts. And, maybe even more importantly, you have to sync only once instead of many times for separate wallets.
You can find some additional info about subaddresses and accounts in this Monero Documentation article.