Bitcoin Forum
November 21, 2019, 04:51:46 PM *
News: 10th anniversary art contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to add a Bitcoin address to Electrum / difference sweep and import priv. key  (Read 256 times)
1miau
Hero Member
*****
Offline Offline

Activity: 560
Merit: 1534


ChipMixer Miau


View Profile WWW
January 12, 2019, 04:09:17 PM
Last edit: June 01, 2019, 08:37:14 PM by 1miau
Merited by LoyceV (2), DdmrDdmr (2), Guvn0r (2), pooya87 (1), Mr. Big (1), o_e_l_e_o (1), Alex_Sr (1)
 #1

How to add a Bitcoin address to Electrum / Difference between sweep and import private keys


This post is an additional post to this one, which explains how to create your own unique Bitcoin address (vanity address).

To use external bitcoin addresses (like a paperwallet) in Electrum, there are two functions: sweep and import. Both functions enable to access the balances of the Bitcoin addresses via Electrum. It is possible to import any wallets there, but you need to own the private key. This can be very helpful if you still have an old paperwallet and want to transfer the Bitcoins, an address that you are currently using in another client and would like to use in Electrum or to use your self-created vanity address.

Import

Import is useful to import a Bitcoin address as new wallet to Electrum. The Bitcoins will stay on this wallet and you can access this wallet after importing it to Electrum. It’s also important that this imported wallet will not have a seed and you can’t restore it from a seed because there is none. If you don’t lose the private key, you don’t need a seed either.


Sweep

In comparison, the sweep function transfers your bitcoins from your original wallet to a new one in Electrum. Since a Bitcoin transaction (from the old to the new wallet) will happen, sweep requires an internet connection and transaction costs.

In order to be able to use a previously created vanity address in Electrum, the function to be used is import.



It works like this:


1. Open Electrum

Open Electrum and go to File => New/Restore







2. Choose a name

Choose a name for your wallet which you want to import and click on Next







3. Choose Import Bitcoin addresses or private keys







4. Enter you private key to import tha address

Now you can copy your private key from the .txt file and paste it into the window opening at Electrum. Theoretically, you could also import several private keys.







5. Select a password, write it down and click on Next.





And finally, you have imported your 1test wallet successfully. You can now transfer BTC to your wallet or send BTC if you have sent BTC to it before.





Done Smiley



Update: if you want to import / sweep a SegWit address (prefix 3 /bc1q) you need to add the following lines in front of your private keys:


Nested SegWit adresses 3.... (P2SH-P2WPKH)

Code:
p2wpkh-p2sh:5priv.key


Native SegWit bech32 addresses bc1q... (P2WPKH)

Code:
p2wpkh:5priv.key

Source

Or just click "info" when you are importing Bitcoin addresses to see what exactly you have to add:



Done  Smiley

1574355106
Hero Member
*
Offline Offline

Posts: 1574355106

View Profile Personal Message (Offline)

Ignore
1574355106
Reply with quote  #2

1574355106
Report to moderator
1574355106
Hero Member
*
Offline Offline

Posts: 1574355106

View Profile Personal Message (Offline)

Ignore
1574355106
Reply with quote  #2

1574355106
Report to moderator
1574355106
Hero Member
*
Offline Offline

Posts: 1574355106

View Profile Personal Message (Offline)

Ignore
1574355106
Reply with quote  #2

1574355106
Report to moderator
The Bitcoin Forum is turning 10 years old! Join the community in sharing and exploring the notable posts made over the years.
1574355106
Hero Member
*
Offline Offline

Posts: 1574355106

View Profile Personal Message (Offline)

Ignore
1574355106
Reply with quote  #2

1574355106
Report to moderator
1miau
Hero Member
*****
Offline Offline

Activity: 560
Merit: 1534


ChipMixer Miau


View Profile WWW
May 18, 2019, 08:58:02 PM
 #2

Added the follwing update for SegWit addresses:


Update: if you want to import / sweep a SegWit address (prefix 3 /bc1q) you need to add the following lines in front of your private keys:


Nested SegWit adresses 3.... (P2SH-P2WPKH)

Code:
p2wpkh-p2sh:5priv.key


Native SegWit bech32 addresses bc1q... (P2WPKH)

Code:
p2wpkh:5priv.key

Done  Smiley

pooya87
Legendary
*
Offline Offline

Activity: 1820
Merit: 2065


Remember tonight for it's the beginning of forever


View Profile
May 19, 2019, 04:24:12 AM
Merited by 1miau (1), PrimeNumber7 (1)
 #3

you have to upgrade your Electrum bro! it now has a nice little button on top right side of the Import window that gives you the necessary information about what to add before the key to import the correct address. here is the screenshot (version 3.3.4):



for the sake of completeness:
if you had created a private key with Electrum versions 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5 and 3.0.6 and backed up the WIF, your only option is to enter it in Electrum without the script type string addition because these keys already contain the type in their first byte which makes them incompatible with any other wallet/tool you use to recover them.

1miau
Hero Member
*****
Offline Offline

Activity: 560
Merit: 1534


ChipMixer Miau


View Profile WWW
May 19, 2019, 10:20:55 PM
 #4

Thanks @pooya87, I'll link your post in my update for importing SegWit addresses.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!