<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>bolt3, branch HEAD</title>
<subtitle>Lightning transaction and script formats, per BOLT #3 (docs.ppad.tech/bolt3).
</subtitle>
<entry>
<id>7be7bbb7e4903df525c62baa2bc5ece23701f337</id>
<published>2026-04-18T13:46:22Z</published>
<updated>2026-04-18T13:46:22Z</updated>
<title type="text">replace vestigial tx encoding/decoding with ppad-tx</title>
<link rel="alternate" type="text/html" href="commit/7be7bbb7e4903df525c62baa2bc5ece23701f337.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 7be7bbb7e4903df525c62baa2bc5ece23701f337
parent 23c984f83e3c629f3b8a7c1b123a7b298c394352
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sat, 18 Apr 2026 21:46:22 +0800

replace vestigial tx encoding/decoding with ppad-tx

Add commitment_to_tx, htlc_to_tx, closing_to_tx conversion
functions in Tx.hs that convert bolt3 domain types to ppad-tx&#39;s
generic Tx type.

Replace Encode.hs: encode_tx, encode_htlc_tx, encode_closing_tx,
and encode_tx_for_signing now delegate to ppad-tx&#39;s to_bytes and
to_bytes_legacy via the conversion functions. encode_witness is
reimplemented locally. All primitive encoders removed.

Replace Decode.hs: decode_tx is now a thin wrapper around
ppad-tx&#39;s from_bytes. RawTx, RawInput, RawOutput, DecodeError
types and all primitive decoders removed.

Update BOLT3.hs: remove vestigial encode/decode primitive exports,
add conversion functions and re-export ppad-tx&#39;s Tx, TxIn, TxOut,
and from_bytes.

Update benchmarks: remove NFData instances for deleted types,
adapt encode/decode benchmarks for new Maybe return types.

Net effect: -506 lines, eliminating all duplicated tx
serialisation code.

</content>
</entry>
<entry>
<id>23c984f83e3c629f3b8a7c1b123a7b298c394352</id>
<published>2026-04-18T12:39:03Z</published>
<updated>2026-04-18T12:39:03Z</updated>
<title type="text">bench: remove orphan NFData instances for ppad-tx types</title>
<link rel="alternate" type="text/html" href="commit/23c984f83e3c629f3b8a7c1b123a7b298c394352.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 23c984f83e3c629f3b8a7c1b123a7b298c394352
parent 64618b41596bf4ceeb4459ed9c13694677dd097b
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sat, 18 Apr 2026 20:39:03 +0800

bench: remove orphan NFData instances for ppad-tx types

NFData instances for TxId, OutPoint, and Witness are now provided
by ppad-tx itself. Remove orphans from bench suites.

</content>
</entry>
<entry>
<id>64618b41596bf4ceeb4459ed9c13694677dd097b</id>
<published>2026-04-18T12:19:22Z</published>
<updated>2026-04-18T12:19:22Z</updated>
<title type="text">test/bench: update for ppad-tx types</title>
<link rel="alternate" type="text/html" href="commit/64618b41596bf4ceeb4459ed9c13694677dd097b.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 64618b41596bf4ceeb4459ed9c13694677dd097b
parent 7686c616c81bcb0a8747ce4c49c3d00e478a51e6
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sat, 18 Apr 2026 20:19:22 +0800

test/bench: update for ppad-tx types

- txid -&gt; mkTxId in smart constructor tests
- Outpoint -&gt; OutPoint in NFData instances and fixtures

</content>
</entry>
<entry>
<id>7686c616c81bcb0a8747ce4c49c3d00e478a51e6</id>
<published>2026-04-18T12:17:56Z</published>
<updated>2026-04-18T12:17:56Z</updated>
<title type="text">lib: use ppad-tx types for TxId, OutPoint, Witness</title>
<link rel="alternate" type="text/html" href="commit/7686c616c81bcb0a8747ce4c49c3d00e478a51e6.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 7686c616c81bcb0a8747ce4c49c3d00e478a51e6
parent 4bbc2f83e4556a9583bccdd90147daabd14fdd56
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sat, 18 Apr 2026 20:17:56 +0800

lib: use ppad-tx types for TxId, OutPoint, Witness

Replace bolt3-local TxId, Outpoint, and Witness definitions
with re-exports from Bitcoin.Prim.Tx (ppad-tx). Update all
internal modules for renamed types and field accessors:

- Outpoint -&gt; OutPoint
- outpoint_txid -&gt; op_txid
- outpoint_index -&gt; op_vout
- txid (smart ctor) -&gt; mkTxId
- unTxId field access -&gt; TxId pattern match
- Witness no longer has unWitness accessor (unused)

</content>
</entry>
<entry>
<id>4bbc2f83e4556a9583bccdd90147daabd14fdd56</id>
<published>2026-04-18T12:15:03Z</published>
<updated>2026-04-18T12:15:03Z</updated>
<title type="text">lib: add ppad-tx dependency</title>
<link rel="alternate" type="text/html" href="commit/4bbc2f83e4556a9583bccdd90147daabd14fdd56.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 4bbc2f83e4556a9583bccdd90147daabd14fdd56
parent 6a809e912618de1d108035819609f9dab9f7d8c2
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sat, 18 Apr 2026 20:15:03 +0800

lib: add ppad-tx dependency

Add ppad-tx as a library dependency for canonical Bitcoin
transaction primitives (TxId, OutPoint, Witness).

</content>
</entry>
<entry>
<id>6a809e912618de1d108035819609f9dab9f7d8c2</id>
<published>2026-04-18T05:46:46Z</published>
<updated>2026-04-18T05:50:59Z</updated>
<title type="text">flake: fix missing llvm derivations</title>
<link rel="alternate" type="text/html" href="commit/6a809e912618de1d108035819609f9dab9f7d8c2.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 6a809e912618de1d108035819609f9dab9f7d8c2
parent 587c49fe3c066ea743a0727f0b8adacfd5966373
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sat, 18 Apr 2026 13:46:46 +0800

flake: fix missing llvm derivations

</content>
</entry>
<entry>
<id>587c49fe3c066ea743a0727f0b8adacfd5966373</id>
<published>2026-04-18T05:16:59Z</published>
<updated>2026-04-18T05:16:59Z</updated>
<title type="text">meta: dep bounds</title>
<link rel="alternate" type="text/html" href="commit/587c49fe3c066ea743a0727f0b8adacfd5966373.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 587c49fe3c066ea743a0727f0b8adacfd5966373
parent a0d457077f6b34c98b1528b42212c25fb5441614
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sat, 18 Apr 2026 13:16:59 +0800

meta: dep bounds

</content>
</entry>
<entry>
<id>a0d457077f6b34c98b1528b42212c25fb5441614</id>
<published>2026-04-18T05:16:54Z</published>
<updated>2026-04-18T05:16:54Z</updated>
<title type="text">readme: pre-release note</title>
<link rel="alternate" type="text/html" href="commit/a0d457077f6b34c98b1528b42212c25fb5441614.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit a0d457077f6b34c98b1528b42212c25fb5441614
parent a7fa735c2bb36f8470cf9c9807a4120cbe6559e7
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sat, 18 Apr 2026 13:16:54 +0800

readme: pre-release note

</content>
</entry>
<entry>
<id>a7fa735c2bb36f8470cf9c9807a4120cbe6559e7</id>
<published>2026-01-25T11:22:01Z</published>
<updated>2026-01-25T11:22:01Z</updated>
<title type="text">meta: docs</title>
<link rel="alternate" type="text/html" href="commit/a7fa735c2bb36f8470cf9c9807a4120cbe6559e7.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit a7fa735c2bb36f8470cf9c9807a4120cbe6559e7
parent 6a500da1a175b9521aab55f55f27a6b7d52247d2
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 15:22:01 +0400

meta: docs

</content>
</entry>
<entry>
<id>6a500da1a175b9521aab55f55f27a6b7d52247d2</id>
<published>2026-01-25T11:09:53Z</published>
<updated>2026-01-25T11:09:53Z</updated>
<title type="text">Expand weigh benchmark suite</title>
<link rel="alternate" type="text/html" href="commit/6a500da1a175b9521aab55f55f27a6b7d52247d2.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 6a500da1a175b9521aab55f55f27a6b7d52247d2
parent bd5a3bdc83e1f0c48a7ce471e79b6655ca9f0398
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 15:09:53 +0400

Expand weigh benchmark suite

Add comprehensive allocation benchmarks to bench/Weight.hs mirroring
the criterion suite:
- NFData instances for all benchmarked types
- Transaction building (commitment, HTLC timeout/success, closing)
- Script generation (funding, to_local, to_remote, anchor, HTLCs)
- Serialization (full tx encoding, components)
- Parsing (decode_tx, decode_varint, decode_le32/64)
- Validation (commitment, HTLC, closing transactions)
- Secret storage (insert_secret, derive_old_secret)
- Output sorting (sort_outputs)

</content>
</entry>
<entry>
<id>bd5a3bdc83e1f0c48a7ce471e79b6655ca9f0398</id>
<published>2026-01-25T11:09:44Z</published>
<updated>2026-01-25T11:09:44Z</updated>
<title type="text">Expand criterion benchmark suite</title>
<link rel="alternate" type="text/html" href="commit/bd5a3bdc83e1f0c48a7ce471e79b6655ca9f0398.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit bd5a3bdc83e1f0c48a7ce471e79b6655ca9f0398
parent 6da7d511bf5afe9241caa6d16a16595fe91348c6
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 15:09:44 +0400

Expand criterion benchmark suite

Add comprehensive benchmarks to bench/Main.hs covering:
- NFData instances for all benchmarked types
- Transaction building (commitment, HTLC timeout/success, closing)
- Script generation (funding, to_local, to_remote, anchor, HTLCs)
- Serialization (full tx encoding, components)
- Parsing (decode_tx, decode_varint, decode_le32/64)
- Validation (commitment, HTLC, closing transactions)
- Secret storage (insert_secret, derive_old_secret)
- Output sorting (sort_outputs)

</content>
</entry>
<entry>
<id>26b4cce6da935770559d2c1e0a2550ae71a7cada</id>
<published>2026-01-25T11:08:32Z</published>
<updated>2026-01-25T11:08:32Z</updated>
<title type="text">Expand weigh benchmark suite with comprehensive allocation tracking</title>
<link rel="alternate" type="text/html" href="commit/26b4cce6da935770559d2c1e0a2550ae71a7cada.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 26b4cce6da935770559d2c1e0a2550ae71a7cada
parent 6da7d511bf5afe9241caa6d16a16595fe91348c6
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 15:08:32 +0400

Expand weigh benchmark suite with comprehensive allocation tracking

Add NFData instances for all transaction, output, context, and error
types. Mirror the criterion benchmark structure with allocation
tracking for:

- Transaction building (commitment, HTLC timeout/success, closing)
- Script generation (funding, to_local, to_remote, anchor, HTLC)
- Transaction serialization (encode_tx variants)
- Transaction parsing (decode_tx with varying HTLC counts)
- Validation functions
- Secret storage operations (insert_secret, derive_old_secret)
- Output sorting

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>bf5cc1d31e201e76e10df06dba593ad458422782</id>
<published>2026-01-25T11:07:03Z</published>
<updated>2026-01-25T11:07:03Z</updated>
<title type="text">Expand criterion benchmark suite</title>
<link rel="alternate" type="text/html" href="commit/bf5cc1d31e201e76e10df06dba593ad458422782.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit bf5cc1d31e201e76e10df06dba593ad458422782
parent 6da7d511bf5afe9241caa6d16a16595fe91348c6
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 15:07:03 +0400

Expand criterion benchmark suite

Add comprehensive benchmarks for all major library operations:

- Transaction building (commitment, HTLC timeout/success, closing)
- Script generation (funding, to_local, to_remote, anchor, HTLC scripts)
- Serialization (encode_tx, encode_htlc_tx, encode_closing_tx)
- Parsing (decode_tx with varying HTLC counts)
- Validation (commitment, HTLC, closing transactions, output ordering)
- Secret storage (insert_secret, derive_old_secret)
- Output sorting (10 and 100 outputs)

Add NFData instances for all benchmarked types including transaction
types, output types, primitives, parsing types, context types, key
types, and error types.

Add shared test fixtures with sample pubkeys, HTLC lists (0/10/100),
context builders, and helper functions.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>6da7d511bf5afe9241caa6d16a16595fe91348c6</id>
<published>2026-01-25T10:37:46Z</published>
<updated>2026-01-25T10:37:46Z</updated>
<title type="text">meta: docs</title>
<link rel="alternate" type="text/html" href="commit/6da7d511bf5afe9241caa6d16a16595fe91348c6.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 6da7d511bf5afe9241caa6d16a16595fe91348c6
parent 31e492a1d5445339c632473f1900d178f50289c8
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 14:37:46 +0400

meta: docs

</content>
</entry>
<entry>
<id>31e492a1d5445339c632473f1900d178f50289c8</id>
<published>2026-01-25T10:32:25Z</published>
<updated>2026-01-25T10:32:25Z</updated>
<title type="text">Merge branch &#39;impl/smart-constructors-tests&#39;</title>
<link rel="alternate" type="text/html" href="commit/31e492a1d5445339c632473f1900d178f50289c8.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 31e492a1d5445339c632473f1900d178f50289c8
parent fbd0235f429441b6b848684f6acb18bf55b1d392
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 14:32:25 +0400

Merge branch &#39;impl/smart-constructors-tests&#39;

Add tests validating smart constructor size/range constraints.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>fbd0235f429441b6b848684f6acb18bf55b1d392</id>
<published>2026-01-25T10:31:55Z</published>
<updated>2026-01-25T10:31:55Z</updated>
<title type="text">Merge branch &#39;impl/smart-constructors-lib&#39;</title>
<link rel="alternate" type="text/html" href="commit/fbd0235f429441b6b848684f6acb18bf55b1d392.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit fbd0235f429441b6b848684f6acb18bf55b1d392
parent dc36e8e76d5105619810209c8be240dd7785dcf7
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 14:31:55 +0400

