Post
Topic
Board Electrum
Merits 1 from 1 user
Re: "Wallet -> Seed" option greyed out
by
Sr.Urbanist
on 12/04/2024, 17:26:17 UTC
⭐ Merited by hugeblack (1)
Hey, I appreciate all of the responses that have offered potential solutions and peaked my curiosity about some of the backend to Electrum and coding. Smiley

 
There's no way to see your BIP39 seed phrase from Electrum.
Unlike a native Electrum seed phrase which is saved in the wallet file under "keystore", BIP39's isn't saved there, just the derived extended private/public keys.
Without the actual seed phrase, it impossible to get it from the extended private key (xprv) that's derived from it.

Interesting. That sounds like a rabbit hole, as I originally created the wallet from a BIP39 seed. Perhaps there is something different about BIP39 I don't understand. And, maybe, Electrum takes a different approach than other wallets like Exodus.

The most probable reason is the developers' take on BIP39 that its seed phrase isn't enough as a backup since the user also has to take note of derivations path and script type.

I suppose this is why my legacy Bitcoin UTXOs don't show up if I choose a Segwit wallet and visa versa.

I'd like to get my phrase and import it into another wallet and am traveling ... away from my hand-written backup. Appreciate any help  Wink
Why tho?

I have alts on the same seed that I'd like to access.

Don't you already have seed words offline and written as a backup on piece of paper or metal?

Yes. I am traveling and don't have access to them, right now.

In case if you don't have that than I would just send coins to newly generated address in wallet with new seed words that have proper backup.

I'm trying to access some alts with the same seed.

Waiting for fees to go down would be a wise decision.

Yeah  Roll Eyes I sometimes wonder if the *inaudible* should be *inaudibled*. Sinful thought.  Embarrassed

Anyways, get your master private key (actually "extended private key") from the console with getmasterprivate() command.
Then see if your other wallet supports importation of xprv keys. You might have to use convert_xkey(xkey="zprv.....",xtype="standard") if the other wallet only support "xprv".

In general this will work, but if uses passphrase, may get something different.

Code:
@classmethod
    def mnemonic_to_seed(self, mnemonic, passphrase) -> bytes:
        PBKDF2_ROUNDS = 2048
        mnemonic = normalize_text(mnemonic)
        passphrase = passphrase or ''
        passphrase = normalize_text(passphrase)
        return hashlib.pbkdf2_hmac('sha512', mnemonic.encode('utf-8'), b'electrum' + passphrase.encode('utf-8'), iterations = PBKDF2_ROUNDS)

https://github.com/spesmilo/electrum/blob/df842af0b6b48074a510155fbfd28df295c200d4/electrum/mnemonic.py

That seems like it may take some time. I'm skeptical getting into advanced scripts I don't understand, especially after losing multple BTC back in the day but interested in better understanding useful tools that work.