8

I recently built from master - though this may have been included in the last point release (v0.11.1.0) - and I see new monero-wallet-cli commands. The command I'm most curious about is account. Is this related to the concept of sub-addresses?

How is account used? How is the transfer command potentially used differently now, as a result?

scoobybejesus
  • 5,515
  • 21
  • 42

1 Answers1

5

Yes, you may use accounts to help managing subaddresses, but you don't have to. If you don't care which address receives coins as long as it goes to your wallet, just leave it.

Accounts work like this:

  1. By default you get a single account with number 0.
  2. You may switch current account context by issuing account switch <number> or by account new which creates a new one.
  3. Each of these accounts has its own primary address. The account 0 is a wallet's primary address, others have a subaddress.
  4. When creating an account, it gets a new subaddress.
  5. Additionally, every account can get additional subaddresses, created by command address new
  6. Once you have created accounts, the balance command shows contents of the current account only:

    [wallet BZwH58]: balance
    Currently selected account: [1] (Untitled account)
    Balance: 50.000000000000, unlocked balance: 0.000000000000
    
  7. To get contents of the entire wallet, use the account command:

    [wallet BZwH58]: account
            Account               Balance      Unlocked balance                 Label
           0 9wFuzN       14.943273120000       14.943273120000       Primary account
           1 BZwH58       50.000000000000        0.000000000000    (Untitled account)
    ----------------------------------------------------------------------------------
              Total       64.943273120000       14.943273120000
    

The outstanding question is how to transfer coins between accounts without creating a blockchain transaction. I haven't figured it out yet. It seems that accounts are like separate wallets. To transfer between them you must create a regular blockchain transaction.

emesik
  • 620
  • 3
  • 11