Merge branch &#39;impl/smart-constructors-lib&#39;

Add smart constructors for type-safe parsing of size-constrained types.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>1a5793f09bc3a8b8b6be698000c06c9d6bede896</id>
<published>2026-01-25T10:30:57Z</published>
<updated>2026-01-25T10:30:57Z</updated>
<title type="text">Add smart constructors for type-safe parsing</title>
<link rel="alternate" type="text/html" href="commit/1a5793f09bc3a8b8b6be698000c06c9d6bede896.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 1a5793f09bc3a8b8b6be698000c06c9d6bede896
parent a1622a23f4f04a9d02a68f879964efd49bed803b
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 14:30:57 +0400

Add smart constructors for type-safe parsing

- pubkey/point: validate 33-byte compressed EC points
- seckey/txid/payment_hash/payment_preimage: validate 32-byte values
- per_commitment_secret: validate 32-byte secrets
- commitment_number: validate 48-bit range

Raw constructors remain exported for internal use where size is
already guaranteed by construction.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>dc36e8e76d5105619810209c8be240dd7785dcf7</id>
<published>2026-01-25T10:30:28Z</published>
<updated>2026-01-25T10:30:28Z</updated>
<title type="text">Refactor HTLC transaction builders to share common code</title>
<link rel="alternate" type="text/html" href="commit/dc36e8e76d5105619810209c8be240dd7785dcf7.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit dc36e8e76d5105619810209c8be240dd7785dcf7
parent a1622a23f4f04a9d02a68f879964efd49bed803b
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 14:30:28 +0400

Refactor HTLC transaction builders to share common code

Factor out build_htlc_tx_common helper that handles the shared
transaction structure. build_htlc_timeout_tx and build_htlc_success_tx
now differ only in their locktime and fee parameters, making the
distinction between them explicit.

No public API changes.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>4541cd009735b77252c97a6e71079c4c4288997a</id>
<published>2026-01-25T10:29:27Z</published>
<updated>2026-01-25T10:29:27Z</updated>
<title type="text">Add tests for smart constructors</title>
<link rel="alternate" type="text/html" href="commit/4541cd009735b77252c97a6e71079c4c4288997a.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 4541cd009735b77252c97a6e71079c4c4288997a
parent a1622a23f4f04a9d02a68f879964efd49bed803b
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 14:29:27 +0400

Add tests for smart constructors

Validate size constraints for ByteString newtypes (33-byte and 32-byte)
and range constraint for 48-bit CommitmentNumber.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>a1622a23f4f04a9d02a68f879964efd49bed803b</id>
<published>2026-01-25T07:31:24Z</published>
<updated>2026-01-25T07:31:24Z</updated>
<title type="text">meta: readme</title>
<link rel="alternate" type="text/html" href="commit/a1622a23f4f04a9d02a68f879964efd49bed803b.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit a1622a23f4f04a9d02a68f879964efd49bed803b
parent e7543ba1ad63c0e56725ed1eedc97e133c359f2a
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 11:31:24 +0400

meta: readme

</content>
</entry>
<entry>
<id>e7543ba1ad63c0e56725ed1eedc97e133c359f2a</id>
<published>2026-01-25T07:26:24Z</published>
<updated>2026-01-25T07:26:24Z</updated>
<title type="text">Add tests and benchmarks for BOLT #3 implementation</title>
<link rel="alternate" type="text/html" href="commit/e7543ba1ad63c0e56725ed1eedc97e133c359f2a.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit e7543ba1ad63c0e56725ed1eedc97e133c359f2a
parent bb138778c6409032943e2139d8274f5d08962a03
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 11:26:24 +0400

Add tests and benchmarks for BOLT #3 implementation

- Tests use official BOLT #3 test vectors from Appendix D and E
- Key derivation tests verify derive_pubkey and derive_revocationpubkey
- Secret generation tests verify generate_from_seed with 5 vectors
- Secret storage tests verify insert_secret with valid and invalid sequences
- Fee calculation tests verify commitment_fee, htlc_timeout_fee, htlc_success_fee
- Trimming tests verify is_trimmed behavior at dust thresholds
- Criterion benchmarks for key derivation, secret generation, fees, trimming
- Weigh allocation tracking for memory profiling

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>bb138778c6409032943e2139d8274f5d08962a03</id>
<published>2026-01-25T07:20:31Z</published>
<updated>2026-01-25T07:20:31Z</updated>
<title type="text">Wire public API in Lightning.Protocol.BOLT3</title>
<link rel="alternate" type="text/html" href="commit/bb138778c6409032943e2139d8274f5d08962a03.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit bb138778c6409032943e2139d8274f5d08962a03
parent 0accd2e83523fd3c545c34624af4ef97ef1e1228
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 11:20:31 +0400

