Commit Graph

62 Commits

Author SHA1 Message Date
JP Rupp
1f67df15aa
Move to crypton for now 2024-07-23 22:13:16 +01:00
Philippe Laprade
88ff19c35a Export the BIP39 word list and add new BIP39 test vectors 2023-10-11 11:10:51 +02:00
Philippe Laprade
520b0b241f
Utilities for testing Marshal and MarshalJSON classes (#415)
* Adding tools for performing Marshal and MarshalJSON identity tests

* New dependency on data-default

* Renamed some arbitrary (test) functions for clarity
2023-09-02 08:56:02 +02:00
JP Rupp
296a8dcc30
Add compatibility with latest nightly LTS Haskell 2023-08-03 20:20:28 +01:00
JP Rupp
8fb472f60d
Backwards-incompatible modernisation of package
- Shorten all field names ignoring duplicates using DuplicateRecordFields extension.
- Use OverloadedRecordDot language extension and syntax.
- Use explicit context object from secp256k1-haskell library.
- Unify serialization into custom Marhsal and MarshalJSON classes.
- Use bytestring builders for all JSON toEncoding implementations.
- Use ormolu for formatting.
- Simplify module organisation.
- Strongly break backwards compatibility.
2023-07-28 19:48:43 +01:00
Ian Shipman
ffb7b44f98
Adds taproot support (no signing) (#404)
* Express taproot output structure
* Derive external key
* Parse taproot witness data
2021-11-23 12:13:39 +00:00
JP Rupp
d155f8803c
Testnet4 & format (#406)
* Support Bitcoin Cash Testnet4

* Changge pre-commit.sh to format
2021-11-23 12:09:45 +00:00
Ian Shipman
d49455a277
Formatting and linting (#403)
* Updates readme and adds pre-commit hook

* Reformats codebase

* Applies some hlint suggestions

Certain suggestions led to worse code IMO, so I skipped them
2021-11-03 20:05:01 +00:00
Ian Shipman
d1483b1423 Adds PSBT signing capability 2021-10-26 12:08:02 -05:00
Ian Shipman
fd19adf5e6 PSBT fixes
- Makes serialization agree with bitcoin core
- Fixes bugs in `finalizeTransaction`
- Handle P2SH outputs correctly
- Adds a complex test vector covering more of the PSBT spec
2021-10-20 14:42:29 -05:00
Ian Shipman
1d9454b4fb Use a newtype for Fingerprint
This also changes the read/show instances to use hex strings and adds an
IsString instance.
2021-10-18 18:18:09 -05:00
Ian Shipman
8dd1a74215 Harmonize byte order
This makes the serialization of fingerprints and key indices for PSBTs
match the serialization used in the extended key module
2021-10-03 17:35:40 -05:00
JP Rupp
408720db04
Support Bech32m address format for Taproot 2021-09-13 20:42:03 +01:00
JP Rupp
1196c5a3ef
Use the bytes library for serialization 2021-02-22 11:31:21 +00:00
JP Rupp
e3d4385046
ASERT (#394)
Support Bitcoin Cash November 2020 hard fork.
2020-10-21 12:01:48 +01:00
Philippe Laprade
6c3fdcf771
Add missing BIP32 test vectors (#389)
* Add missing BIP32 test vectors

* Add hash test vectors

* Rename stringToAddr to textToAddr

* Add Base58 tests

* Add signature tests

* Add rfc6979 test vectors for bitcoinabc secp256k1 implementation

* Add deterministic signing test in CryptoSpec.hs

* Move ScriptOutput to Standard.hs, fix import loops and add new tests in KeysSpec.hs

* Add additional tests in KeysSpec.hs

* Test the key_io_invalid.json vectors

* Fix the BIP143 tests

* Update the CHANGELOG
2020-06-19 18:50:24 +01:00
Philippe Laprade
c28f14aca5
Add helpers for writing serialize and json identity tests (#388) 2020-06-14 11:18:56 +01:00
Philippe Laprade
3c23627ff4
Expose the Arbitrary test instances under Haskoin.Util.Arbitrary (#387)
* Expose the Arbitrary test instances under Haskoin.Util.Arbitrary

* Adding missing Arbitrary instances for Addresses
2020-06-05 17:38:46 +01:00
Philippe Laprade
0f95b52551
Add better JSON instances and cleanup some code (#384)
* Add better JSON instances and cleanup some code

* Add a changelog entry for 0.13.5

* Give me my fast JSON back

Co-authored-by: Jean-Pierre Rupp <jprupp@protonmail.ch>
2020-05-16 14:53:43 +01:00
Jean-Pierre Rupp
235038ae40 Support for Bitcoin Cash May 2020 hard fork 2020-05-14 19:35:04 +01:00
Jean-Pierre Rupp
ab20881ffe Expose top modules and move to Haskoin namespace 2020-05-08 09:26:26 +01:00
Jean-Pierre Rupp
e98d409e01 Deprecate Network.Haskoin namespace
Also:
* Hide QuickCheck generators
2020-05-06 11:33:02 +01:00
Jean-Pierre Rupp
39c0e927ee Use new version of secp256k1-haskell
The new library adds compatibility with the version of libsecp256k1 provided by
Fedora. The Fedora package is a fork of that library from the Bitcoin ABC
project. It computes signature nonces slightly differently, so all tests that
depend on signatures being exactly the same for a combination of message and
private key have been removed.
2020-04-10 21:27:19 +01:00
Ian Shipman
bf7354793e
Add support for spending SegWit transactions (#383) 2020-02-21 11:52:58 +00:00
Jean-Pierre Rupp
705990c04c Add NFData and remove Monad fail where needed 2020-01-15 21:27:27 +00:00
Jean-Pierre Rupp
d4b215acab Add JSON encoding/decoding for blocks 2019-12-04 12:05:17 +00:00
Jean-Pierre Rupp
005a25b040 Correct lowercase HRP test case 2019-12-04 12:04:50 +00:00
Pavel Kiselyov
b776b05d68 lowercase input before bech32 encoding (#378)
* lowercase input before bech32 encoding

* use flip

* use dot notation

* rollback spacing

* use right-assoc apply

* use monadic permutations
2019-10-29 09:15:18 +00:00
Ilyas Ridhuan
3cfd5fc124 Added bloomRelevantUpdate implementation for bloom filter (#376)
Thank you very much for your contribution, and I appologize for letting it stay open so long.
2019-10-29 09:14:15 +00:00
Jean-Pierre Rupp
c22b325372 Add more functions for P2SH/P2WPKH support 2019-10-23 13:03:43 +01:00
Jean-Pierre Rupp
11e8687a01 Add support for P2WPKH-on-P2SH addresses 2019-10-22 17:19:29 +01:00
Jean-Pierre Rupp
662b4aa1e0 Support messages with unknown commands 2019-10-09 16:19:23 +01:00
Jean-Pierre Rupp
a1c2ca9c55 Address conversion to string now defined for all inputs 2019-04-12 14:25:48 +01:00
Jean-Pierre Rupp
d14b988dcf Block subsidy computation 2018-12-05 16:44:05 +00:00
Matthew Wraith
46ae4630b0 Adding completion for PSBTs (#367)
* Adding completion for PSBTs

* Always take m on collectSigs
2018-11-16 13:02:37 +00:00
Matthew Wraith
ef3b71d780 PSBT data types and serialization (#364)
Implement [BIP-174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki) support.
2018-11-06 18:08:15 +00:00
Jean-Pierre Rupp
efb107facc Remove network from address 2018-10-13 17:45:51 +01:00
Jean-Pierre Rupp
f9bdcd2181 Compatibility with base 4.12 2018-10-09 19:32:47 +01:00
Jean-Pierre Rupp
d7b0d60343 Use unwrapped secret keys for signing 2018-10-08 17:13:17 +01:00
Jean-Pierre Rupp
5cea2fe6b4 Simplify address management 2018-09-19 19:54:02 +01:00
Matthew Wraith
e3033ffb31 Removing redundant cs calls 2018-09-06 18:19:32 -05:00
Matthew Wraith
0278a74da0 Converting human-readable strings to Text instead of ByteString 2018-09-06 17:27:12 -05:00
Jaume Pernas
4e12a2f62a Bech32 tests (#359) 2018-09-06 15:58:50 +01:00
Jean-Pierre Rupp
2494b9535e Corrected vectors that are wrong in spec 2018-09-04 10:23:45 +01:00
Jean-Pierre Rupp
e748932e50 Allow longer cashaddr strings
* Test suite mostly passing
* Apparently incorrect test vectors from upstream
2018-09-03 21:08:17 +01:00
Jean-Pierre Rupp
8062ed25e4 Add low-level decoding to test vectors 2018-09-03 20:19:00 +01:00
Jean-Pierre Rupp
6effef58aa CashAddr tests typecheck 2018-09-03 19:53:03 +01:00
Pernas
11410dde96 cashAddr test vectors 2018-09-03 19:36:57 +01:00
Jean-Pierre Rupp
ef5f4693e6 More documentation and better show/read 2018-09-02 22:18:54 +01:00
Jean-Pierre Rupp
135b25f4c0 Refactoring and documentation overhaul 2018-09-01 17:55:32 +01:00