@@ -432,7 +432,7 @@ by entering the mnemonics right on the device.
432432 :
433433 : Generate public wallet address(es) from a secret seed
434434 :
435- : options :
435+ : optional arguments :
436436 : -h, --help show this help message and exit
437437 : -v, --verbose Display logging information.
438438 : -q, --quiet Reduce logging output.
@@ -484,6 +484,71 @@ by entering the mnemonics right on the device.
484484 : data is random, while the nonce is not, but since this construction is only used once, it should be
485485 : satisfactory. This first nonce record is transmitted with an enumeration prefix of "nonce".
486486
487+ *** Producing Addresses
488+
489+ Addresses can be produced in plaintext or encrypted, and output to stdout or to a serial port.
490+
491+ #+LATEX: {\scriptsize
492+ #+BEGIN_SRC bash :exports both :results raw
493+ slip39-generator --secret ffffffffffffffffffffffffffffffff --path '../-3' | sed 's/^/: /' # (just so output formatting looks correct)
494+ #+END_SRC
495+
496+ #+RESULTS:
497+ : 0: [["ETH", "m/44'/60'/0'/0/0", "0x824b174803e688dE39aF5B3D7Cd39bE6515A19a1"], ["BTC", "m/84'/0'/0'/0/0", "bc1q9yscq3l2yfxlvnlk3cszpqefparrv7tk24u6pl"]]
498+ : 1: [["ETH", "m/44'/60'/0'/0/1", "0x8D342083549C635C0494d3c77567860ee7456963"], ["BTC", "m/84'/0'/0'/0/1", "bc1qnec684yvuhfrmy3q856gydllsc54p2tx9w955c"]]
499+ : 2: [["ETH", "m/44'/60'/0'/0/2", "0x52787E24965E1aBd691df77827A3CfA90f0166AA"], ["BTC", "m/84'/0'/0'/0/2", "bc1q2snj0zcg23dvjpw7m9lxtu0ap0hfl5tlddq07j"]]
500+ : 3: [["ETH", "m/44'/60'/0'/0/3", "0xc2442382Ae70c77d6B6840EC6637dB2422E1D44e"], ["BTC", "m/84'/0'/0'/0/3", "bc1qxwekjd46aa5n0s3dtsynvtsjwsne7c5f5w5dsd"]]
501+
502+ To produce accounts from a BIP-39 or SLIP-39 seed, recover it using slip39-recovery.
503+
504+ Here's an example of recovering a test BIP-39 seed; note that it yields the well-known ETH
505+ =0xfc20...1B5E= and BTC =bc1qk0...gnn2= accounts associated with this test Mnemonic:
506+
507+ #+LATEX: {\scriptsize
508+ #+BEGIN_SRC bash :exports both :results raw
509+ slip39-recovery --bip39 --mnemonic 'zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong' \
510+ | slip39-generator --secret - --path '../-3' | sed 's/^/: /' # (just so output formatting looks correct)
511+ #+END_SRC
512+
513+ #+RESULTS:
514+ : 0: [["ETH", "m/44'/60'/0'/0/0", "0xfc2077CA7F403cBECA41B1B0F62D91B5EA631B5E"], ["BTC", "m/84'/0'/0'/0/0", "bc1qk0a9hr7wjfxeenz9nwenw9flhq0tmsf6vsgnn2"]]
515+ : 1: [["ETH", "m/44'/60'/0'/0/1", "0xd1a7451beB6FE0326b4B78e3909310880B781d66"], ["BTC", "m/84'/0'/0'/0/1", "bc1qkd33yck74lg0kaq4tdcmu3hk4yruhjayxpe9ug"]]
516+ : 2: [["ETH", "m/44'/60'/0'/0/2", "0x578270B5E5B53336baC354756b763b309eCA90Ef"], ["BTC", "m/84'/0'/0'/0/2", "bc1qvr7e5aytd0hpmtaz2d443k364hprvqpm3lxr8w"]]
517+ : 3: [["ETH", "m/44'/60'/0'/0/3", "0x909f59835A5a120EafE1c60742485b7ff0e305da"], ["BTC", "m/84'/0'/0'/0/3", "bc1q6t9vhestkcfgw4nutnm8y2z49n30uhc0kyjl0d"]]
518+
519+ We can encrypt the output, to secure the sequence (and due to integrated MACs, ensures no errors
520+ occur over an insecure channel like a serial cable):
521+
522+ #+LATEX: {\scriptsize
523+ #+BEGIN_SRC bash :exports both :results raw
524+ slip39-recovery --bip39 --mnemonic 'zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong' \
525+ | slip39-generator --secret - --path '../-3' --encrypt 'password' | sed 's/^/: /' # (just so output formatting looks correct)
526+ #+END_SRC
527+
528+ #+RESULTS:
529+ :
530+ :
531+ : nonce: 72c5464f37472817b5c302e66d69ef3dc8ab85cfa02c6bfbfe4e0d04
532+ : 0: ede64f9604fe6d1d7b300ea6d7c6ac7436ec348791c6f2971e49371e587625476c38732a42134e79d955863160479c87956c71cce9de416e1ddce4a516060619325ad5e535edd3878f1b41c5541c922a8dac76d625683e3660f0d57996bfc92b2c407b6d7ad3ee25e1ca554700d87177c3f938fbae189ac0949d8a9c8fb53467a8dabcadf7e24ea80217ed693592bb00972512e79d7daba21c08abe00806aef6d0912a4d16
533+ : 1: 47712395d188029d61f94397d8d11fdc175f0e810cce6abc4610af19d86a3651b4cc653ae9a82d3e57636ab22391f63856c84e5fd383099948446dfe9d2e4aa8714481901fb08b1b44c16498b08464ef1997e298eafa77bfb03d22d6b6ec4887377fcc826c6bbfef76c0a5ff0d7954383bab372c8cb198988789bafc33bbcc369ded63340e5c95c861d52071795900e6f88e18c35c7bf20c59027e7785d08cf90ff2115729
534+ : 2: 279dcb069fe37f33547f0a2bc763f6d1852733b94686807ef5dbe854326fc1a6e1e097afa3a52be48f75bf6c821a3cdebd2f2be228dfa36b0e9787f4234170bdc835afd96767e26f7f11796f376e546fdb67810bbdacf957b7bdee64fbfdf85abaf72a6d8eeb9508828931674b3e3db386ca923c13a8298d4835462af6cb1141c8021d753d28a88254d9c3997457d705f705328ba7ff507266745417381a70b3344d20ad84
535+ : 3: 0a044f98e88fe4c038d86710e6d128e173d6f5a42ff95647dd894868b0bb5d323ce0a1754327241b2c85458c22640d3401c343cdd94869cc86f250384ae642c01822b0ba91aa4a6c4635cd9bcd8f47ecf4396445c3a9af93419f4bf6ff773fa19d67c5ac10d2bd4da63b94a2128921aafa93b0133271db50c7fc6657f850daf9396f16aa71f491b0f472512144d7b02b98e3a0a6c4153505b3f8999b24b55585225c020f92
536+
537+ On the receiving computer, we can decrypt and recover the stream of accounts from the wallet
538+ seed; any rows with errors are ignored:
539+ #+LATEX: {\scriptsize
540+ #+BEGIN_SRC bash :exports both :results raw
541+ slip39-recovery --bip39 --mnemonic 'zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong' \
542+ | slip39-generator --secret - --path '../-3' --encrypt 'password' \
543+ | slip39-generator --receive --decrypt 'password' | sed 's/^/: /' # (just so output formatting looks correct)
544+ #+END_SRC
545+
546+ #+RESULTS:
547+ : 0: [["ETH", "m/44'/60'/0'/0/0", "0xfc2077CA7F403cBECA41B1B0F62D91B5EA631B5E"], ["BTC", "m/84'/0'/0'/0/0", "bc1qk0a9hr7wjfxeenz9nwenw9flhq0tmsf6vsgnn2"]]
548+ : 1: [["ETH", "m/44'/60'/0'/0/1", "0xd1a7451beB6FE0326b4B78e3909310880B781d66"], ["BTC", "m/84'/0'/0'/0/1", "bc1qkd33yck74lg0kaq4tdcmu3hk4yruhjayxpe9ug"]]
549+ : 2: [["ETH", "m/44'/60'/0'/0/2", "0x578270B5E5B53336baC354756b763b309eCA90Ef"], ["BTC", "m/84'/0'/0'/0/2", "bc1qvr7e5aytd0hpmtaz2d443k364hprvqpm3lxr8w"]]
550+ : 3: [["ETH", "m/44'/60'/0'/0/3", "0x909f59835A5a120EafE1c60742485b7ff0e305da"], ["BTC", "m/84'/0'/0'/0/3", "bc1q6t9vhestkcfgw4nutnm8y2z49n30uhc0kyjl0d"]]
551+
487552** The =slip39= module API
488553
489554 Provide SLIP-39 Mnemonic set creation from a 128-bit master secret, and recovery of the secret
0 commit comments