commit e79822f786be1d6ac32e4eac2c98aa881f935685
parent efed72b8c6845578641b82667607da7c8b3c2558
Author: Jared Tobin <jared@jtobin.io>
Date: Sat, 10 Oct 2026 19:02:19 +0400
docs: readme and changelog for the API changes
Diffstat:
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
@@ -1,6 +1,14 @@
# Changelog
- 0.2.0 (UNRELEASED)
+ * Breaking: TxId is abstract. Construct one with mk_txid (replacing
+ mkTxId), unwrap it with un_txid; null_txid is the all-zero txid
+ coinbase inputs reference.
+ * Breaking: each TxIn carries its own witness (txin_witness), and
+ Tx's tx_witnesses field is gone, so a transaction can no longer
+ hold a different number of witnesses than inputs.
+ * Breaking: the serialisation builders (put_compact, put_outpoint,
+ to_strict, etc.) are no longer exported.
* Widens sighash_legacy and sighash_segwit to take a raw 32-bit
hashType, matching consensus (the full value is committed to the
preimage; only the low byte determines behaviour). The SighashType
diff --git a/README.md b/README.md
@@ -38,8 +38,7 @@ A sample GHCi session:
> let Just tx = from_base16 raw
>
> -- txids are displayed byte-reversed
- > let TxId tid = txid tx
- > B16.encode (BS.reverse tid)
+ > B16.encode (BS.reverse (un_txid (txid tx)))
"f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16"
>
> from_bytes (to_bytes tx) == Just tx