commit e3581872831ed463d3d9ab4432b991a89bcdd2f1
parent 155e2b2e2833afc9892ebe72d66812d6b0b0cafd
Author: Jared Tobin <jared@jtobin.io>
Date: Sat, 18 Jan 2025 08:48:03 +0400
lib: script only
Diffstat:
4 files changed, 62 insertions(+), 67 deletions(-)
diff --git a/flake.nix b/flake.nix
@@ -42,7 +42,7 @@
, ppad-secp256k1 }:
flake-utils.lib.eachDefaultSystem (system:
let
- lib = "ppad-btcprim";
+ lib = "ppad-script";
pkgs = import nixpkgs { inherit system; };
hlib = pkgs.haskell.lib;
diff --git a/ppad-btcprim.cabal b/ppad-btcprim.cabal
@@ -1,60 +0,0 @@
-cabal-version: 3.0
-name: ppad-btcprim
-version: 0.1.0
-synopsis: Bitcoin primitives.
-license: MIT
-license-file: LICENSE
-author: Jared Tobin
-maintainer: jared@ppad.tech
-category: Cryptography
-build-type: Simple
-tested-with: GHC == { 9.8.1 }
-extra-doc-files: CHANGELOG
-description:
- Bitcoin primitives.
-
-source-repository head
- type: git
- location: git.ppad.tech/btcprim.git
-
-library
- default-language: Haskell2010
- hs-source-dirs: lib
- ghc-options:
- -Wall
- exposed-modules:
- Bitcoin.Prim.Script
- build-depends:
- base >= 4.9 && < 5
- , bytestring >= 0.9 && < 0.13
- , ppad-base16 >= 0.1 && < 0.2
- , ppad-base58 >= 0.1 && < 0.2
- , ppad-bech32 >= 0.2 && < 0.3
- , ppad-ripemd160 >= 0.1 && < 0.2
- , ppad-secp256k1 >= 0.2.1 && < 0.3
- , ppad-sha256 >= 0.2 && < 0.3
- , primitive >= 0.8 && < 0.10
-
-test-suite btcprim-tests
- type: exitcode-stdio-1.0
- default-language: Haskell2010
- hs-source-dirs: test
- main-is: Main.hs
-
- ghc-options:
- -rtsopts -Wall
-
- build-depends:
- , base
- , bytestring
- , ppad-base16
- , ppad-base58
- , ppad-btcprim
- , ppad-ripemd160
- , ppad-secp256k1
- , ppad-sha256
- , primitive
- , tasty
- , tasty-hunit
- , tasty-quickcheck
-
diff --git a/ppad-script.cabal b/ppad-script.cabal
@@ -0,0 +1,60 @@
+cabal-version: 3.0
+name: ppad-script
+version: 0.1.0
+synopsis: Utilities for working with Script.
+license: MIT
+license-file: LICENSE
+author: Jared Tobin
+maintainer: jared@ppad.tech
+category: Cryptography
+build-type: Simple
+tested-with: GHC == { 9.8.1 }
+extra-doc-files: CHANGELOG
+description:
+ Utilities for working with Script.
+
+source-repository head
+ type: git
+ location: git.ppad.tech/script.git
+
+library
+ default-language: Haskell2010
+ hs-source-dirs: lib
+ ghc-options:
+ -Wall
+ exposed-modules:
+ Bitcoin.Prim.Script
+ build-depends:
+ base >= 4.9 && < 5
+ , bytestring >= 0.9 && < 0.13
+ , ppad-base16 >= 0.1 && < 0.2
+ , ppad-base58 >= 0.1 && < 0.2
+ , ppad-bech32 >= 0.2 && < 0.3
+ , ppad-ripemd160 >= 0.1 && < 0.2
+ , ppad-secp256k1 >= 0.2.1 && < 0.3
+ , ppad-sha256 >= 0.2 && < 0.3
+ , primitive >= 0.8 && < 0.10
+
+test-suite script-tests
+ type: exitcode-stdio-1.0
+ default-language: Haskell2010
+ hs-source-dirs: test
+ main-is: Main.hs
+
+ ghc-options:
+ -rtsopts -Wall
+
+ build-depends:
+ , base
+ , bytestring
+ , ppad-base16
+ , ppad-base58
+ , ppad-script
+ , ppad-ripemd160
+ , ppad-secp256k1
+ , ppad-sha256
+ , primitive
+ , tasty
+ , tasty-hunit
+ , tasty-quickcheck
+
diff --git a/test/Main.hs b/test/Main.hs
@@ -66,17 +66,12 @@ main = defaultMain $
testGroup "property tests" [
Q.testProperty "from_base16 . to_base16 ~ id" $
Q.withMaxSuccess 100 from_base16_inverts_to_base16
+ -- XX slow
-- , Q.testProperty "to_script . from_script ~ id" $
-- Q.withMaxSuccess 100 to_script_inverts_from_script
]
]
-
-
-
-
-
-
-- p2pkh
-- https://en.bitcoin.it/wiki/Script#