Author

Topic: Convert private key to Bitcoin Cash address [unanswered] (Read 46 times)

full member
Activity: 316
Merit: 193
Which one exactly do you want to convert?
BCH and BTC use the same code with slight changes so I don't think you still need to convert the private key because it's compatible.

The private key is a WIF key; it could be compressed and uncompressed if you want to convert them into a BCH address, then importing it into a BCH wallet should convert it into a public key or address.

Or you are looking for a more complex way to do that?

Or maybe you are talking about converting the WIF key into hex format or base64 format? There's a tool to do that check the https://github.com/pointbiz/bitaddress.org

As I already said twice and saying that third time again: I need python 3 code to convert private key in bytes or hex to Bitcoin Cash address.

Please read before posting. Everything already have been said.

If you don't know the topic please stop posting.

Stop trolling here.
legendary
Activity: 3514
Merit: 3253
Happy New year 🤗
Which one exactly do you want to convert?
BCH and BTC use the same code with slight changes so I don't think you still need to convert the private key because it's compatible.

The private key is a WIF key; it could be compressed and uncompressed if you want to convert them into a BCH address, then importing it into a BCH wallet should convert it into a public key or address.

Or you are looking for a more complex way to do that?

Or maybe you are talking about converting the WIF key into hex format or base64 format? There's a tool to do that check the https://github.com/pointbiz/bitaddress.org
full member
Activity: 316
Merit: 193
What exactly do you mean?
Isn't the private key from Bitcoin use the same key as Bitcoin cash?

Have you ever tried to import the WIF key of the Bitcoin private key into BCH wallet?

You don't need to convert them I suggest use a BCH wallet that supports the WIF key, like electroncash it is likely the same as electrum in BTC, but it supports BCH. Just import the private key of your Bitcoin, and you should be able to see the bitcoin cash address under electroncash wallet.

I mean what I have already written - question is how to convert private key.

Bitcoin Cash is converted differently as its address start with p or q.

I am not talking about wallets, I am talking about conversion.

I need to be able to convert bytes of private keys to Bitcoin Cash addresses, as said in the first post.
legendary
Activity: 3514
Merit: 3253
Happy New year 🤗
What exactly do you mean?
Isn't the private key from Bitcoin use the same key as Bitcoin cash?

Have you ever tried to import the WIF key of the Bitcoin private key into BCH wallet?

You don't need to convert them I suggest use a BCH wallet that supports the WIF key, like electroncash it is likely the same as electrum in BTC, but it supports BCH. Just import the private key of your Bitcoin, and you should be able to see the bitcoin cash address under electroncash wallet.
full member
Activity: 316
Merit: 193
Let's say I have 32 bytes = 64 hex digits private key. Normally, for Bitcoin, I add 0x80 byte before first byte and convert the result to WIF with Base58Check encoding.

This gives me 5 at the start of the WIF string.

Then I can convert this WIF to public key, later to the address.

For Bitcoin all addresses are starting with 1, 3 or bc1.

But for Bitcoin Cash we have addresses starting with p or q.

How can I convert private key to Bitcoin Cash WIF and later to public key and address?

Best would be Python 3 program.
Jump to: