I lost one of my Ledger devices, back in 2018. Situation which might be the worst nightmare for many teaches me how to recover my private keys without waiting for a new device.
Please DO NOT follow this advice with your own recovery phrase just to confirm your addresses. There is a reason Ledger and similar security focused companies advices to never input your recovery phrase into internet-connected devices. However, I encourage you to try replicate my results on the zero-seed which is presented bellow.
- This instruction should work for all Hardware wallets as it's based on Bitcoin's standards.
- I've tested it on Ledger Nano S and Ledger Nano S Plus devices.
- You have installed a Ledger Live application on your computer and setup Bitcoin and Ethereum accounts on it.
- You have backed up your wallet's recovery phrase.
- Seed phrase, recovery phrase or mnemonic: A phrase containing 12 or 24 words which can be used to generate a multiple accounts. There are 2048 carefully chosen words in total that forms any mnemonic.
- Account, address: A single private key or address in a wallet. We can generate millions private keys from the mnemonic. Each private key corresponds to a single address of the account.
- Wallet: A collection of accounts we have a private key for. For example Ledger Live allows us to add another account unless we transfer funds to previously added accounts.
- If you are curious about the technical details, procedure to generate so-called Hierarchical Deterministic Wallets is described in BIP32 and how to use mnemonic as an entropy to the generator is described in BIP39.
I'll show you how to recover private keys to your accounts using command-line tool wagyu as I prefer distraction free text interface. You will find installation instructions in the wagyu repository.
You may also use the online tool which is Ian Coleman's website which will also work offline. It's easier to use so I will allow you to recover the example accounts on your own.
⚠ Please don't use your recovery phrase! I won't show you how to clean your computer after the experiments, so proceed at your own risk.
For the purpose of this experiment, I'll use the "zero" mnemonic which is 24-words
23 x abandon + art. If you have read BIP-39 Mnemonic code for generating deterministic keys you may suspect why I call it "zero".
I will proceed in my terminal, you can also try it in the browser on Ian Coleman's website, but it might require more writing and clicking.
MNEMONIC="$(yes 'abandon' | head -23 | xargs) art"
echo $MNEMONICTo make the "Hierarchical Deterministic Wallets" procedure work for the many blockchains, the first elements along the hierarchy path describes the chain. E.g.
m/84'/0'- is the new Bitcoin pathm/44'/60''- is the Ethereum path
You can discover the correct path going for "edit accounts" in the Ledger Live application.
Here I'm using the same paths as the Ledger Live application, so you will be able to recover your own accounts when you will need them.
Here are first 3 addresses derived from our zero-seed. Try to get them by yourself.
0xF278cF59F82eDcf871d630F28EcC8056f25C1cdbpathm/44'/60'/0'/0/00x94142B4f665316D3304C3a595ec83aC9C8046598pathm/44'/60'/1'/0/00xe93E76dFCc3Bb3A6A3A36Bcd9df68cb7C0AD46AApathm/44'/60'/2'/0/0
wagyu ethereum import-hd \
--mnemonic $MNEMONIC \
--derivation "m/44'/60'/0'/0/0"bc1qyn0ml52dy0udru3nafudt6af7x2kv7ngysfk0kpathm/84'/0'/0'/0/1bc1qn3janx3aep39dty3c9q9tj8h74lwchn09rftpxpathm/84'/0'/0'/0/2bc1qtjfcy96x0lue5tka6sftq0wjr2wv8v6tg6m3snpathm/84'/0'/0'/0/3
wagyu bitcoin import-hd \
--mnemonic $MNEMONIC \
--derivation "m/84'/0'/0'/0/1" \
--format bech32

