Unified Addresses & Full-node RPC API

In the zcashd full node wallet, we expose Unified Addresses via “accounts”. An account corresponds to the set of spending keys that can spend the funds received by a Unified Address. Every account has a single Unified Full Viewing Key (1-to-1 mapping), and can also have multiple Unified Addresses (via the “diversified addresses” feature we introduced in Sapling and kept in Orchard).

  • You create a new account with z_getnewaccount, which gives you the account number ACCOUNT (0 for the first account).
  • You then generate a Unified Address ADDRESS with z_getaddressforaccount ACCOUNT. Calling this multiple times will return sequential Unified Addresses.
  • Check balance with z_getbalanceforaccount ACCOUNT.
  • Send funds from the account by using z_sendmany ADDRESS ...
    • That is, if you specify any address from an account as the source of funds, z_sendmany will select funds from the whole account. There isn’t a perfect match between old-style addresses and accounts; we’re planning a new account-focused spending API.
  • Backup using z_exportwallet which exports the wallet’s mnemonic phrase, from which all accounts are derived. The new zcashd-wallet-tool can also be used (and in fact you are prompted to use it IIRC).
  • We don’t support importing keys for Unified Addresses or accounts. We are planning to add some way to initialize a wallet from an existing mnemonic (the full node UX of the zcashd wallet makes this rather hard).
8 Likes