Wire public API in Lightning.Protocol.BOLT3

Adds comprehensive re-exports from all submodules:

Types (from Types.hs):
- Monetary: Satoshi, MilliSatoshi, conversion functions
- Keys: Pubkey, Seckey, Point
- Hashes: PaymentHash, PaymentPreimage
- Transaction: TxId, Outpoint, Sequence, Locktime
- Channel: CommitmentNumber, ToSelfDelay, CltvExpiry, etc.
- HTLC: HTLC, HTLCDirection
- Basepoints and derived keys
- Script, Witness, ChannelFeatures
- Weight and dust constants

Key derivation (from Keys.hs):
- derive_per_commitment_point, derive_pubkey, derive_*
- generate_from_seed, derive_secret
- SecretStore, empty_store, insert_secret, derive_old_secret
- obscured_commitment_number

Scripts (from Scripts.hs):
- funding_script, funding_witness
- to_local_script, to_remote_script, anchor_script
- offered_htlc_script, received_htlc_script
- All witness construction functions
- to_p2wsh, witness_script_hash

Transaction assembly (from Tx.hs):
- CommitmentTx, HTLCTx, ClosingTx and contexts
- build_commitment_tx, build_htlc_*_tx, build_closing_tx
- TxOutput, OutputType
- Fee calculation and trimming functions
- sort_outputs

Serialization (from Encode.hs):
- encode_tx, encode_htlc_tx, encode_closing_tx
- encode_tx_for_signing
- Primitive encoders

Parsing (from Decode.hs):
- DecodeError, RawTx, RawInput, RawOutput
- decode_tx and primitive decoders

Validation (from Validate.hs):
- ValidationError
- All validation functions

Module-level Haddock documentation with overview, quick start
example, and links to submodules.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>0accd2e83523fd3c545c34624af4ef97ef1e1228</id>
<published>2026-01-25T07:19:20Z</published>
<updated>2026-01-25T07:19:20Z</updated>
<title type="text">Implement Validate module for BOLT #3</title>
<link rel="alternate" type="text/html" href="commit/0accd2e83523fd3c545c34624af4ef97ef1e1228.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 0accd2e83523fd3c545c34624af4ef97ef1e1228
parent a73d905ce85de3538a23add833feeb400f4b1752
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 11:19:20 +0400

Implement Validate module for BOLT #3

Adds stateless validation for BOLT #3 transactions:

Validation errors:
- ValidationError ADT with descriptive error cases
- InvalidVersion, InvalidLocktime, InvalidSequence
- DustLimitViolation, MissingAnchorOutput, InvalidAnchorValue
- InvalidFee, InvalidHTLCLocktime, InvalidHTLCSequence
- NoOutputs, TooManyOutputs

Commitment transaction validation:
- validate_commitment_tx: full validation with all checks
- validate_commitment_locktime: upper 8 bits must be 0x20
- validate_commitment_sequence: upper 8 bits must be 0x80

HTLC transaction validation:
- validate_htlc_tx: base validation (version check)
- validate_htlc_timeout_tx: locktime=cltv_expiry, sequence check
- validate_htlc_success_tx: locktime=0, sequence check

Closing transaction validation:
- validate_closing_tx: option_simple_close (seq 0xFFFFFFFD)
- validate_legacy_closing_tx: closing_signed (seq 0xFFFFFFFF)

Output validation:
- validate_output_ordering: BIP69+CLTV ordering
- validate_dust_limits: all non-anchor outputs above dust
- validate_anchor_outputs: present and 330 sats

Fee validation:
- validate_commitment_fee: matches expected calculation
- validate_htlc_fee: matches expected calculation

Also includes bug fixes to Keys.hs secret storage (bucket tracking)
and minor adjustments to Scripts.hs.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>a73d905ce85de3538a23add833feeb400f4b1752</id>
<published>2026-01-25T07:17:18Z</published>
<updated>2026-01-25T07:17:18Z</updated>
<title type="text">Merge branch &#39;impl/decode&#39;</title>
<link rel="alternate" type="text/html" href="commit/a73d905ce85de3538a23add833feeb400f4b1752.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit a73d905ce85de3538a23add833feeb400f4b1752
parent 81cf235e919f65a07689222d84d5aef283a177d7
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 11:17:18 +0400

Merge branch &#39;impl/decode&#39;

</content>
</entry>
<entry>
<id>81cf235e919f65a07689222d84d5aef283a177d7</id>
<published>2026-01-25T07:17:15Z</published>
<updated>2026-01-25T07:17:15Z</updated>
<title type="text">Merge branch &#39;impl/encode&#39;</title>
<link rel="alternate" type="text/html" href="commit/81cf235e919f65a07689222d84d5aef283a177d7.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 81cf235e919f65a07689222d84d5aef283a177d7
parent b10bb01f03011c3759dfbd7d08a92dc6f37a78c5
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 11:17:15 +0400

