-
Notifications
You must be signed in to change notification settings - Fork 106
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
Haskell support for Bech32m #66
base: master
Are you sure you want to change the base?
Haskell support for Bech32m #66
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, haven't checked the tests.
then guard (length witprog == 20 || length witprog == 32) >> return 1 | ||
else guard (length witprog >= 2 && length witprog <= 40) >> return bech32mConst | ||
where | ||
bech32mConst = 0x2bc830a3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to define a global sum type for the two encoding types and have a mapping function from encoding to checksum constant. Then it can be exported to the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I've added two commits which I will squash afterwards. |
utACK 7736efe |
7736efe
to
7d25521
Compare
squashed some commits. |
re-ACK 7d25521, no changes in squash |
7d25521
to
c31bf76
Compare
This also includes a slightly refactored version of PR #41.