spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.41k stars 3.08k forks source link

Import Bech32 SegWit Wallet Seed #3942

Closed AdamSEY closed 6 years ago

AdamSEY commented 6 years ago

I see it's only possible to create SegWit Wallet on electrum but if I have bech32 segwit wallet it's not possible to import it.

Steps: 0- Started Electrum on testnet 1- Wallet Kind: Standard 2- I already have a seed 3- Inserted Seed Phrase and checked bip39 4- Changed The path to 49 and coin type to 1 (testnet)

Result Bitcoin P2SH Addresses instead of bech32!

is that an expected behavior on TestNet Network?

SomberNight commented 6 years ago

if I have bech32 segwit wallet

exactly what kind of seed do you have?

If it is an electrum seed, leave the bip39 option alone! If it isn't, well, bip49 is specifically for p2wpkh-p2sh, which uses p2sh addresses (base58), not bech32. Perhaps what you want is bip84, which is like bip49 but for p2wpkh. That is not yet in a release, but git master has it.

AdamSEY commented 6 years ago

No, it's not electrum seed, I have just created that seed by myself.

Yeah, exactly I wanted bip84. after its released, I will be able to use bip39 seed with p2wpkh addresses?

SomberNight commented 6 years ago

Yes, the master branch already has this (bip84). It also works with Trezor and Ledger. It will be included in the 3.1 release.

SomberNight commented 6 years ago

(sorry, master is a bit unstable atm... maybe try to checkout https://github.com/spesmilo/electrum/commit/670194b92037dba020ef8b6bfe5922560c7f5b26)