listaddresses - Zcash 4.5.1-1 RPC

listaddresses

Lists the addresses managed by this wallet by source, including 
those generated from randomness by this wallet, Sapling addresses 
generated from the legacy HD seed, imported watchonly transparent 
addresses, shielded addresses tracked using imported viewing keys, 
and addresses derived from the wallet's mnemonic seed for releases 
version 4.5.2 and above. 

REMINDER: It is recommended that you back up your wallet.dat file 
regularly!

Result:
[
  {
    "source": "imported|imported_watchonly|keypool|legacy_seed|mnemonic_seed"
    "transparent": {
      "addresses": ["t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1", ...],
      "changeAddresses": ["t14oHp2v54vfmdgQ3v3SNuQga8JKHTNi2a1", ...]
    },
    "sprout": {
      "addresses": ["ztbx5DLDxa5ZLFTchHhoPNkKs57QzSyib6UqXpEdy76T1aUdFxJt1w9318Z8DJ73XzbnWHKEZP9Yjg712N5kMmP4QzS9iC9", ...]
    },
    "sapling": [ -- each element in this list represents a set of diversified addresses derived from a single IVK. 
      {
        "zip32AccountId": 0, -- optional field, not present for imported/watchonly sources,
        "addresses": [
          "ztbx5DLDxa5ZLFTchHhoPNkKs57QzSyib6UqXpEdy76T1aUdFxJt1w9318Z8DJ73XzbnWHKEZP9Yjg712N5kMmP4QzS9iC9",
          ...
        ]
      },
      ...
    ]
  },
  ...
]
In the case that a source does not have addresses for a pool, the key
associated with that pool will be absent.

Examples:
> zcash-cli listaddresses 
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listaddresses", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8232/


Maintained by @_garethtdavies; modified by: mdr0id;license of the docs is MIT (see zcash repo), license of the scripts and webpage is also MIT (github repo)

Note it uses a mainnet zcash node