Created
August 15, 2017 13:50
-
-
Save mflaxman/f6350d84cef7a9ef997a0bc99f120a86 to your computer and use it in GitHub Desktop.
Proof you can recover your Trezor funds without a Trezor (if it breaks and/or the company goes out of business)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bitmerchant.wallet import Wallet | |
from mnemonic import Mnemonic | |
# put in whatever Trezor generates for you here (or backup from this empty/insecure one as a test) | |
mnemonic = 'clean health food open blood network differ female lion eagle rough upon update zone antique defense venture uncover mobile charge actress film vocal enough' | |
passphrase = '' # empty string or whatever you actually choose | |
path = "m/44'/0'/0'/0/0" # whatever shows up on the UI for that account (everything will start with m/44'/0' since it's bip44) | |
child = Wallet.from_master_secret(Mnemonic('english').to_seed(mnemonic, passphrase)).get_child_for_path(path) | |
child.to_address() # '18K9axbPpwqZgngB58nuwsYevL2z6ey4YG' (confirm this matches what Trezor is showing you) | |
child.export_to_wif() # 'L4orhKxb9YSGRHZvv8th3KeUqRz6x3PPmdqLThajUgSesTovfKPG' (what you can use to spend the funds for the previous address) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Libraries used: