packages feed

haskoin-core 0.18.0 → 0.19.0

raw patch · 5 files changed

+21/−7 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Haskoin.Keys.Extended: instance Data.Hashable.Class.Hashable Haskoin.Keys.Extended.XPrvKey
+ Haskoin.Keys.Extended: instance Data.Hashable.Class.Hashable Haskoin.Keys.Extended.XPubKey
- Haskoin.Keys.Mnemonic: type Passphrase = ByteString
+ Haskoin.Keys.Mnemonic: type Passphrase = Text

Files

CHANGELOG.md view
@@ -4,6 +4,16 @@ 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.19.0+### Added+- Hashable instances for extended keys.++### Changed+- Mnemonic passphrases now `Text` instead of `ByteString`.++### Fixed+- Tests now pass for witness addresses.+ ## 0.18.0 ### Added - Support SegWit addresses with version other than 0.
haskoin-core.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 9861fe70166471990a6ee8fcf42174a9d40cda5b4e28119073d56a221e78fee3+-- hash: 90de304467308666144472c303ad361258687f7e36e27e916ba836799ea6833c  name:           haskoin-core-version:        0.18.0+version:        0.19.0 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/Keys/Extended.hs view
@@ -115,6 +115,7 @@ import           Data.ByteString         (ByteString) import qualified Data.ByteString         as B import           Data.Either             (fromRight)+import           Data.Hashable import           Data.List               (foldl') import           Data.List.Split         (splitOn) import           Data.Maybe              (fromMaybe)@@ -162,7 +163,7 @@     , xPrvIndex  :: !KeyIndex    -- ^ derivation index     , xPrvChain  :: !ChainCode   -- ^ chain code     , xPrvKey    :: !SecKey      -- ^ private key of this node-    } deriving (Generic, Eq, Show, Read, NFData)+    } deriving (Generic, Eq, Show, Read, NFData, Hashable)  instance Serialize XPrvKey where     put k = do@@ -199,7 +200,7 @@     , xPubIndex  :: !KeyIndex  -- ^ derivation index     , xPubChain  :: !ChainCode -- ^ chain code     , xPubKey    :: !PubKey    -- ^ public key of this node-    } deriving (Generic, Eq, Show, Read, NFData)+    } deriving (Generic, Eq, Show, Read, NFData, Hashable)  instance Serialize XPubKey where     put k = do
src/Haskoin/Keys/Mnemonic.hs view
@@ -46,7 +46,7 @@ type Mnemonic = Text  -- | Optional passphrase for mnemnoic sentence.-type Passphrase = ByteString+type Passphrase = Text  -- | Seed for a private key from a mnemonic sentence. type Seed = ByteString@@ -116,7 +116,10 @@ -- perform NFKD normalization. anyToSeed :: Passphrase -> Mnemonic -> Seed anyToSeed pf ms =-    fastPBKDF2_SHA512 pbkdfParams (E.encodeUtf8 ms) ("mnemonic" `mappend` pf)+    fastPBKDF2_SHA512+    pbkdfParams+    (E.encodeUtf8 ms)+    ("mnemonic" `mappend` E.encodeUtf8 pf)  -- | Get a 512-bit 'Seed' from a 'Mnemonic' sentence. Will validate checksum. -- 'Passphrase' can be used to protect the 'Mnemonic'. Use an empty string as
src/Haskoin/Util/Arbitrary/Address.hs view
@@ -56,7 +56,7 @@  arbitraryWitnessAddress :: Gen Address arbitraryWitnessAddress = do-    ver <- choose (0, 16)+    ver <- choose (1, 16)     len <- choose (2, 40)     ws <- vectorOf len arbitrary     let bs = B.pack ws