Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why allow invalid Mnemonics? #65

Open
pezcore opened this issue Feb 2, 2024 · 0 comments
Open

Why allow invalid Mnemonics? #65

pezcore opened this issue Feb 2, 2024 · 0 comments

Comments

@pezcore
Copy link
Contributor

pezcore commented Feb 2, 2024

Why does Mnemonic::parse_in_normalized_without_checksum_check exist? Isn't the main usefulness of this crate the fact that Mnemonic instances are guaranteed to be valid? Now if someone writes an application that presents a Mnemonic to a user, they have to manually trace the source of its initialization and make sure it wasn't created with parse_in_normalized_without_checksum_check or else they risk presenting an invalid mnemonic.

It makes sense for possibly-invalid mnemonics and operations thereof to be in scope of this crate, but I feel like their implementation shouldn't break the checksum validity invariant of Mnemonic. That way, application authors can simply trust that Mnemonic instances are valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant