kozyilmaz / zcash-apple

Zcash for Apple platforms
78 stars 21 forks source link

I come to here to create a local wallet and private address, may I ask how #13

Closed kwccoin closed 6 years ago

kwccoin commented 6 years ago

Whilst the system is sync its node for the day in my mac, may I ask this newbie issue.

I was directed to here by zcash site about creating wallet. Seems not sure how to do it.

Any instruction in the readme would be nice to sync with the zcash site (even though you are not associated with it).

Many thanks in advance.

kwccoin commented 6 years ago

Saw this ... https://github.com/zcash/zcash/wiki/1.0-User-Guide May be a link to it and resolve the issue.

Still do not understand the implication of tAddr generation and wallet and private key ... very odd. Need more time or some expert explain to me. There seems to be no wallet.

kwccoin commented 6 years ago

After going through a few day, I still do not get the zcash.

In the main user guide, it stop at creating and listing tAddr but receiving zcash is not covered but only zAddr which only 1 exchange support. Hence a lot of basic is missing.

One example is here: https://forum.z.cash/t/correctly-sending-zec-from-t-address-to-another-t-address/5081/2 but not sure it is correct

Asking question in stackexchange as well: https://bitcoin.stackexchange.com/questions/71382/zcash-steps-to-send-zcash-from-mining-to-receiving-wallet

kozyilmaz commented 6 years ago

hey @kwccoin I am not sure what you are looking for but here is a list of functions you can use with zcash command line (zcash-cli). You had to have a sync'd, running zcashd at the same time, so open a terminal, run zcashd and wait until it is sync'd first.

# for detailed information use the guides below
https://github.com/zcash/zcash/wiki/1.0-User-Guide
https://github.com/zcash/zcash/blob/master/doc/payment-api.md
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

# list info for a command 
$ ./zcash-cli help <command>

# list all accounts (therefore all t-addr's)
$ ./zcash-cli listreceivedbyaddress 0 true

# list of t-addr's for default account (again all t-addr's)
$ ./zcash-cli getaddressesbyaccount ""

# list all unspent transaction outputs (t-addr UTXO's)
$ ./zcash-cli listunspent

# create new t-addr's
$ ./zcash-cli getnewaddress

# list all z-addr's
$ ./zcash-cli z_listaddresses

# create new z-addr's
$ ./zcash-cli z_getnewaddress

# get total balance
$ ./zcash-cli z_gettotalbalance

# send funds
$ export TADDR='t1TGVDzsEK2qbG1N8FJQFSAzV1bWWHMGGCS'
$ export ZADDR='zcNeXiyD3JkhKTrU38xM9C6HQGy9aP5qqVFH25qFzQGnmdwYZ2Dr53Jy7iRp64D4CzkMZdmKagN6mmtu3jVKHuZ8xZp8fw3'
$ export FRIEND='zcfZJW3qLHpSc7q7W1SXRGdVjgM6Q6kRwdkz1DHW5sP2EqcMHf5RCp3Frpf2qnb81j9K6upzRN4HoVxfboVwLTRaZ7bKn8b'

# send from t-addr to z-addr (with memo and fee)
$ ./zcash-cli z_sendmany "$TADDR" "[{\"address\": \"$ZADDR\", \"amount\": 0.1, \"memo\": \"0123456789\"}]" 1 0.002

# send from t-addr to t-addr (with fee)
$ ./zcash-cli z_sendmany "$TADDR1" "[{\"address\": \"$TADDR2\", \"amount\": 0.09}]" 1 0.002

# send from z-addr to z-addr (with memo and fee)
$ ./zcash-cli z_sendmany "$ZADDR" "[{\"address\": \"$FRIEND\", \"amount\": 0.05, \"memo\": \"9876543210\"}]" 1 0.002

# get send result
$ ./zcash-cli z_getoperationresult [\"$OPID\"]

# list amounts received by z-addr
$ ./zcash-cli z_listreceivedbyaddress "$ZADDR"

# list balance both for t-addr and z-addr
$ ./zcash-cli z_getbalance "$TADDR"
kwccoin commented 6 years ago

Great. That is what I looking for a tutorial for newbie. Already mining some in slush and hence need to find an address to send it to. Thanks again!!!!!