This software is for use at your own risk. I accept no liability for its use. It is free for anyone and everyone to download and use. There is a 3rd party dependency on the bitcoinj library which runs locally. All code is run locally to the best of my knowledge. It is up to you to ensure you maintain the privacy of your private keys.
So on August 1st, 2017, bitcoin forked and "bitcoin cash" was born. To obtain your bitcoin cash you need to be able to get hold of your private keys. I deposited my bitcoin to a bitcoin.com wallet https://www.bitcoin.com/choose-your-wallet/bitcoin-com-wallet which exports a file labelled something like: wallet.aes.json which is not compatible with importing to your wallet.dat in the bitcoin/bitcoin cash client. Therefore I wrote the script to document the steps for how to obtain your bitcoin cash from a bitcoin.com wallet.
Following the example for converting a private key in Hex format to WIF format http://en.bitcoin.it/wiki/Wallet_import_format. If you supply the private key from the example on the page: 0C28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1 You should get the matching base58 encoded string displayed on the webpage linked to above. If you get something different or it doesn't work at all please raise an issue on the repository..
This code runs entirely on your machine and is provided free to anyone and everyone.
If you have a bitcoin.com wallet, you will be able to get your bitcoin cash by following these steps:
- open your bitcoin.com wallet.
- to get your private keys...
- click Settings ->
- Personal Wallet (or the relevant label of the wallet) ->
- More options ->
- Export Wallet ->
- Provide a password ->
- Download.
You should now be asked to save the wallet.aes.json (or equivalent) file to disk somewhere. USB Stick recommended. And make more than 1 copy on a separate USB stick/external storage... and then keep them SAFE. If your house burns down you don't want to lose your bitcoins.
The wallet.aes.json is encrypted and password protected to prevent attackers gaining access to your bitcoin in the event they get hold of the file.
- Goto: https://bitwiseshiftleft.github.io/sjcl/demo/
- copy the entire contents of the wallet.aes.json into the field 'Ciphertext'
- enter your password.
- click on the arrow labelled 'decrypt'
- The "Plaintext" will now appear in the text area. Copy this - this will display your unencrypted private key.
- Copy the wallet private key value from the field: walletPrivKey
cd BitcoinPrivateKeyToWIFBase58
directory wherePrivateKeyToWif.sh
resides (in this project)./PrivateKeyToWif.sh ___your_private_key___
- copy the last line starting:
importprivkey ___your_private_key_in_WIF_format___ 'My BCC Wallet'
- navigate in your bitcoincash client to: Help -> Debug Window -> Console
- unlock your current wallet using:
walletpassphrase ___your_wallet_passphrase_here___ 600
this will unlock your wallet for 10 mins. Hopefully you remember your wallet password. - paste the command from the last line of the output (
importprivkey ___your_private_key_in_WIF_format___ 'BCC Wallet'
)
The client will then perform a "Rescanning" (which can take a long time). That should be it.
I'm not The Bitcoin Sign guy (https://www.coindesk.com/bitcoin-sign-guy-nets-almost-15000-fed-chair-appearance-goes-viral/) but certainly appreciate donations for my efforts:
- Bitcoin donations welcome: 16R7droo62cdg4SuMAxH1KfPHYCpTzBqHF
- Bitcoin cash donations also welcome: 16gkLgBgPkHE11zfysFUCYWczAfeqkaxh4
ENJOY!