Convert private key to Bitcoin Cash address

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.



from Recent Questions - Bitcoin Stack Exchange https://ift.tt/f4Tz2VD
via IFTTT

Popular posts from this blog

Do Kwon’s Detention Prolonged Until 2024 As Montenegro Responds To Extradition Requests

Sam Bankman-Fried Trial Begins Tomorrow: 3 Reasons Ex-SEC Official Foresees Conviction

Future of Bitcoin encryption and security in a QC era