secp256k1-haskell 0.4.0 → 0.5.0
raw patch · 4 files changed
+34/−27 lines, 4 filesdep +unliftio-coredep −unliftiodep ~QuickCheckdep ~basedep ~base16-bytestring
Dependencies added: unliftio-core
Dependencies removed: unliftio
Dependency ranges changed: QuickCheck, base, base16-bytestring, bytestring, cereal, deepseq, entropy, hashable, string-conversions
Files
- CHANGELOG.md +4/−0
- secp256k1-haskell.cabal +23/−25
- src/Crypto/Secp256k1.hs +6/−0
- src/Crypto/Secp256k1/Internal.hs +1/−2
CHANGELOG.md view
@@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 0.5.0+### Changed+- Include version boundaries and other changes submitted by Emily Pillmore.+ ## 0.4.0 ### Changed - Remove fragile ForeignPtr implementation in favor of just storing ByteStrings.
secp256k1-haskell.cabal view
@@ -1,13 +1,11 @@-cabal-version: 2.0+cabal-version: 1.24 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.34.2. -- -- see: https://github.com/sol/hpack------ hash: 911c4f6cd260a60f86d8394bdda0aa90dc6cb66e94f5d2adf02a14f7b2d38047 name: secp256k1-haskell-version: 0.4.0+version: 0.5.0 synopsis: Bindings for secp256k1 description: Sign and verify signatures using the secp256k1 library. category: Crypto@@ -39,16 +37,16 @@ pkgconfig-depends: libsecp256k1 build-depends:- QuickCheck- , base >=4.8 && <5- , base16-bytestring- , bytestring- , cereal- , deepseq- , entropy- , hashable- , string-conversions- , unliftio+ QuickCheck >=2.9.2 && <2.15+ , base >=4.9 && <5+ , base16-bytestring >=0.1.1.6 && <1.1+ , bytestring >=0.10.8 && <0.11+ , cereal >=0.5.4 && <0.6+ , deepseq >=1.4.2 && <1.5+ , entropy >=0.3.8 && <0.5+ , hashable >=1.2.6 && <1.4+ , string-conversions >=0.4 && <0.5+ , unliftio-core >=0.1.0 && <0.3 default-language: Haskell2010 test-suite spec@@ -63,19 +61,19 @@ ghc-options: -threaded -rtsopts -with-rtsopts=-N build-depends: HUnit- , QuickCheck- , base >=4.8 && <5- , base16-bytestring- , bytestring- , cereal- , deepseq- , entropy- , hashable+ , QuickCheck >=2.9.2 && <2.15+ , base >=4.9 && <5+ , base16-bytestring >=0.1.1.6 && <1.1+ , bytestring >=0.10.8 && <0.11+ , cereal >=0.5.4 && <0.6+ , deepseq >=1.4.2 && <1.5+ , entropy >=0.3.8 && <0.5+ , hashable >=1.2.6 && <1.4 , hspec , monad-par , mtl , secp256k1-haskell- , string-conversions- , unliftio+ , string-conversions >=0.4 && <0.5+ , unliftio-core >=0.1.0 && <0.3 default-language: Haskell2010 build-tool-depends: hspec-discover:hspec-discover
src/Crypto/Secp256k1.hs view
@@ -116,8 +116,14 @@ get = CompactSig <$> getByteString 64 decodeHex :: ConvertibleStrings a ByteString => a -> Maybe ByteString+#if MIN_VERSION_base16_bytestring(1,0,0)+decodeHex str = case B16.decode $ cs str of+ Right bs -> Just bs+ Left _ -> Nothing+#else decodeHex str = if BS.null r then Just bs else Nothing where (bs, r) = B16.decode $ cs str+#endif instance Read PubKey where readPrec = do
src/Crypto/Secp256k1/Internal.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} {-| Module : Crypto.Secp256k1.Internal License : UNLICENSE@@ -61,7 +60,7 @@ isSuccess :: Ret -> Bool isSuccess 0 = False isSuccess 1 = True-isSuccess n = error $ "isSuccess expected 0 or 1 but got " <> show n+isSuccess n = error $ "isSuccess expected 0 or 1 but got " ++ show n unsafeUseByteString :: ByteString -> ((Ptr a, CSize) -> IO b) -> IO b unsafeUseByteString bs f =