In Bitcoin - i can get several usable addresses which are all different to each other - belonging to the same wallet(address). If i make 2 addresses A and B and someone transfers coins to A - i can send that money by using A or B - because this addresses belongs to the same wallet. This is how it works to give the addresses to foreign people (e.g. customers) to know who did send money to my wallet (paid the bill).
In zcash - is it the same? I have a zcash node running… synchronized on mainnet …
I made a few tests - have got 4 addresses (2 by calling z_getnewaddress and 2 by getnewaddress). let’s name them: tA, tB and zA,zB
I send money to tA and i was expecting to “see” that money balance for tA and tB - even for zA and zB. But i can only see a balance for tA address by using “z_balance”. Trying to send money from tA works … but sending from tB does not work - due to “no balance” …
Is this true? am i wrong? How to manage to get “different” addresses belonging to the same “wallet”?
Zcash is built off of Bitcoin so the Zcash client (node) that you are running already has a wallet in it. Every time you start your node it automatically generates 100 random transparent addresses, this is known as your “keypool”.
If you run getnewaddress then you are pulling up one of these (transparent) addresses from your keypool to be able to give to someone to receive Zcash, you can do this as often as you need (up to 100 times before you have to refill the keypool). When you run z_sendmany you can send coins from any address in the wallet that has coins in it (t or z) transparent change will automatically be sent back to another transparent address in your wallet, change from a private transaction will be sent back to the same private address.
Note that z-addresses are different. There is no keypool for z-addresses. So you have to run z_getnewaddress to create a private address. Then you can use that address to send/receive private funds.
So technically all address you create are in your wallet, it just depends on weather you want to make a public or private transaction which method you choose to send/receive.