6

There are tools like https://iancoleman.io/bip39/ and https://coinomi.com/recovery-phrase-tool.html that you can use to generate your Secret Key if you happen to lose your Ledger Nano S, but unfortunately at this time they do not support Stellar.

How can one generate their personal secret key from their 24 word mnemonic?

I believe it's based on some standard, 148 0x80000094 Stellar Lumens https://github.com/satoshilabs/slips/blob/master/slip-0044.md , but I'm unsure where to go with BIP39 and this value.

7

We built stellar-hd-wallet. It's a very simple command-line tool that can generate accounts for a given mnemonic seed.

However, the whole point of the Ledger is to not use the keys outside the device because it's much easier for hackers to steal your funds.

The low level method of generating the keys from mnemonic seed is described in SEP-0005.


Example of usage:

$ stellar-hd-wallet accounts
How many words? 24   
Enter word #1   cable
Enter word #2   spray
Enter word #3   genius
Enter word #4   state
Enter word #5   float
Enter word #6   twenty
Enter word #7   onion
Enter word #8   head
Enter word #9   street
Enter word #10  palace
Enter word #11  net
Enter word #12  private
Enter word #13  method
Enter word #14  loan
Enter word #15  turn
Enter word #16  phrase
Enter word #17  state
Enter word #18  blanket
Enter word #19  interest
Enter word #20  dry
Enter word #21  amazing
Enter word #22  dress
Enter word #23  blast
Enter word #24  tube
Enter password (leave empty if none): p4ssphr4se
Mnemonic: cable spray genius state float twenty onion head street palace net private method loan turn phrase state blanket interest dry amazing dress blast tube
BIP39 Seed: d425d39998fb42ce4cf31425f0eaec2f0a68f47655ea030d6d26e70200d8ff8bd4326b4bdf562ea8640a1501ae93ccd0fd7992116da5dfa24900e570a742a489
m/44'/148' key: c83c61dc97d37832f0f20e258c3ba4040a258800fd14abaff124a4dee114b17e

m/44'/148'/0' GDAHPZ2NSYIIHZXM56Y36SBVTV5QKFIZGYMMBHOU53ETUSWTP62B63EQ SAFWTGXVS7ELMNCXELFWCFZOPMHUZ5LXNBGUVRCY3FHLFPXK4QPXYP2X
m/44'/148'/1' GDY47CJARRHHL66JH3RJURDYXAMIQ5DMXZLP3TDAUJ6IN2GUOFX4OJOC SBQPDFUGLMWJYEYXFRM5TQX3AX2BR47WKI4FDS7EJQUSEUUVY72MZPJF
m/44'/148'/2' GCLAQF5H5LGJ2A6ACOMNEHSWYDJ3VKVBUBHDWFGRBEPAVZ56L4D7JJID SAF2LXRW6FOSVQNC4HHIIDURZL4SCGCG7UEGG23ZQG6Q2DKIGMPZV6BZ
m/44'/148'/3' GBC36J4KG7ZSIQ5UOSJFQNUP4IBRN6LVUFAHQWT2ODEQ7Y3ASWC5ZN3B SDCCVBIYZDMXOR4VPC3IYMIPODNEDZCS44LDN7B5ZWECIE57N3BTV4GQ
m/44'/148'/4' GA6NHA4KPH5LFYD6LZH35SIX3DU5CWU3GX6GCKPJPPTQCCQPP627E3CB SA5TRXTO7BG2Z6QTQT3O2LC7A7DLZZ2RBTGUNCTG346PLVSSHXPNDVNT
m/44'/148'/5' GBOWMXTLABFNEWO34UJNSJJNVEF6ESLCNNS36S5SX46UZT2MNYJOLA5L SDEOED2KPHV355YNOLLDLVQB7HDPQVIGKXCAJMA3HTM4325ZHFZSKKUC
m/44'/148'/6' GBL3F5JUZN3SQKZ7SL4XSXEJI2SNSVGO6WZWNJLG666WOJHNDDLEXTSZ SDYNO6TLFNV3IM6THLNGUG5FII4ET2H7NH3KCT6OAHIUSHKR4XBEEI6A
m/44'/148'/7' GA5XPPWXL22HFFL5K5CE37CEPUHXYGSP3NNWGM6IK6K4C3EFHZFKSAND SDXMJXAY45W3WEFWMYEPLPIF4CXAD5ECQ37XKMGY5EKLM472SSRJXCYD
m/44'/148'/8' GDS5I7L7LWFUVSYVAOHXJET2565MGGHJ4VHGVJXIKVKNO5D4JWXIZ3XU SAIZA26BUP55TDCJ4U7I2MSQEAJDPDSZSBKBPWQTD5OQZQSJAGNN2IQB
m/44'/148'/9' GBOSMFQYKWFDHJWCMCZSMGUMWCZOM4KFMXXS64INDHVCJ2A2JAABCYRR SDXDYPDNRMGOF25AWYYKPHFAD3M54IT7LCLG7RWTGR3TS32A4HTUXNOS
  • Could you explain what all the /# ones are? Does every BIP39 seed generate 10 wallets? One of those presumably being the one on the Ledger? – Zach Jan 26 '18 at 16:57
  • 1
    /# is the ID of your account. You can generate much more accounts from a single seed (2,147,483,647 to be exact). /0' is called a primary account - most users need a single account. But if for any reason you need to generate more accounts you can. – Bartek Nowotarski Jan 26 '18 at 17:10
  • How come I get an "Invalid value" response after answering 24 to "how many words?" What am I missing? – bitcoinero Jun 19 '18 at 23:26
1

I have also built a tool that does exactly what you need. You can generate Ledger compatible 24 words mnemonic (in different languages too!) and are presented with Stellar public/secret key-pair. You can also restore your keys by entering each of the 24 words that you already have. The functionality includes additional passphrase protection string (up to 100 chars - just like Ledger) and ability to generate HD accounts based on account index you enter. Please read the About section first as it states some important information on when this tool should be used.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.