How can we send coins from z-cash address to bitcoin address?
Hi. This question is slightly ambiguous because thereâs the Bitcoin protocol / design / code and the Bitcoin network / blockchain.
Zcash will be launched as a separate blockchain from the Bitcoin network, so the only way to send Zcash coins to a Bitcoin address on the Bitcoin blockchain or vice-versa is through some sort of currency exchange. In addition to third-party exchanges which hold tradersâ funds, there are some options for safely swapping units of currency on different blockchains without relying on third parties (except the two mining networks), such as Atomic swap - Bitcoin Wiki .
A second way to interpret your question is how to reveal private Zcash coins into transparent Bitcoin-style address on the Zcash blockchain. The transparent addresses and their secret keys use the same encryption and transaction semantics as in Bitcoin. A private address is Zcash-specific and only the owner of the secret key for that address knows how much funds it controls and the transaction history.
A transaction with a Zcash âPour proofâ can transfer funds between private addresses and transparent addresses, so this can conceal transparent funds, reveal private funds, or do any combination of the two.
Did I answer your question?
Thanks for replay, Nathan!
Itâs related to the second way, when I want to send money from private address to transparent address. But I have error on that. Commands used:
./src/zcash-cli zcrawpour 01000000000000000000 â{"805b6d2901000000209cbf004c9c29ea4f4aed157544ec639b9415bdea95eb195da48484aa1b6dd02b30db711843f5b0958da7a8799f9663b270a8d8c5b5bd9184ebbc6646e16096adc9f9ef36501752b2d696a0aad0f77672a8":"$ZCSECRETKEY"}â â{âmsnvPB7KYAZvhXNBVNsRZioZ88yarPxwmwâ:49.8}â 0 0.1
Result:
error: {âcodeâ:-8,âmessageâ:âto_address must be hexadecimal string (not âmsnvPB7KYAZvhXNBVNsRZioZ88yarPxwmwâ)â}
Hereâs how youâd do it:
Right now youâre getting 01000000000000000000
(the raw transaction or $RAWTX
) from
createrawtransaction '[]' '{}'
Instead, get it by doing:
createrawtransaction '[]' '{"msnvPB7KYAZvhXNBVNsRZioZ88yarPxwmw":49.8}'
Then, you pour out:
zcrawpour $RAWTX "{\"805b6d2901000000209cbf004c9c29ea4f4aed157544ec639b9415bdea95eb195da48484aa1b6dd02b30db711843f5b0958da7a8799f9663b270a8d8c5b5bd9184ebbc6646e16096adc9f9ef36501752b2d696a0aad0f77672a8\":\"$ZCSECRETKEY\"}" '{}' 0 49.9
Notice the pour has no outputs, so the value must tunnel through vpub_out
(the final parameter), which in this case is 49.9
. The vout
(Bitcoin-style outputs of the transaction) can take what remains. In this case, it should take 49.8
(see the createrawtransaction above) which will give a 0.1
fee to miners.
Iâm sorry that we donât have a good visual way of describing this integration yet.
Sean, thanks a lot, it works!
However, some additional thing observed - coins sent to plain bitcoin address but when use zcrawreceive to zcash bucket, from which coins were sent, then output still is âexistsâ : true. Just wrong output, but canât do any manipulations with this bucket anymore.
This is a post I made linking to a document based on the alpha process for protected-to-transparent transactions. I havenât gone through the process again since the introduction of the latest beta release but hopefully it will still help. Protect coins and then ...? - #9 by Voluntary
Edit: Oops⌠I didnât realise how old this thread wasâŚ