Zcash: ZCash Desktop GUI Wallet needs a way to list T addresses

Created on 15 Oct 2016  路  3Comments  路  Source: zcash/zcash

I am working on a ZCash Desktop GUI Wallet as a hobby-type project. It is here: https://github.com/vaklinov/zcash-swing-wallet-ui

I have the problem that there seems to be no way to list the T addresses created via the command line tool zcash-cli. Z addresses are listed by the command z_listaddresses. The command listaddresses was available in ZCash beta1 (I think) but produced no output. It seems to have been dropped in ZCash beta2. Example:

$ ./zcash-cli z_getnewaddress
ztMze8zBAhHQ5UiXMm8NRjx9vQdJsfxgJrCKWRNHiNfT7xmDxjRKm33arGpupAaAgRAKVWGHnSkD1td2aYV4mazDEP5CLZZ
$ ./zcash-cli z_listaddresses
[
    "ztMze8zBAhHQ5UiXMm8NRjx9vQdJsfxgJrCKWRNHiNfT7xmDxjRKm33arGpupAaAgRAKVWGHnSkD1td2aYV4mazDEP5CLZZ"
]
$ # So Z addresses are listed - OK, now let's try T addresses

$ ./zcash-cli getnewaddress
tmYc8JDd6NnBGmTPWHVkp2wv7ikcb1FDXUL
$ ./zcash-cli listaddresses
error: {"code":-32601,"message":"Method not found"}

So my problem is that I have no way of listing all T addresses that have been created. If a T address has unspent TAZ there is a way to know this via listunspent. However if it has no balance yet - there is no way to list the address.

A-rpc-interface A-wallet question

Most helpful comment

https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list#Listing_my_bitcoin_addresses

"Listing the bitcoin addresses in your wallet is easily done via listreceivedbyaddress. It normally lists only addresses which already have received transactions, however you can list all the addresses by setting the first argument to 0, and the second one to true."

Note (for other calls) that the only supported account name in Zcash beta2+ is "".

Please close the ticket if this answers your question.

All 3 comments

https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list#Listing_my_bitcoin_addresses

"Listing the bitcoin addresses in your wallet is easily done via listreceivedbyaddress. It normally lists only addresses which already have received transactions, however you can list all the addresses by setting the first argument to 0, and the second one to true."

Note (for other calls) that the only supported account name in Zcash beta2+ is "".

Please close the ticket if this answers your question.

Yes - it works; thank you so much. Sorry for the false alarm.

$ ./zcash-cli listreceivedbyaddress 0 true 
[
    {
        "address" : "tmD77Ak9JLhqL54G2KEk5JnYvmL4pH9BTi1",
        "account" : "",
        "amount" : 0.00000000,
        "confirmations" : 0,
        "txids" : [
        ]
    },
    {
        "address" : "tmYab6uSkQi4nWHkmNSoWgHRqXttZUcirFF",
        "account" : "",
        "amount" : 0.00000000,
        "confirmations" : 0,
        "txids" : [
        ]
    },
    {
        "address" : "tmYc8JDd6NnBGmTPWHVkp2wv7ikcb1FDXUL",
        "account" : "",
        "amount" : 0.00000000,
        "confirmations" : 0,
        "txids" : [
        ]
    }
]

No problem, glad to help.

Was this page helpful?
0 / 5 - 0 ratings