haskoin-core 1.0.0 → 1.0.1
raw patch · 11 files changed
+23/−13 lines, 11 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +7/−1
- haskoin-core.cabal +1/−1
- src/Haskoin/Crypto/Keys/Extended/Internal.hs +0/−0
- src/Haskoin/Network/Common.hs +1/−1
- src/Haskoin/Script/SigHash.hs +1/−1
- src/Haskoin/Script/Standard.hs +3/−1
- src/Haskoin/Transaction/Builder.hs +6/−4
- src/Haskoin/Transaction/Partial.hs +1/−2
- src/Haskoin/Util/Helpers.hs +2/−2
- src/Haskoin/Util/Marshal.hs +0/−0
- test/Haskoin/BlockSpec.hs +1/−0
CHANGELOG.md view
@@ -5,7 +5,13 @@ 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). -## [1.0.0]+## [1.0.1] - 2023-08-03++### Changed++- Do not use alternative monad for Either String values.++## [1.0.0] - 2023-07-28 ### Changed
haskoin-core.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: haskoin-core-version: 1.0.0+version: 1.0.1 synopsis: Bitcoin & Bitcoin Cash library for Haskell description: Please see the README on GitHub at <https://github.com/haskoin/haskoin-core#readme> category: Bitcoin, Finance, Network
src/Haskoin/Crypto/Keys/Extended/Internal.hs view
src/Haskoin/Network/Common.hs view
@@ -3,9 +3,9 @@ {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoFieldSelectors #-}-{-# LANGUAGE ImportQualifiedPost #-} -- | -- Module : Haskoin.Network.Common
src/Haskoin/Script/SigHash.hs view
@@ -329,7 +329,7 @@ instance MarshalJSON (Network, Ctx) TxSignature where marshalValue (net, ctx) = String . encodeHex . encodeTxSig net ctx marshalEncoding s = hexEncoding . runPutL . marshalPut s- unmarshalValue (net, ctx) = + unmarshalValue (net, ctx) = withText "TxSignature" $ \t -> case decodeHex t of Nothing -> fail "Cannot decode hex signature"
src/Haskoin/Script/Standard.hs view
@@ -185,7 +185,9 @@ -- Provably unspendable data carrier output [OP_RETURN, OP_PUSHDATA bs _] -> Right $ DataCarrier bs -- Pay to MultiSig Keys- _ -> matchPayMulSig ctx s <|> Left "decodeOutput: Non-standard output"+ _ -> case matchPayMulSig ctx s of+ Right x -> return x+ Left _ -> Left "decodeOutput: Non-standard output" witnessVersionOp :: Word8 -> Maybe ScriptOp witnessVersionOp 0 = Just OP_0
src/Haskoin/Transaction/Builder.hs view
@@ -61,7 +61,7 @@ import Data.Bytes.Serial import Data.Conduit (ConduitT, Void, await, runConduit, (.|)) import Data.Conduit.List (sourceList)-import Data.Either (fromRight)+import Data.Either (fromRight, rights) import Data.List (nub) import Data.Maybe (catMaybes, fromJust, isJust) import Data.String.Conversions (cs)@@ -509,9 +509,11 @@ | isSegwit so0 = fromRight False $ (inp == mempty &&) . verifySegwitInput so0 <$> wp so0 | otherwise =- fromRight False $- (verifyLegacyInput so0 <$> unmarshal (net, ctx) inp)- <|> (nestedScriptOutput >>= \so -> verifyNestedInput so0 so <$> wp so)+ or $+ rights+ [ verifyLegacyInput so0 <$> unmarshal (net, ctx) inp,+ nestedScriptOutput >>= \so -> verifyNestedInput so0 so <$> wp so+ ] where inp = (tx.inputs !! i).script theTxSigHash so = Sign.makeSigHash net ctx tx i so val
src/Haskoin/Transaction/Partial.hs view
@@ -55,8 +55,7 @@ import Control.Applicative ((<|>)) import Control.DeepSeq (NFData)-import Control.Monad (foldM, guard, replicateM, void)-import Control.Monad.Cont (unless)+import Control.Monad (foldM, guard, replicateM, unless, void) import Crypto.Secp256k1 import Data.Binary (Binary (..)) import Data.ByteString (ByteString)
src/Haskoin/Util/Helpers.hs view
@@ -119,8 +119,8 @@ f x = Just (fromInteger x :: Word8, x `shiftR` 8) hexEncoding :: LB.ByteString -> Encoding-hexEncoding b = - unsafeToEncoding $ +hexEncoding b =+ unsafeToEncoding $ char7 '"' <> hexBuilder b <> char7 '"' hexBuilder :: LB.ByteString -> Builder
src/Haskoin/Util/Marshal.hs view
test/Haskoin/BlockSpec.hs view
@@ -7,6 +7,7 @@ ) where +import Control.Monad import Control.Monad.State.Strict import Data.Either (fromRight) import Data.Maybe (fromJust)