electrum2core

electrum2core is a client-side Electrum to Bitcoin-core script generator.
It is meant to be run on your own machine and not while connected to the network.
This is to ensure no private keys are leaked during the process.

Instructions

These are instructions on how to use this tool.

1. Install Bitcoin-core

Install Bitcoin-core and let it syncronise with the network.

2. Disconnect Your Host From the Network

This is to ensure that no private keys in the later steps are vulnerable.

3. Export Private Keys from Electrum

In Electrum, go to Wallet -> Private Keys -> Export. Export your wallet in CSV format (Electrum may need to work for some time).

4. Choose Your Environment

Choose your environment below. If you want just the commands to enter into Bitcoin-core choose Manual. Otherwise a script is generated.

5. Select Your Export File (CSV)

It is the .csv file you exported from Electrum.

6. Import keys into Bitcoin-core

There are a few methods depending on your choice of environment. This process may take some time to complete as it will rescan the blockchain looking for utxo's at these addresses.

6.1 Manual Import

Copy/Paste each line in order from the list below into the bitcoin-qt debug window. Note that each line ends in false. this is to ensure that the rescan is delayed until we are ready to begin. The last line includes a true flag which will begin the rescan process.

6.2 Mac/Linux Import

Copy/Paste the text below into a text file (example: script.txt). You should be able to run the script with bash script.txt in a terminal.

6.3 Windows Import

Copy/Paste the text below into a text file (example: script.bat). You should be able to run the script by double-clicking on it.

7. Destroy script files and close this page.

It is important now that you destroy the output .csv from Electrum and any script files that you have created. I would recommend shred on Mac/Linux hosts. Once you have closed this page it should be safe to reconnect to the network.


Script Input

Choose your environment.
Use this to set the path.

Script Output