Merge branch &#39;impl/encode&#39;

</content>
</entry>
<entry>
<id>430582cb8588566932fadf2a16074c651698052d</id>
<published>2026-01-25T07:16:52Z</published>
<updated>2026-01-25T07:16:52Z</updated>
<title type="text">Implement Decode module for BOLT #3 transaction parsing</title>
<link rel="alternate" type="text/html" href="commit/430582cb8588566932fadf2a16074c651698052d.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 430582cb8588566932fadf2a16074c651698052d
parent b10bb01f03011c3759dfbd7d08a92dc6f37a78c5
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 11:16:52 +0400

Implement Decode module for BOLT #3 transaction parsing

Add transaction and script decoding functionality:

- DecodeError type for parse errors (InsufficientBytes, InvalidMarker,
  InvalidFlag, InvalidVarint, EmptyInput)
- RawTx, RawInput, RawOutput types for parsed transaction data
- Primitive decoders: decode_varint, decode_le32, decode_le64,
  decode_outpoint, decode_output
- Witness parsing: decode_witness
- Full transaction parsing: decode_tx (handles both legacy and SegWit)

Uses continuation-passing style with (value, remaining) tuples for
progressive byte consumption. All operations return Either for
fallibility with no partial functions.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>69fd2d443816be6b4e47f4c826a90fdbd784047b</id>
<published>2026-01-25T07:16:46Z</published>
<updated>2026-01-25T07:16:46Z</updated>
<title type="text">Implement Encode module for BOLT #3 transaction serialization</title>
<link rel="alternate" type="text/html" href="commit/69fd2d443816be6b4e47f4c826a90fdbd784047b.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 69fd2d443816be6b4e47f4c826a90fdbd784047b
parent b10bb01f03011c3759dfbd7d08a92dc6f37a78c5
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 11:16:46 +0400

Implement Encode module for BOLT #3 transaction serialization

Add functions for serializing BOLT #3 transactions and scripts:

Transaction serialization:
- encode_tx: Serialize commitment tx in SegWit format
- encode_htlc_tx: Serialize HTLC timeout/success tx
- encode_closing_tx: Serialize closing tx
- encode_tx_for_signing: Stripped format for sighash computation

Primitive encoding:
- encode_varint: Bitcoin CompactSize encoding
- encode_le32/encode_le64: Little-endian integers
- encode_outpoint: Transaction outpoint (txid + index)
- encode_output: Transaction output (value + scriptPubKey)

Witness serialization:
- encode_witness: Generic witness stack encoding
- encode_funding_witness: 2-of-2 multisig witness for funding tx

Uses ByteString.Builder for efficient concatenation per project
conventions.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>b10bb01f03011c3759dfbd7d08a92dc6f37a78c5</id>
<published>2026-01-25T07:14:07Z</published>
<updated>2026-01-25T07:14:07Z</updated>
<title type="text">Implement Tx assembly module for BOLT #3</title>
<link rel="alternate" type="text/html" href="commit/b10bb01f03011c3759dfbd7d08a92dc6f37a78c5.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit b10bb01f03011c3759dfbd7d08a92dc6f37a78c5
parent 5c8e6411ce97624b46951a5c74d0383f67152b30
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 11:14:07 +0400

Implement Tx assembly module for BOLT #3

Adds complete transaction assembly per BOLT #3:

Commitment transactions:
- CommitmentTx type with version, locktime, input, and outputs
- CommitmentContext with all parameters needed to build
- CommitmentKeys for derived keys
- build_commitment_tx following the spec algorithm:
  1. Obscured commitment number for locktime/sequence
  2. HTLC trimming based on dust limits
  3. Fee calculation and deduction from funder
  4. Output construction (to_local, to_remote, anchors, HTLCs)
  5. BIP69+CLTV output ordering

HTLC transactions:
- HTLCTx type for timeout and success transactions
- build_htlc_timeout_tx with cltv_expiry locktime
- build_htlc_success_tx with locktime 0
- Proper sequence handling for option_anchors

Closing transactions:
- ClosingTx type for both legacy and simple close
- build_closing_tx for option_simple_close (seq 0xFFFFFFFD)
- build_legacy_closing_tx for closing_signed (seq 0xFFFFFFFF)
- Fee deduction and dust filtering

Fee calculation:
- commitment_fee based on weight formula
- commitment_weight with base + 172*htlcs
- htlc_timeout_fee and htlc_success_fee
- Zero fees with option_anchors (CPFP)

Trimming:
- htlc_trim_threshold per direction
- is_trimmed, trimmed_htlcs, untrimmed_htlcs

