Skip to content

Instantly share code, notes, and snippets.

@SomberNight
Created May 4, 2020 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SomberNight/519014b2b66c177506c181ef90ce9415 to your computer and use it in GitHub Desktop.
Save SomberNight/519014b2b66c177506c181ef90ce9415 to your computer and use it in GitHub Desktop.
Extract seed and xprv from Electrum wallet file from circa version 3.0
import lib as electrum
Wallet = electrum.wallet.Wallet
WalletStorage = electrum.storage.WalletStorage
password = "1234"
storage = WalletStorage('/home/user/.electrum/testnet/wallets/this_should_be_the_path_to_your_wallet_file')
storage.decrypt(password)
wallet = Wallet(storage)
wallet.keystore.get_seed(password)
wallet.keystore.get_master_private_key(password)
@SomberNight
Copy link
Author

Script here is specifically to be used with old Electrum, around version 3.0 as in description.

Note: use this script instead if you are getting the following error when opening your wallet file:
WalletFileException("Your wallet has an unsupported seed version: 14.\n\nTo open this wallet, try 'git checkout seed_v14'")
(that script is for modern Electrum)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment