z_getaddressforaccount - Zcash 5.0.0 RPC

z_getaddressforaccount account ( ["receiver_type", ...] diversifier_index )

For the given account number, derives a Unified Address in accordance
with the remaining arguments:

- If no list of receiver types is given (or the empty list "[]"), the best
  and second-best shielded receiver types, along with the "p2pkh" (i.e. transparent) receiver
  type, will be used.
- If no diversifier index is given, the next unused index (that is valid
  for the list of receiver types) will be selected.

The account number must have been previously generated by a call to the
z_getnewaccount RPC method.

Once a Unified Address has been derived at a specific diversifier index,
re-deriving it (via a subsequent call to z_getaddressforaccount with the
same account and index) will produce the same address with the same list
of receiver types. An error will be returned if a different list of receiver
types is requested.

  "account": n,                          (numeric) the specified account number
  "diversifier_index": n,                (numeric) the index specified or chosen
  "receiver_types": ["orchard",...]",   (json array of string) the receiver types that the UA contains (valid values are "p2pkh", "sapling", "orchard")
  "address"                              (string) The corresponding address

> zcash-cli z_getaddressforaccount 4
> zcash-cli z_getaddressforaccount 4 '[]' 1
> zcash-cli z_getaddressforaccount 4 '["transparent","sapling","orchard"]' 1
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "z_getaddressforaccount", "params": [4] }' -H 'content-type: text/plain;'

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