Repository navigation
refactor(key)!: rename --entropy and --password flags - #384
chukwudiikeh wants to merge 1 commit into
Conversation
a69825e to
292e821
Compare
|
@tvpeter @vadim-anfv please can you review when you have time. Built on #383, so only the last commit is new here. Used --word_count. |
292e821 to
2dfb344
Compare
2dfb344 to
bb5cc68
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #384 +/- ##
=======================================
Coverage 59.42% 59.42%
=======================================
Files 24 24
Lines 4498 4498
=======================================
Hits 2673 2673
Misses 1825 1825
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Reviewing #383 first, and #384 after it is rebased on top of the merged #383, so the two land in order. One small thing: the description says this depends on #382, which is the issue. |
|
Thanks @vadim-anfv, fixed the description to point at #383. I'll rebase this onto master once #383 is merged. |
d88c683 to
1d0daf6
Compare
|
@vadim-anfv PR #383 is merged, so I've rebased this onto master it's now a single commit with just the rename. |
Rename key generate --entropy to --word_count (-e to -w), since the value is a number of words, and --password to --passphrase (env PASSWORD to PASSPHRASE) in key generate and key restore, the BIP-39 term. Expand the passphrase doc comment shown by --help, and update the tests and changelog. Fixes bitcoindevkit#381
d9e1342 to
6b27694
Compare
vadim-anfv
left a comment
There was a problem hiding this comment.
The rename is complete, no old flag name is left anywhere in the tree. One suggestion on the changelog below, otherwise this reads good to me.
| - Fixed `key restore` ignoring `--password`, which restored passphrase-protected mnemonics to the wrong key | ||
| - Fixed `key generate` silently producing a 24-word mnemonic for any `--entropy` value other than 12; values other than 12 and 24 are now rejected |
There was a problem hiding this comment.
These two entries sit in the same [Unreleased] section as the rename below them, so at release they will point at flags that no longer exist. Keeping the old name next to the new one fixes that:
| - Fixed `key restore` ignoring `--password`, which restored passphrase-protected mnemonics to the wrong key | |
| - Fixed `key generate` silently producing a 24-word mnemonic for any `--entropy` value other than 12; values other than 12 and 24 are now rejected | |
| - Fixed `key restore` ignoring `--password` (now `--passphrase`), which restored passphrase-protected mnemonics to the wrong key | |
| - Fixed `key generate` silently producing a 24-word mnemonic for any `--entropy` (now `--word_count`) value other than 12; values other than 12 and 24 are now rejected |
Fixes #381
key generate --entropytakes a number of words, not an amount of entropy, and--passwordis the BIP-39 passphrase. This PR renames:key generate --entropy→--word_count(-e→-w). TheWORD_COUNTenv var is unchanged.--password→--passphrase(envPASSWORD→PASSPHRASE) inkey generateandkey restore, along with the struct fields.The passphrase doc comment, shown by--help, now says that restoring needs the same mnemonic and passphrase, and that a different passphrase gives a different key rather than an error.I used--word_countto match most flags andkey derive --derivation_path; if--word-countis preferred, it's a one-word change.Changed
BREAKING:
key generate --entropy/-eis now--word_count/-w, and--password/PASSWORDis now--passphrase/PASSPHRASEinkey generateandkey restore.