Output ordering:
- sort_outputs per BIP69 (value, scriptpubkey, cltv)
- compareOutputs and compareCltvExpiry helpers

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>5c8e6411ce97624b46951a5c74d0383f67152b30</id>
<published>2026-01-25T07:11:19Z</published>
<updated>2026-01-25T07:11:19Z</updated>
<title type="text">Fix Keys module to use correct ppad-secp256k1 API</title>
<link rel="alternate" type="text/html" href="commit/5c8e6411ce97624b46951a5c74d0383f67152b30.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 5c8e6411ce97624b46951a5c74d0383f67152b30
parent d8dbc23a79dc8ce18a3ad1eb78d69b53d935b7b0
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 11:11:19 +0400

Fix Keys module to use correct ppad-secp256k1 API

- parse_seckey -&gt; parse_int256 (parse bytes as scalar)
- derive_pubkey -&gt; derive_pub (scalar * G)
- add_point -&gt; add (point addition, non-Maybe return)
- mul_point -&gt; mul (point * scalar)
- Remove unused imports and variables to eliminate warnings

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>d8dbc23a79dc8ce18a3ad1eb78d69b53d935b7b0</id>
<published>2026-01-25T07:06:18Z</published>
<updated>2026-01-25T07:06:18Z</updated>
<title type="text">Merge branch &#39;impl/scripts&#39;</title>
<link rel="alternate" type="text/html" href="commit/d8dbc23a79dc8ce18a3ad1eb78d69b53d935b7b0.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit d8dbc23a79dc8ce18a3ad1eb78d69b53d935b7b0
parent 23add542ee6973a0714d712dce912113c7310d4f
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 11:06:18 +0400

Merge branch &#39;impl/scripts&#39;

</content>
</entry>
<entry>
<id>23add542ee6973a0714d712dce912113c7310d4f</id>
<published>2026-01-25T07:05:41Z</published>
<updated>2026-01-25T07:05:41Z</updated>
<title type="text">Merge branch &#39;impl/keys&#39;</title>
<link rel="alternate" type="text/html" href="commit/23add542ee6973a0714d712dce912113c7310d4f.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 23add542ee6973a0714d712dce912113c7310d4f
parent 8af91e37d272af25626b1f02b2cdf55456d4db36
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 11:05:41 +0400

Merge branch &#39;impl/keys&#39;

</content>
</entry>
<entry>
<id>8ed369e6c42c5075f5d004f61380f86fbfc1f73b</id>
<published>2026-01-25T06:59:36Z</published>
<updated>2026-01-25T06:59:36Z</updated>
<title type="text">Implement BOLT #3 script templates</title>
<link rel="alternate" type="text/html" href="commit/8ed369e6c42c5075f5d004f61380f86fbfc1f73b.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 8ed369e6c42c5075f5d004f61380f86fbfc1f73b
parent 8af91e37d272af25626b1f02b2cdf55456d4db36
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 10:59:36 +0400

Implement BOLT #3 script templates

Add complete implementation of Bitcoin script templates per BOLT #3:

- Funding output: 2-of-2 multisig script and witness
- to_local output: revocable with CSV delay, supports delayed spend
  and revocation
- to_remote output: P2WPKH (no anchors) or CSV-locked (with anchors)
- Anchor outputs: funding pubkey with 16-block anyone-can-spend fallback
- Offered HTLC: revocation, preimage, and timeout paths with optional
  anchor CSV suffix
- Received HTLC: revocation, success, and timeout paths with optional
  anchor CSV suffix
- HTLC-timeout/success output: same structure as to_local (re-exported)
- P2WSH helpers: witness_script_hash and to_p2wsh conversion

Implementation details:
- Bitcoin script opcodes defined as Word8 constants
- Script number encoding handles minimal push requirements
- HASH160 (RIPEMD160(SHA256)) for pubkey hashing
- Proper handling of option_anchors feature flag
- All scripts follow BOLT #3 specification exactly

Dependencies added:
- ppad-sha256 for SHA256 hashing
- ppad-ripemd160 for RIPEMD160 hashing

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>583dea554be6970c72f3de8b248d21c161081d7b</id>
<published>2026-01-25T06:57:50Z</published>
<updated>2026-01-25T06:57:50Z</updated>
<title type="text">Implement Keys module for BOLT #3 key derivation</title>
<link rel="alternate" type="text/html" href="commit/583dea554be6970c72f3de8b248d21c161081d7b.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 583dea554be6970c72f3de8b248d21c161081d7b
parent 8af91e37d272af25626b1f02b2cdf55456d4db36
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 10:57:50 +0400

Implement Keys module for BOLT #3 key derivation

Implements per-commitment key derivation per BOLT #3:

- derive_per_commitment_point: derives point from secret via scalar
  multiplication with generator G

- derive_pubkey: general key derivation using formula
  pubkey = basepoint + SHA256(per_commitment_point || basepoint) * G

