Skip to content

Commit 66750f8

Browse files
committed
support newer secp256k1
1 parent 8d72647 commit 66750f8

File tree

2 files changed

+47
-36
lines changed

2 files changed

+47
-36
lines changed
Lines changed: 43 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,63 @@
1-
cabal-version: 2.4
2-
name: bitcoin-keys
3-
version: 0.1
4-
license: Apache-2.0
5-
license-file: LICENSE
6-
extra-source-files: README.md CHANGELOG.md
7-
author: Renzo Carbonara
8-
maintainer: renλren.zone
9-
copyright: Copyright (c) Renzo Carbonara 2020
10-
category: Cryptography
11-
build-type: Simple
12-
synopsis: Bitcoin keys
1+
cabal-version: 2.4
2+
name: bitcoin-keys
3+
version: 0.1
4+
license: Apache-2.0
5+
license-file: LICENSE
6+
extra-source-files:
7+
CHANGELOG.md
8+
README.md
9+
10+
author: Renzo Carbonara
11+
maintainer: renλren.zone
12+
copyright: Copyright (c) Renzo Carbonara 2020
13+
category: Cryptography
14+
build-type: Simple
15+
synopsis: Bitcoin keys
1316
description:
1417
Bitcoin keys.
1518
.
1619
This library builds in GHC and GHCJS.
17-
homepage: https://gitlab.com/k0001/hs-bitcoin-keys
18-
bug-reports: https://gitlab.com/k0001/hs-bitcoin-keys/issues
19-
tested-with: GHC == 8.8.3, GHC == 8.6.5, GHCJS == 8.6.0
20+
21+
homepage: https://gitlab.com/k0001/hs-bitcoin-keys
22+
bug-reports: https://gitlab.com/k0001/hs-bitcoin-keys/issues
23+
tested-with:
24+
GHC ==8.6.5 || ==8.8.3
25+
, GHCJS ==8.6.0
2026

2127
common basic
2228
default-language: Haskell2010
23-
ghc-options: -O2 -Wall -Werror=incomplete-patterns
24-
ghcjs-options: -O3 -Wall -Werror=incomplete-patterns
25-
build-depends: base == 4.*, bytestring
29+
ghc-options: -O2 -Wall -Werror=incomplete-patterns
30+
ghcjs-options: -O3 -Wall -Werror=incomplete-patterns
31+
build-depends:
32+
, base >=4 && <5
33+
, bytestring
2634

2735
library
28-
import: basic
29-
hs-source-dirs: lib
36+
import: basic
37+
hs-source-dirs: lib
3038
exposed-modules: Bitcoin.Keys
31-
If impl(ghcjs)
39+
40+
if impl(ghcjs)
3241
other-modules: Bitcoin.Keys.GHCJS
3342
build-depends: ghcjs-base
43+
3444
-- This is file is generated. See README.md.
35-
js-sources: js/index.compiled.js
45+
js-sources: js/index.compiled.js
46+
3647
else
3748
other-modules: Bitcoin.Keys.GHC
3849
build-depends: secp256k1-haskell
3950

4051
test-suite test
41-
import: basic
42-
type: exitcode-stdio-1.0
52+
import: basic
53+
type: exitcode-stdio-1.0
4354
hs-source-dirs: test
44-
main-is: Main.hs
55+
main-is: Main.hs
4556
build-depends:
46-
base16-bytestring,
47-
hedgehog,
48-
bitcoin-keys,
49-
tasty,
50-
tasty-hedgehog,
51-
tasty-hunit,
57+
, base16-bytestring
58+
, bitcoin-keys
59+
, hedgehog
60+
, tasty
61+
, tasty-hedgehog
62+
, tasty-hunit
63+
, with-utf8

pub/hs-bitcoin-keys/bitcoin-keys/test/Main.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import Data.Word
1515
import Hedgehog (MonadGen, forAll, property, (===))
1616
import qualified Hedgehog.Gen as Gen
1717
import qualified Hedgehog.Range as Range
18+
import Main.Utf8 (withUtf8)
1819
import qualified System.IO as IO
1920
import Test.Tasty (TestTree, testGroup)
2021
import qualified Test.Tasty as Tasty
@@ -25,7 +26,7 @@ import qualified Test.Tasty.Runners as Tasty
2526
--------------------------------------------------------------------------------
2627

2728
main :: IO ()
28-
main = do
29+
main = withUtf8 $ do
2930
IO.hSetBuffering IO.stdout IO.LineBuffering
3031
IO.hSetBuffering IO.stderr IO.LineBuffering
3132
Tasty.defaultMainWithIngredients
@@ -197,8 +198,7 @@ pub1u = maybe (error "pub1u") id (S.parsePub pub1u_raw)
197198
pub1u_raw :: B.ByteString
198199
pub1u_raw =
199200
fromBase16
200-
"044ed59d3f6548c41172ec26b9144f547185cb2a9f28fccb6e3ae53dc4f1827154\
201-
\ba3a12d8b383bfff1dacd6930285f4a51a01ee64e102652d5bc137c49b97815e"
201+
"044ed59d3f6548c41172ec26b9144f547185cb2a9f28fccb6e3ae53dc4f1827154ba3a12d8b383bfff1dacd6930285f4a51a01ee64e102652d5bc137c49b97815e"
202202

203203
--------------------------------------------------------------------------------
204204
-- BIP39 mnemonic: abandon abandon arm
@@ -233,8 +233,7 @@ pub2u = maybe (error "pub2u") id (S.parsePub pub2u_raw)
233233
pub2u_raw :: B.ByteString
234234
pub2u_raw =
235235
fromBase16
236-
"0415bd146d8b45383ad431a8204717dc9f46a7a46c1f44eeaab02d49f4511ccff0\
237-
\7d7817de34c0a281b45691eec966e95d936554b2320462214cd2a17aebcf460f"
236+
"0415bd146d8b45383ad431a8204717dc9f46a7a46c1f44eeaab02d49f4511ccff07d7817de34c0a281b45691eec966e95d936554b2320462214cd2a17aebcf460f"
238237

239238
--------------------------------------------------------------------------------
240239
-- Randomly generated

0 commit comments

Comments
 (0)