ppad-base58 0.2.1 → 0.2.2
raw patch · 3 files changed
+20/−5 lines, 3 filesdep +ppad-base16dep −base16-bytestringPVP ok
version bump matches the API change (PVP)
Dependencies added: ppad-base16
Dependencies removed: base16-bytestring
API changes (from Hackage documentation)
Files
- CHANGELOG +3/−0
- ppad-base58.cabal +10/−3
- test/Main.hs +7/−2
CHANGELOG view
@@ -1,5 +1,8 @@ # Changelog +- 0.2.2 (2025-12-28)+ * Adds an 'llvm' build flag and tests with GHC 9.10.3.+ - 0.2.1 (2025-06-21) * Minor performance improvements and internal housekeeping.
ppad-base58.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: ppad-base58-version: 0.2.1+version: 0.2.2 synopsis: base58 and base58check encoding/decoding. license: MIT license-file: LICENSE@@ -8,11 +8,16 @@ maintainer: jared@ppad.tech category: Cryptography build-type: Simple-tested-with: GHC == 9.8.1+tested-with: GHC == 9.10.3 extra-doc-files: CHANGELOG description: base58 and base58check encoding/decoding on strict bytestrings. +flag llvm+ description: Use GHC's LLVM backend.+ default: False+ manual: True+ source-repository head type: git location: git.ppad.tech/base58.git@@ -22,6 +27,8 @@ hs-source-dirs: lib ghc-options: -Wall+ if flag(llvm)+ ghc-options: -fllvm -O2 exposed-modules: Data.ByteString.Base58 , Data.ByteString.Base58Check@@ -42,8 +49,8 @@ build-depends: aeson , base- , base16-bytestring , bytestring+ , ppad-base16 , ppad-base58 , tasty , tasty-hunit
test/Main.hs view
@@ -21,10 +21,15 @@ , vc_payload :: !BS.ByteString } deriving Show +decodeLenient :: BS.ByteString -> BS.ByteString+decodeLenient bs = case B16.decode bs of+ Nothing -> error "boom"+ Just v -> v+ instance A.FromJSON Valid_Base58Check where parseJSON = A.withObject "Valid_Base58Check" $ \m -> Valid_Base58Check <$> fmap TE.encodeUtf8 (m .: "string")- <*> fmap (B16.decodeLenient . TE.encodeUtf8) (m .: "payload")+ <*> fmap (decodeLenient . TE.encodeUtf8) (m .: "payload") data Invalid_Base58Check = Invalid_Base58Check { ic_string :: !BS.ByteString@@ -69,7 +74,7 @@ instance A.FromJSON Valid_Base58 where parseJSON = A.withObject "Valid_Base58" $ \m -> Valid_Base58- <$> fmap (B16.decodeLenient . TE.encodeUtf8) (m .: "decodedHex")+ <$> fmap (decodeLenient . TE.encodeUtf8) (m .: "decodedHex") <*> fmap TE.encodeUtf8 (m .: "encoded") execute_base58 :: Valid_Base58 -> TestTree -- XX label