In short, what we’re going to do is:
- Secure your Bitcoin by transferring it away to a new (paper-) wallet
- Sweep your private keys in Electron Cash to a new BCH address
- Sell your BCH
Secure your Bitcoin
So, the first thing you want to do is to secure your existing Bitcoin – in case anything goes wrong while handling your private keys, your existing Bitcoin will be safe.
Obtain your private keys
Next, you need your private keys in order to sweep them on the BCH chain. I run a bitcoind, the way to do this is to unlock your wallet and then dump it:
$ bitcoin-cli walletpassphrase "xxx" 60 $ bitcoin-cli dumpwallet wallet.txt
Note the extra space before the walletpassphrase command; this will tell your bash to not write the command to the command history, thereby keeping your passphrase a secret.
This will dump all your private keys in wallet.txt. You can reduce this to just the keys like this:
$ cut -f1 -d' ' <wallet.txt >keys.txt
Now you got your keys.
Sweep your private keys
Next, install Electron Cash. You are going to enter your private keys there, so be sure you got the right version.. apparently there were scams, that’s your own responsibility.
On startup, it prompts you to create a new wallet. Save the passphrases in a secure location. Once Electron Cash is up and running, go to Wallet -> Private Keys -> Sweep and paste all your private keys from your keys.txt file there.
Potentially you have many more keys. Press “sweep”. If you have many keys, this will now take some time, maybe one or two minutes, while the GUI appears to do nothing. Then, a transaction window pops up. Here, you click “broadcast” in order to broadcast your transaction. This will transfer all your BCH to your new Electron Cash wallet.
Now you have to wait until the transaction is confirmed.
Sell your BCH
You can now transfer and sell your BCH on any exchange that supports it. I use shapeshift.io.
Hope that was helpful.