2
I need to import a private key like in this question for a p2wpkh-p2sh address. What is the entire process?
2
I need to import a private key like in this question for a p2wpkh-p2sh address. What is the entire process?
2
The entire process is as follows: (these instructions are correct for Electrum v3.0.6)
key = 'your_key' and press Enter (leave the single quotes in).txin_type, secret, compressed = bitcoin.deserialize_privkey(key) and press Enter.wif2 = bitcoin.serialize_privkey(secret, compressed, 'p2wpkh-p2sh') and press Enter.print(wif2) and press Enter.Done!
If you just want to import the address to make sure it is correct without trying to sweep you need different steps.
That's sweeping rather than importing and as far as the private key format goes just prepend "p2wpkh-p2sh:" to the WIF and you're good to go in 3.1 or newer. You shouldn't be using old versions like 3.0.6. – Abdussamad – 2018-03-31T19:32:07.633
@Abdussamad When Electrum gets the new version in the Fedora repository then I will get the new version. – Willtech – 2018-04-01T00:31:50.953
in the case of Electrum you should be installing from source. That's because it updates far too frequently for distro repos to keep up. – Abdussamad – 2018-04-02T13:24:12.650
Maybe add electrum to the question title - Google might show this for generic import queries otherwise, and the import process will likely differ for different clients – Raghav Sood – 2018-03-29T14:03:10.463
Good plan! And, done. – Willtech – 2018-03-29T14:03:43.773
This Q/A is linked on Puzzling.SE.
– Willtech – 2018-03-29T14:07:02.367