Add WordCount for mnemonic generation - #98
Conversation
caarloshenriq
left a comment
There was a problem hiding this comment.
tACK
I tested the changes locally:
- Ran the full test suite (
cargo test) and all tests passed. - Performed manual tests by generating mnemonics with different
WordCountvariants (12, 18, and 24 words) usinggenerate,generate_in, andgenerate_in_with. - All generated mnemonics had the correct word count and the generation flow behaved as expected.
Everything worked as intended.
tnull
left a comment
There was a problem hiding this comment.
Thanks for looking into this! While it's a nice API improvement, it's probably not super critical so I think we want to hold off on merging this until we have another, more critical change that would require breaking API anyways.
In the meantime, here are a few comments. Please also always disclose in the PR description and commit message if you utilized AI tooling. To this end, rewriting the PR description and commit messages to replace AI slop with concise descriptions would be appreciated. Thanks!
1debb32 to
a91b105
Compare
Restrict mnemonic generation to the five BIP39 word counts by accepting WordCount in generate, generate_in, and generate_in_with. Update documentation, tests, and benchmarks for the new API. AI tooling was used to help revise this change.
a91b105 to
607cc3c
Compare
|
Thanks. I addressed the inline comments, updated the benchmark call site, and rewrote the PR description and commit message with an AI tooling disclosure. |
Adds a public
WordCountenum and updatesgenerate,generate_in, andgenerate_in_withto accept it instead ofusize. The enum restricts generation to the five BIP39 word counts.This is a breaking API change. Callers must replace integer word counts with the corresponding
WordCountvariant.Closes #97.
AI tooling was used to help revise this change.