haskoin-core 0.20.3 → 0.20.4
raw patch · 6 files changed
+12/−6 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Haskoin.Address: isWitnessAddress :: Address -> Bool
+ Haskoin.Script.Standard: isPayWitness :: ScriptOutput -> Bool
Files
- CHANGELOG.md +4/−0
- haskoin-core.cabal +2/−2
- src/Haskoin/Address.hs +1/−0
- src/Haskoin/Keys/Common.hs +1/−2
- src/Haskoin/Network/Common.hs +1/−1
- src/Haskoin/Script/Standard.hs +3/−1
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.20.4+### Fixed+- Add missing case for witness version.+ ## 0.20.3 ### Fixed - Allow unknown inv types.
haskoin-core.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 51a1645e2f8c2dc54a6cc91c03a262683a314702f2ffbc182667967b50e88f6f+-- hash: d57876572e143601ab9185c42f47f703460c4e8396b846f805068a5cff8fec3e name: haskoin-core-version: 0.20.3+version: 0.20.4 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/Address.hs view
@@ -19,6 +19,7 @@ Address(..) , isPubKeyAddress , isScriptAddress+ , isWitnessAddress , isWitnessPubKeyAddress , isWitnessScriptAddress , addrToText
src/Haskoin/Keys/Common.hs view
@@ -34,7 +34,6 @@ , toWif ) where -import Control.Applicative ((<|>)) import Control.DeepSeq import Control.Monad (guard, mzero, (<=<)) import Crypto.Secp256k1@@ -80,7 +79,7 @@ instance FromJSON PubKeyI where parseJSON = withText "PubKeyI" $- maybe mzero return . (eitherToMaybe . runGetS deserialize =<<) . decodeHex+ maybe mzero return . ((eitherToMaybe . runGetS deserialize) <=< decodeHex) instance Serial PubKeyI where deserialize = s >>= \case
src/Haskoin/Network/Common.hs view
@@ -493,7 +493,7 @@ go 0xff = getWord64le go 0xfe = fromIntegral <$> getWord32le go 0xfd = fromIntegral <$> getWord16le- go x = fromIntegral <$> return x+ go x = return $ fromIntegral x serialize (VarInt x) | x < 0xfd =
src/Haskoin/Script/Standard.hs view
@@ -20,6 +20,7 @@ , isPayPKHash , isPayMulSig , isPayScriptHash+ , isPayWitness , isPayWitnessPKHash , isPayWitnessScriptHash , isDataCarrier@@ -56,7 +57,7 @@ import Data.Function (on) import Data.Hashable import Data.List (sortBy)-import Data.Maybe (fromJust, isJust, isNothing)+import Data.Maybe (fromJust, isJust) import Data.Word (Word8) import GHC.Generics (Generic) import Haskoin.Constants@@ -189,6 +190,7 @@ witnessVersionOp 14 = Just OP_14 witnessVersionOp 15 = Just OP_15 witnessVersionOp 16 = Just OP_16+witnessVersionOp _ = Nothing opWitnessVersion :: ScriptOp -> Maybe Word8 opWitnessVersion OP_0 = Just 0