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

Build with haskell-bitcoin #3

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tochicool
Copy link

Changes to get haskell-bitcoin to use this library. I'm using these changes locally as I've needed some of the Schnorr bindings upstream. I don't expect this to get merged as I've added some questionable dependencies and instances to get them to build together with minimal changes. Happy to close this once #31 is complete.

Related: haskell-bitcoin changes

@@ -395,6 +479,17 @@ exportSignatureDer (Signature fptr) = unsafePerformIO $ do
unsafePackByteString (outBuf, len)


-- | Convert signature to a normalized lower-S form. 'Nothing' indicates that it
-- was already normal.
normalizeSignature :: Signature -> Maybe Signature

Choose a reason for hiding this comment

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

It seems like it would be more ergonomic to have the signature Signature -> (Bool, Signature) where the bool signals whether the signature return parameter is the original or a modified signature.

Copy link
Author

Choose a reason for hiding this comment

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

Changed it. I also thought it was a bit awkward when copying it over from secp256k1-haskell.

@ProofOfKeags
Copy link
Collaborator

Yeah I think we're trying to ditch cereal as a dependency throughout this stack so I'm definitely gonna bias against merging this directly but we should keep it around as a template that we can rebase onto master after haskoin#31.

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

3 participants