- derive_localpubkey, derive_local_htlcpubkey, derive_remote_htlcpubkey,
  derive_local_delayedpubkey, derive_remote_delayedpubkey: type-safe
  wrappers around derive_pubkey for each key type

- derive_revocationpubkey: blinded key derivation using formula
  revocation_basepoint * SHA256(revocation_basepoint || per_commitment_point)
  + per_commitment_point * SHA256(per_commitment_point || revocation_basepoint)

- generate_from_seed: generates I&#39;th per-commitment secret from seed
  using the bit-flipping and hashing algorithm from spec

- derive_secret: generalisation for efficient secret storage

- SecretStore: 49-slot compact storage for per-commitment secrets with
  insert_secret and derive_old_secret operations

- obscured_commitment_number: XORs commitment number with lower 48 bits
  of SHA256(opener_payment_basepoint || accepter_payment_basepoint)

Adds ppad-secp256k1 and ppad-sha256 as dependencies.

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>8af91e37d272af25626b1f02b2cdf55456d4db36</id>
<published>2026-01-25T06:52:43Z</published>
<updated>2026-01-25T06:52:43Z</updated>
<title type="text">Milestone 0: Add module stubs and core Types</title>
<link rel="alternate" type="text/html" href="commit/8af91e37d272af25626b1f02b2cdf55456d4db36.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 8af91e37d272af25626b1f02b2cdf55456d4db36
parent 98e8f9cc3d5c4883e91eedeae380654d6a53b8f3
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 10:52:43 +0400

Milestone 0: Add module stubs and core Types

Create project structure with module stubs:
- Lightning.Protocol.BOLT3.Types: core newtypes and ADTs
- Lightning.Protocol.BOLT3.Keys: key derivation (stub)
- Lightning.Protocol.BOLT3.Scripts: script templates (stub)
- Lightning.Protocol.BOLT3.Tx: transaction assembly (stub)
- Lightning.Protocol.BOLT3.Encode: serialization (stub)
- Lightning.Protocol.BOLT3.Decode: parsing (stub)
- Lightning.Protocol.BOLT3.Validate: validation (stub)

Types module includes:
- Monetary types (Satoshi, MilliSatoshi)
- Key types (Pubkey, Seckey, Point, various basepoints)
- Transaction primitives (TxId, Outpoint, Sequence, Locktime)
- Channel parameters (CommitmentNumber, ToSelfDelay, etc.)
- HTLC types with BOLT #3 ordering
- Script/Witness newtypes
- Weight and dust constants from spec

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>98e8f9cc3d5c4883e91eedeae380654d6a53b8f3</id>
<published>2026-01-25T06:49:52Z</published>
<updated>2026-01-25T06:49:52Z</updated>
<title type="text">Add implementation plan (IMPL1.md)</title>
<link rel="alternate" type="text/html" href="commit/98e8f9cc3d5c4883e91eedeae380654d6a53b8f3.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 98e8f9cc3d5c4883e91eedeae380654d6a53b8f3
parent 5f3f647e766f29a6d57a199c8e6ec91b593277a1
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 10:49:52 +0400

Add implementation plan (IMPL1.md)

Outlines milestones for BOLT #3 implementation:
- M0: Types and module stubs
- M1: Keys and Scripts (parallelizable)
- M2: Transaction assembly
- M3: Encode/Decode/Validate (parallelizable)
- M4: Public API
- M5: Tests and benchmarks

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
<entry>
<id>5f3f647e766f29a6d57a199c8e6ec91b593277a1</id>
<published>2026-01-25T06:45:13Z</published>
<updated>2026-01-25T06:45:13Z</updated>
<title type="text">Initial project skeleton for ppad-bolt3</title>
<link rel="alternate" type="text/html" href="commit/5f3f647e766f29a6d57a199c8e6ec91b593277a1.html" />
<author>
<name>Jared Tobin</name>
<email>jared@jtobin.io</email>
</author>
<content type="text">commit 5f3f647e766f29a6d57a199c8e6ec91b593277a1
Author: Jared Tobin &lt;jared@jtobin.io&gt;
Date:   Sun, 25 Jan 2026 10:45:13 +0400

Initial project skeleton for ppad-bolt3

Set up project structure for BOLT #3 (Bitcoin Transaction and Script
Formats) implementation:

- lib/Lightning/Protocol/BOLT3.hs: empty module shell
- test/Main.hs: tasty test harness
- bench/Main.hs, bench/Weight.hs: criterion and weigh benchmarks
- etc/03-transactions.md: BOLT #3 specification
- flake.nix: nix flake with ppad-nixpkgs base
- ppad-bolt3.cabal: cabal package definition
- CLAUDE.md, AGENTS.md: project guidelines

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;

</content>
</entry>
</feed>
