For future applications, codex32 needs to be able to validate the header, string length, and select between regular/Long checksum to validate strings without caring what the human-readable prefix is, other than non-zero length printable characters.
To answer the question "Is this string valid in the codex32 format?"
@apoelstra suggested this issue here: bitcoin/bips#2040 (comment)
But I guess you should open a separate (small) PR to change the reference implementation so we can discuss it independent of anything else.
Is the reference I should change this one?
https://github.com/BlockstreamResearch/codex32/tree/master/reference/rust-codex32
To keep the PR small, I will only change the checksum selection math. I won't try to "generalize for any HRP" yet. That will be easiest to review.
For future applications, codex32 needs to be able to validate the header, string length, and select between regular/Long checksum to validate strings without caring what the human-readable prefix is, other than non-zero length printable characters.
To answer the question "Is this string valid in the codex32 format?"
@apoelstra suggested this issue here: bitcoin/bips#2040 (comment)
Is the reference I should change this one?
https://github.com/BlockstreamResearch/codex32/tree/master/reference/rust-codex32
To keep the PR small, I will only change the checksum selection math. I won't try to "generalize for any HRP" yet. That will be easiest to review.