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

Bech32 Library #248

Merged
merged 23 commits into from
May 15, 2019
Merged

Bech32 Library #248

merged 23 commits into from
May 15, 2019

Conversation

jonathanknowles
Copy link
Member

@jonathanknowles jonathanknowles commented May 9, 2019

Issue Number

Issue #238

@jonathanknowles jonathanknowles self-assigned this May 9, 2019
@KtorZ KtorZ mentioned this pull request May 9, 2019
@KtorZ KtorZ force-pushed the jonathanknowles/bech32-lib branch from 584dbd0 to dab6d08 Compare May 14, 2019 15:26
@KtorZ KtorZ marked this pull request as ready for review May 14, 2019 15:26
Copy link
Member

@KtorZ KtorZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathanknowles

This leaves us with a basic encode / decode API for the bech32 format. I've slightly review the high-level module API to be easier to use (using ByteString as an input type instead of [Word8] and, removing type alias HRP in a favor of a newtype HumanReadablePart with a smart-constructor).

This isn't perfect, but since I know you'll be working on some extra stuff for the error location, I'll leave it to you to iterate on top of this. Please don't spend too much time with this error detection though 🙏

@jonathanknowles jonathanknowles force-pushed the jonathanknowles/bech32-lib branch 2 times, most recently from 7e66795 to 467c69f Compare May 15, 2019 06:39
@jonathanknowles jonathanknowles changed the title WIP Bech32 Library Bech32 Library May 15, 2019
jonathanknowles and others added 22 commits May 15, 2019 09:22
This makes code more concise, but doesn't affect safety, as this constructor is
not exported outside of the `Codec.Binary.Bech32` module.
Use these constants instead of repeating the same hard-coded values in
different places.
Use these constants to avoid repeatedly hardcoding the same values
within functions.
@jonathanknowles
Copy link
Member Author

jonathanknowles commented May 15, 2019

@KtorZ I've added more tests, and separated out the modules into public (Bech32) and internal (Bech32.Internal). This PR is ready for final review and merging.

I've moved the WIP error location detection code to a separate branch for the moment. (jonathanknowles/bech32-lib-error-location-detection)

Copy link
Member

@KtorZ KtorZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@KtorZ KtorZ merged commit 8b027bb into master May 15, 2019
@iohk-bors iohk-bors bot deleted the jonathanknowles/bech32-lib branch May 15, 2019 10:49
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

Successfully merging this pull request may close these issues.

None yet

2 participants