How can we send coins from z-cash address to bitcoin address?

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?

2 Likes

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’)”}

2 Likes

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.

1 Like

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.

1 Like

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…