Bitcoin Forum
July 08, 2025, 11:21:48 AM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Electrum / [GUIDE] Importing Electrum Segwit Private Key Into Bitcoin Core (And Vice Versa) on: April 24, 2018, 08:00:01 AM
Usually, when you import a segwit private key from Bitcoin Core to Electrum, Electrum generates a legacy address (starting with '1') instead of a Segwit address (starting with '3' or 'bc1') because Bitcoin Core uses the WIF for all address types while Electrum has a custom WIF for different types of addresses so each WIF corresponds to 1 bitcoin address.
Also, because of this, you're also unable to import a segwit WIF from Electrum into Bitcoin Core because Core doesn't understand the custom WIF.

However, Electrum internally maintains backwards compatibility so you can convert an Electrum custom WIF to one Core understands.

How To Convert An Electrum segwit WIF to standard WIF

For P2SH-P2WPKH addresses:
Open the console in Electrum and type the following code . (Press enter after each line)
Code:
key = 'L4wAtJ8RYaxtRYZxUwZRH8qGYVv1LUP3RAh9ER9KK2HeTXW6v4Ru'
txin_type, secret, compressed = bitcoin.deserialize_privkey(key)
wif2 = bitcoin.serialize_privkey(secret, compressed, 'p2wpkh-p2sh')
print(wif2)
Replace "L4..." with the private key you got from Electrum and leave the quotation marks as is.
It should print a WIF that you can import into Bitcoin Core.

For P2WPKH addresses (Bech32)
Type the following code, replacing the private key there with yours.
Code:
key = 'LAst2SKVNx36PUY2q49cyLCcpze1YMvdJ66z3uKuiyaLKTVVsH3J'
txin_type, secret, compressed = bitcoin.deserialize_privkey(key)
wif2 = bitcoin.serialize_privkey(secret, compressed, 'p2pkh')
print(wif2)
It should print a private key you can import into Bitcoin Core to get your Bech32 address.


How To Import Segwit WIF from Bitcoin Core to Electrum
This one is simple to do.
NB: For this to work you need to be on Electrum version 3.1.1 and above


For P2SH-P2WPKH addresses (Addresses starting with "3")
Just add p2wpkh-p2sh: directly in front of your  private key.
For example
Code:
p2wpkh-p2sh:5BitcoinPrivateKey
This should generate the corresponding p2wpkh-p2sh bitcoin address.

For P2WPKH addresses (Bech32, starting with 'bc1')
This time we'll add p2wpkh: in front of the private key.
For example
Code:
p2wpkh:5PrivateKey
This should generate the corresponding Bech32 address
2  Bitcoin / Wallet software / Coinomi Now Supports Segwit (P2PWKH-P2SH and Native Segwit/Bech32) on: March 28, 2018, 07:19:03 PM
Quote
SegWit is fully supported as of version 1.8.4.


SegWit is an optional upgrade, but allows cheaper and faster transactions, by implementing the most recent advancements on the Bitcoin network. To upgrade your current accounts to Segwit, open your wallets and swipe one screen to the left to the "receive" tab. There, tap the "upgrade" button.

Read the brief introduction about the upgrade and press "next"

Confirm with your password, and you're done!

https://coinomi.freshdesk.com/support/solutions/articles/29000009746-does-coinomi-support-segwit-

The best part is that it supports ALL segwit addresses at once so you can choose the type you want to use:
Default is Bech32

Then there's P2PWKH wrapped in P2SH for compatibility
3  Bitcoin / Hardware wallets / Breaking The Ledger Security Model on: March 20, 2018, 02:12:05 PM
Saleem Rashid writes on the vulnerability he discovered in Ledger hardware wallets. The vulnerability arose due to Ledger’s use of a custom architecture to work around many of the limitations of their Secure Element.

The vulnerability could be used to mount a supply chain attack.

It is recommended you update your Ledger to the latest version.

https://saleemrashid.com/2018/03/20/breaking-ledger-security-model/

This is Ledger's official response:
https://www.ledger.fr/2018/03/20/firmware-1-4-deep-dive-security-fixes/
4  Bitcoin / Bitcoin Technical Support / Help With Child Pay For Parent on: November 11, 2017, 02:11:19 PM
Hello.

Yesterday I received a payment of 0.009Btc from blockchain.info wallet
This is the transaction hash ID: ad60ecad4b0722679747dea95d52e5f1715516918029256381d8bca1f88af1ee

Then I waited for 1 hour and sent 0.015BTC to another address with blockchain.info wallet
This is the tx ID:
42f86570f46284c673bafebbae70b6ed6038812bfed1e9f4966da123e1e0e7c4

The first transaction was unconfirmed when I sent the second.
Usually I don't have any problems with doing this because the first transaction gets confirmed then the second transaction gets confirmed also.

This time both transactions were unconfirmed for almost 24 hours.
I tried to accelerate it with ViaBTC and confirmtx, but it still didn't confirm.

I imported the private key to Mycelium wallet and made a CPFP on the first transaction.
This is the transaction ID:
e8859c0a90f3711cfbb33fec1283cf1b16c6ab77c85f5c01a6a6395159d0f2cd

Child pays for parent is supposed to confirm the first receiving transaction so that the second can go through, right?
But now the CPFP transaction and the first transaction have 2 confirmations as at time of writing but the 0.015 payment I made yesterday is still unconfirmed and is not showing up in the recepient address.

Did I do something wrong?

Should I wait for it to confirm?

Or did I accidentally double spend?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!