Say why a mnemonic is refused (closes #76)
check / check (push) Waiting to run

Every way a mnemonic could be invalid was reported as a checksum
failure, including an empty one. It is now refused as empty, as having
a word count other than 12, 15, 18, 21 or 24, as having a word that is
not on the BIP-39 word list, or as failing the checksum. A word not on
the list is named by its position, never by the word itself.

Model: opus-5-5
This commit is contained in:
2026-10-14 19:34:21 +00:00
committed by sneak
parent 44cb5215b0
commit 727fa8977b
3 changed files with 108 additions and 9 deletions
+6 -4
View File
@@ -119,10 +119,12 @@ order; the first one found wins:
4. A prompt on the terminal with echo turned off.
If none of these is available and standard input is not a terminal, the tool
refuses and exits with status 1. A mnemonic that fails the BIP-39 checksum is
refused with a message saying so. Keys are derived from the mnemonic's words
joined by single spaces, whatever whitespace is around or between them, so one
word per line, tabs or extra spaces give the same keys.
refuses and exits with status 1. A mnemonic that is empty, does not have 12, 15,
18, 21 or 24 words, has a word that is not on the BIP-39 word list, or fails the
BIP-39 checksum is refused with a message saying which. A word that is not on
the list is named by its position, never printed. Keys are derived from the
mnemonic's words joined by single spaces, whatever whitespace is around or
between them, so one word per line, tabs or extra spaces give the same keys.
The key index, `--words`, the `--to` recipients and the file `age encrypt` or
`age decrypt` is given to read are checked before the mnemonic is looked for, so