7

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?

4

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.

  • Obviously, you can't. If you could transfer coins without the chain knowing about it, we'd have a magic scaling solution :) – user36303 Nov 9 '17 at 8:50
  • But this looks like a matter of bookkeeping. It could be possible at least to move entire address with its' balance between accounts, no? – Michał Sałaban Nov 9 '17 at 12:41
  • 2
    <s>That'd defeat the entire point of subaddresses, no ?</s> No, it'd only defeat part of it. Anyway, you can't. It's theoretically possible to make a tx using outputs from more than one account, but it's not implemented, because it's meant to prevent linking outputs. – user36303 Nov 9 '17 at 19:27
  • If I restore my wallet with a seed, will all subaddresses created this way be restored too? – errata Dec 1 '17 at 21:48
  • Yes. some spam because I can't post just "Yes", because stack exchange is being a cunt. – user36303 Jan 18 '18 at 21:11

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.