A code to create z address

Hi guys,
I have figured out prefixes and how to create t address - this is simple like bitcoin. But I cannot get how to generate z address. Can you pleas point me to some code (preferably python). zcashd or zec lite wallet should have it as they do generate z addresses. I just can’t get where to find that code.

Big thanks,

1 Like


Returns a new shielded address for receiving payments.

With no arguments, returns a Sapling address.


  1. “type” (string, optional, default=“sapling”) The type of address. One of [“sprout”, “sapling”].

“zcashaddress” (string) The new shielded address.


zcash-cli z_getnewaddress
zcash-cli z_getnewaddress sapling
curl --user myusername --data-binary ‘{“jsonrpc”: “1.0”, “id”:“curltest”, “method”: “z_getnewaddress”, “params”: }’ -H ‘content-type: text/plain;’


Welcome to the club! Only a small minority of us actually use Zcash in a shielded manner. Hopefully others follow.

1 Like

z-cash advantage for my use case is a shielding ability. I understand there are many use cases why to use z-cash over other crypto but for me it is shielding. The reason I chose it over Monero is because I think it is better for anonymity and because I planned to reuse bitcoin python library to add there z-cash as an additional coin. All is easy and good while you use t-address. But once we started to accommodate z-address - everything became super complex. I just cannot find and add prefixes to existing bitcoin library structure. It just doesn’t work. No enough docs. Lots of unclarity. Now we will try to follow your suggestion to use daemon to get z-address and override it in the wallet, which gets a default t-address.