Difference between revisions of "Transferring coins from Bitcoin-Qt to Electrum"

From Bitcoin Wiki
Jump to: navigation, search
(Created page because this question was being asked a lot in the IRC channel)
 
(Sweep private keys with Electrum: Add instruction about choosing the prefix for sweeping a private key)
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This guide is intended for users of [[Bitcoin Core]] who do not want to wait for their wallet to be synchronized with the network, which may take many hours or days depending on the hardware spec.
+
This guide is intended for users of [[Bitcoin-Qt]] who do not want to wait for their wallet to be synchronized with the network, which may take many hours or days depending on the hardware spec. The guide teaches users how to transfer their coins to [[Electrum]] bitcoin wallet, which has [[Full node#Economic_Strength|lower security]] but a faster startup time.
  
It's a somewhat common situation that users don't open their wallet for months, after they come back it they find it will take them hours to have be able to use Bitcoin Core. Another example is where the block files on hard disk have become corrupted requiring parts of the [[blockchain]] to be downloaded and verified again.
+
It's a somewhat common situation that users don't open their wallet for months or years, after which they come back to find it will take them hours to have be able to use Bitcoin Core. Another example is where the block files on hard disk have become corrupted requiring parts of the [[blockchain]] to be downloaded and verified again.
  
 
'''WARNING'''
 
'''WARNING'''
  
Before reading this page, users should note that directly manipulating ECDSA [[private keys]] is dangerous and can result in losing bitcoins<ref>[https://bitcoin.stackexchange.com/questions/29948/why-doc-says-importing-private-keys-is-so-dangerous Bitcoin StackExchange - Why doc says importing private keys is so dangerous?]</ref><ref>[https://bitcoin.stackexchange.com/questions/18619/why-so-many-warnings-about-importing-private-keys Bitcoin StackExchange - Why so many warnings about importing private keys?]</ref>. This guide is for the impatient or time-stressed, it is recommended that users of [[Bitcoin Core]] simply wait out the [[block chain download|blockchain synchronization]].
+
Before reading this page, users should note that directly manipulating ECDSA [[private keys]] is dangerous and can result in losing bitcoins<ref>[https://bitcoin.stackexchange.com/questions/29948/why-doc-says-importing-private-keys-is-so-dangerous Bitcoin StackExchange - Why doc says importing private keys is so dangerous?]</ref><ref>[https://bitcoin.stackexchange.com/questions/18619/why-so-many-warnings-about-importing-private-keys Bitcoin StackExchange - Why so many warnings about importing private keys?]</ref>. This guide is for the impatient or time-stressed, it is recommended that users of [[Bitcoin Core]] simply wait out the [[block chain download|blockchain synchronization]]. There are many benefits to running a [[Full node]] including trustlessness, security and privacy which lightweight wallets cannot match.
  
 
== Obtain new Electrum wallet ==
 
== Obtain new Electrum wallet ==
Download [[Electrum]], verify the signature to prove it was not modified in transit. Create a new empty wallet. Write down the mnemonic recovery seed on paper.
+
Download [[Electrum]] and verify the signature to prove it was not modified in transit. Create a new Standard Wallet and choose "Create a new seed". Electrum will give you a [[seed phrase]] which you should write down on paper.
  
 
== Obtain private key(s) from Bitcoin-Qt ==
 
== Obtain private key(s) from Bitcoin-Qt ==
  
Click Help -> Debug. Click the Console tab. Use the [[Original Bitcoin client/API calls list|dumpprivkey]] command to get the private key. Repeat for as many bitcoin addresses as have money in them.
+
In Bitcoin-Qt click Window -> Console.
 +
 
 +
If your wallet is encrypted, use this command to decrypt it for 5 minutes (300 seconds):
 +
 
 +
    walletpassphrase your-wallet-passphrase 300
 +
 
 +
Use the [[Original Bitcoin client/API calls list|dumpprivkey]] command to get the private key. Repeat for as many bitcoin addresses as have money in them.
  
 
   dumpprivkey <your bitcoin address>
 
   dumpprivkey <your bitcoin address>
 +
 +
Do not send this private key to anybody else, they could use it to steal your bitcoins(!)
  
 
== Sweep private keys with Electrum ==
 
== Sweep private keys with Electrum ==
  
In the Electrum window, click Wallet -> Private Keys -> Sweep. Paste the private keys from Bitcoin-Qt here. Check the resulting transaction is okay and click Broadcast. Your funds will be swept from the addresses in Bitcoin Core and put in an Electrum wallet address.
+
In the Electrum window, click Wallet -> Private Keys -> Sweep. Paste the private keys from Bitcoin-Qt here. Check the resulting transaction is okay and click Broadcast to sweep from the addresses in Bitcoin Core to the Electrum wallet.
 +
 
 +
If the address generated from the private key is wrong, then on the Sweep Private keys dialog box in Electrum click the Info box in the upper-right. It will give instructions for prefixing your private key so that the correct address is generated. For example if your address starts with 3 then use <code>p2wpkh-p2sh:[your-private-key]</code>.
 +
 
 +
'''Warning: Make sure the Electrum wallet is not a watch-only wallet. The Electrum window title bar should not say [watching-only]. Go back to [[#Obtain new Electrum wallet]] if so.'''
 +
 
 +
Once broadcast, the [[transaction]] will be relayed to every node in the bitcoin network and should soon be visible as unconfirmed in Electrum's window. It is likely to soon be [[mining|mined]] into a [[block]] giving it [[confirmation|confirmations]] that make it [[Irreversible Transactions|irreversible]].
  
 +
==Related Documents==
 +
* [[Safely Transfer Bitcoin from a wallet.dat File to Anywhere, Using Air-Gapped Offline System, Bitcoin Core, and Electrum]] (a more complicated extended version of this document for more paranoid people)
  
 
==References==
 
==References==

Latest revision as of 21:46, 2 December 2019

This guide is intended for users of Bitcoin-Qt who do not want to wait for their wallet to be synchronized with the network, which may take many hours or days depending on the hardware spec. The guide teaches users how to transfer their coins to Electrum bitcoin wallet, which has lower security but a faster startup time.

It's a somewhat common situation that users don't open their wallet for months or years, after which they come back to find it will take them hours to have be able to use Bitcoin Core. Another example is where the block files on hard disk have become corrupted requiring parts of the blockchain to be downloaded and verified again.

WARNING

Before reading this page, users should note that directly manipulating ECDSA private keys is dangerous and can result in losing bitcoins[1][2]. This guide is for the impatient or time-stressed, it is recommended that users of Bitcoin Core simply wait out the blockchain synchronization. There are many benefits to running a Full node including trustlessness, security and privacy which lightweight wallets cannot match.

Obtain new Electrum wallet

Download Electrum and verify the signature to prove it was not modified in transit. Create a new Standard Wallet and choose "Create a new seed". Electrum will give you a seed phrase which you should write down on paper.

Obtain private key(s) from Bitcoin-Qt

In Bitcoin-Qt click Window -> Console.

If your wallet is encrypted, use this command to decrypt it for 5 minutes (300 seconds):

   walletpassphrase your-wallet-passphrase 300

Use the dumpprivkey command to get the private key. Repeat for as many bitcoin addresses as have money in them.

  dumpprivkey <your bitcoin address>

Do not send this private key to anybody else, they could use it to steal your bitcoins(!)

Sweep private keys with Electrum

In the Electrum window, click Wallet -> Private Keys -> Sweep. Paste the private keys from Bitcoin-Qt here. Check the resulting transaction is okay and click Broadcast to sweep from the addresses in Bitcoin Core to the Electrum wallet.

If the address generated from the private key is wrong, then on the Sweep Private keys dialog box in Electrum click the Info box in the upper-right. It will give instructions for prefixing your private key so that the correct address is generated. For example if your address starts with 3 then use p2wpkh-p2sh:[your-private-key].

Warning: Make sure the Electrum wallet is not a watch-only wallet. The Electrum window title bar should not say [watching-only]. Go back to #Obtain new Electrum wallet if so.

Once broadcast, the transaction will be relayed to every node in the bitcoin network and should soon be visible as unconfirmed in Electrum's window. It is likely to soon be mined into a block giving it confirmations that make it irreversible.

Related Documents

References