Bitcoin Forum
July 05, 2024, 05:54:06 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Import P2SH type private key  (Read 218 times)
hugeblack (OP)
Legendary
*
Online Online

Activity: 2562
Merit: 3782


View Profile WWW
February 03, 2018, 10:22:34 AM
 #1

I have a segwit private key "P2SH type or started by 3 " and want to import it into electrum wallet.
I create a new wallet file and follow this https://bitcoinelectrum.com/importing-your-private-keys-into-electrum/.
get an error about doesn't support importing of addresses.
Can I add this kind of segwit?or only I can only import  bc1 "bech32 P2WPKH " type?
Lucius
Legendary
*
Offline Offline

Activity: 3290
Merit: 5746


Donate to a noble cause🚑 - Link in profile


View Profile WWW
February 03, 2018, 10:45:32 AM
Merited by SFR10 (1), xdrpx (1)
 #2

I have a segwit private key "P2SH type or started by 3 " and want to import it into electrum wallet.
I create a new wallet file and follow this https://bitcoinelectrum.com/importing-your-private-keys-into-electrum/.
get an error about doesn't support importing of addresses.
Can I add this kind of segwit?or only I can only import  bc1 "bech32 P2WPKH " type?

You can not import that private key in Electrum SegWit because is only support bech32 address format,but you can go around this problem by creating SegWit wallet in Electrum wich will support address starting with "3".Just follow instructions in this link-this tool can be used offline for your security-check Offline Usage.

https://www.reddit.com/r/Electrum/comments/7llnll/here_is_how_to_create_segwit_bip49_wallets_and/

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
Abdussamad
Legendary
*
Offline Offline

Activity: 3640
Merit: 1571



View Profile
February 04, 2018, 01:02:07 AM
 #3

Yes you can do this but you first need to convert the private key into a form that electrum accepts. Use this script: https://gist.github.com/AbdussamadA/dd46a31033f2eb9e5189ed0b849c4be8

Run it like this:

Code:
python3 electrum-convert-privkey.py <yourprivatekey> p2wpkh-p2sh | electrum -w wallet_file_path restore -



Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!