Repository navigation
refactor(key)!: rename --entropy and --password flags - #384
Open
chukwudiikeh wants to merge 2 commits into
Open
chukwudiikeh wants to merge 2 commits into
chukwudiikeh wants to merge 2 commits into
Conversation
GenerateKeyCommand and RestoreKeyCommand repeated the same steps to derive the master key from a mnemonic, and the duplication is how bitcoindevkit#372 happened. Move them into key_from_mnemonic, called by both, and use the Display impl of Mnemonic instead of the manual fold, which gives the same output. Fixes bitcoindevkit#382
chukwudiikeh
force-pushed
the
refactor/key-rename-flags
branch
from
November 11, 2026 15:21
a69825e to
292e821
Compare
Contributor
Author
|
@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. |
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
chukwudiikeh
force-pushed
the
refactor/key-rename-flags
branch
from
November 11, 2026 15:33
292e821 to
2dfb344
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #381
Depends on #382. This branch is built on top of it because both change the same code; only the last commit (
refactor(key)!: ...) belongs to this PR. I'll rebase once #382 is merged.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.