When a string is invalid, correct shows only the repaired string. So does the interactive "Possible correction" prompt in secret, share, wallet and create --existing. codex32 check already names the problem. Keep offering the repair, and print one line to standard error that says what was wrong:
- Header: the threshold is not 0 or 2–9, or the threshold is 0 and the share index is not
S.
- Length: the string is not one of the valid lengths.
- Character set: the string contains a character outside the bech32 alphabet, such as
i, b or o.
- Case: the string mixes upper and lower case. Say that codex32 strings are either all uppercase or all lowercase, so a mixed-case string is invalid for that reason. Also say that letter case doesn't change the seed or its fingerprint. A tester's main worry here was whether a different case recovers the same wallet.
Checked with BIP-93 test vector 1 damaged five ways: last letter lowercase, threshold A, index A with threshold 0, I or B in the data, and one extra character. correct repaired each one without saying what was wrong, and check named the cause every time. This was on a disposable tip that includes #42.
This builds on #42 (#37), which makes correct repair mixed-case input. Without #42, correct on reviewability-v1 reports "No valid correction found" when an uppercase string has a single lowercase letter.
When a string is invalid,
correctshows only the repaired string. So does the interactive "Possible correction" prompt insecret,share,walletandcreate --existing.codex32 checkalready names the problem. Keep offering the repair, and print one line to standard error that says what was wrong:S.i,boro.Checked with BIP-93 test vector 1 damaged five ways: last letter lowercase, threshold
A, indexAwith threshold 0,IorBin the data, and one extra character.correctrepaired each one without saying what was wrong, andchecknamed the cause every time. This was on a disposable tip that includes #42.This builds on #42 (#37), which makes
correctrepair mixed-case input. Without #42,correctonreviewability-v1reports "No valid correction found" when an uppercase string has a single lowercase letter.