Bitcoin Forum
April 16, 2024, 11:05:15 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to restore a bip39 seed from linux console and not the GUI client electrum  (Read 590 times)
gregory.krupa (OP)
Newbie
*
Offline Offline

Activity: 95
Merit: 0


View Profile
March 17, 2018, 08:41:34 PM
 #1

How to restore a bip39 seed that i have from linux console and not in the GUI client electrum?

like described here https://freedomnode.com/blog/105/restore-any-bitcoin-wallet-with-electrum

How do i enable this because i see it supports bip39 seeds to create but i dont know how to restore my seed i dont see the option "bip39"

only bip32 or so, correct me if im wrong...
1713265515
Hero Member
*
Offline Offline

Posts: 1713265515

View Profile Personal Message (Offline)

Ignore
1713265515
Reply with quote  #2

1713265515
Report to moderator
1713265515
Hero Member
*
Offline Offline

Posts: 1713265515

View Profile Personal Message (Offline)

Ignore
1713265515
Reply with quote  #2

1713265515
Report to moderator
1713265515
Hero Member
*
Offline Offline

Posts: 1713265515

View Profile Personal Message (Offline)

Ignore
1713265515
Reply with quote  #2

1713265515
Report to moderator
Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713265515
Hero Member
*
Offline Offline

Posts: 1713265515

View Profile Personal Message (Offline)

Ignore
1713265515
Reply with quote  #2

1713265515
Report to moderator
1713265515
Hero Member
*
Offline Offline

Posts: 1713265515

View Profile Personal Message (Offline)

Ignore
1713265515
Reply with quote  #2

1713265515
Report to moderator
1713265515
Hero Member
*
Offline Offline

Posts: 1713265515

View Profile Personal Message (Offline)

Ignore
1713265515
Reply with quote  #2

1713265515
Report to moderator
Xynerise
Sr. Member
****
Offline Offline

Activity: 322
Merit: 363

39twH4PSYgDSzU7sLnRoDfthR6gWYrrPoD


View Profile
March 18, 2018, 06:02:58 AM
 #2

If I understood you correctly, you have a BIP 39 seed phrase from a wallet on Linux and you want to import it into Electrum GUI?
To restore select "I already have a seed" not "create new seed"
Then you'll see the check box for BIP 39
nc50lc
Legendary
*
Offline Offline

Activity: 2380
Merit: 5475


Self-proclaimed Genius


View Profile
March 18, 2018, 07:21:12 AM
 #3

If I understood you correctly, you have a BIP 39 seed phrase from a wallet on Linux and you want to import it into Electrum GUI?
To restore select "I already have a seed" not "create new seed"
Then you'll see the check box for BIP 39
He meant linux console like http://docs.electrum.org/en/latest/console.html it doesn't have a checkbox like the GUI verson.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Abdussamad
Legendary
*
Offline Offline

Activity: 3598
Merit: 1560



View Profile
March 18, 2018, 05:32:21 PM
Last edit: March 18, 2018, 05:49:01 PM by Abdussamad
Merited by joniboini (4), nc50lc (2), EcuaMobi (2), pooya87 (1)
 #4

The electrum cli doesn't have that option. You can use this script instead: https://gist.github.com/AbdussamadA/6dc1a09b79f00d7f6a00e91a99d32ef3 . Run it with python3 interpreter on your system and pass it the seed words. It'll output the xprv for the first bip44 account. You can then pipe the output to electrum restore. For example:

Code:
python3 the-script.py seedwords1 seedword2 | electrum -w wallet_file_name restore -
gregory.krupa (OP)
Newbie
*
Offline Offline

Activity: 95
Merit: 0


View Profile
March 18, 2018, 07:57:26 PM
 #5

Thanks Abdussamad
xhiroz
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
June 16, 2020, 11:38:36 PM
Last edit: June 17, 2020, 12:58:27 AM by xhiroz
 #6

The electrum cli doesn't have that option. You can use this script instead: https://gist.github.com/AbdussamadA/6dc1a09b79f00d7f6a00e91a99d32ef3 . Run it with python3 interpreter on your system and pass it the seed words. It'll output the xprv for the first bip44 account. You can then pipe the output to electrum restore. For example:

Code:
python3 the-script.py seedwords1 seedword2 | electrum -w wallet_file_name restore -

Hello there!

I am trying to recover a wallet using your script https://gist.github.com/AbdussamadA/6dc1a09b79f00d7f6a00e91a99d32ef3 which works great, although I changed m/44' to m/49' (for bip49). But inputting the resulted yprv using

rm -f /root/.electrum/wallets/default_wallet; script.py "asd asd asd asd asd asd asd asd asd asd asd asd" | electrum -w /root/.electrum/wallets/default_wallet restore -

doesn't yield the same results as manually inputting the *same* yprv via Electrum windows gui, which properly recovers the wallet I am looking for (addresses starting with 3). Via CLI it just gives a totally different set of addresses (starting with bc1), even when the yprv is be the same.

Any clue what might be it?
nc50lc
Legendary
*
Offline Offline

Activity: 2380
Merit: 5475


Self-proclaimed Genius


View Profile
June 17, 2020, 02:18:30 AM
 #7

-snip-
-snip-
I am trying to recover a wallet using your script https://gist.github.com/AbdussamadA/6dc1a09b79f00d7f6a00e91a99d32ef3 which works great, although I changed m/44' to m/49' (for bip49). But inputting the resulted yprv using
-snip-
I have tried the script and edited what you mentioned BIP44 to BIP49 and it printed the same yrpv as the one generated by Electrum GUI.
Sample BIP39 seed: random arctic maze lazy chase cattle need rural census beauty green series
Result: yprvAJZLm5mo51QHF3SjP4LsmojahZfJ421Q11BvRVJ4mTdUb7eszhDkDexaq9QpZnzkvQMGd2exPBo f4NWQ9H6hfn35KdR9q71w66443XnuPuW

It also generated the same set of "3" addresses when used per his example:
Command: BIP39-BIP49.py random arctic maze lazy chase cattle need rural census beauty green series| python electrum-3.3.8/run_electrum -w wallet_test_delete_cli restore -
Console command - getmasterprivate(): same yprv as the above.

So Electrum should generate the same addresses if it's based from that master private key.

Here's what I've edited:
Code:
#converts bip39 mnemonic to bip49 first account xprv
-snip-
    k = keystore.from_bip39_seed( mnemonic, "", "m/49'/0'/0'" )
Just the 'comment' and the 'derivation path' and it worked.

Quote from: xhiroz
Any clue what might be it?
The 'wallet file' will be created in the same folder as the script, perhaps you've opened a different wallet with a similar name.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Abdussamad
Legendary
*
Offline Offline

Activity: 3598
Merit: 1560



View Profile
June 17, 2020, 04:11:51 PM
 #8

note you shouldn't be running electrum as root
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!