4

I am totally new to bitcoin. I have google'd this a lot now. I created a wallet with Bitcoin Core GUI and encrypted it (settings -> encrypt wallet...). Then I took a receiving address from the wallet (file -> receiving addresses...) and sent some bitcoins to that address from an exchange (bitstamp). I confirmed with https://blockchain.info/ that the bitcoins have arrived to that address.

Now I want to spend the coins. I can't use Bitcoin Core because I don't have the resources to download the entire blockchain, so I want to use Electrum for sending coins.

How do I import an encrypted wallet.dat created with Bitcoin Core to Electrum and send coins? If I try to open the wallet.dat with Electrum then I get Error cannote read wallet file

1

2 Answers 2

1

Every wallet can create it's own way of storing data. There's no protocol in bitcoin,that defines the way, how a wallet is structured. In your case it might be best to extract the private key, and load it into Electrum, like here:

http://docs.electrum.org/en/latest/faq.html#can-i-import-private-keys-from-other-bitcoin-clients

1

How to export private keys from Bitcoin Core

In Bitcoin Core, you can use the dumpprivkey command.

Once you have your private key, guard it very carefully keeping it very secure and, do the following in Bitcoin Core to gey your private key (once for every individual address):

  1. Open Bitcoin Core.
  2. Go to Help --> Debug.
  3. Go to the Console tab.
  4. type: dumpprivkey "{address}"
  5. Do step 4 once for each address with BTC in your Bitcoin Core wallet.
  6. Write down your private key exactly on paper only for security, or use copy and paste. Do not ever save the private key anywhere on a phone or computer.

Done. Note that you do not need to wait for Bitcoin Core to update before exporting your private key.

Usage:

>dumpprivkey "address"

Reveals the private key corresponding to 'address'.
Then the importprivkey can be used with this output

Arguments:
1. "address" (string, required) The bitcoin address for the private key

Result:
"key" (string) The private key

Examples:
> bitcoin-cli dumpprivkey "myaddress"
> bitcoin-cli importprivkey "mykey"

Importing private keys into Electrum

Then, you can import your private keys into Electrum.

  1. Open Electrum and go to Wallet --> Private Keys --> Import
  2. Exactly fill in all your private keys, one private key per line. Press enter for a new line.
  3. Click on Import.
  4. Done.

Electrum will update with the balance for all of your imported addresses.

Note: If you just do not have enough HDD storage for Bitcoin Core you can enable prune={MB>550} in your bitcoin.conf file to reduce the file storage requirements for the blockchain, accessible from Settings --> Options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.