Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ $ bip39-cli accounts --count 9 "dentist whale pattern drastic time black cigar b
Options:

-w, --wordlist <wordlist> EN JA chinese_simplified chinese_traditional english french italian japanese korean spanish (default: english)
--strength <strength> strength defaults to 128 (min), max is 256, must be a multiple of 32 (default: 128)
-h, --help output usage information
```

Expand Down
5 changes: 4 additions & 1 deletion generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ program
utils.validWordlists.join(" "),
utils.defaultWordlist
)
.option("--strength <strength>",
"strength defaults to 128 (min), max is 256, must be a multiple of 32",
128)
.action(options => {
const wordlist = utils.parseWordlistOption(options);

console.log(bip39.generateMnemonic(null, null, wordlist));
console.log(bip39.generateMnemonic(options.strength, null, wordlist));
process.exit(0);
});