# Changelog
- 0.1.0 (2026-10-10)
* A substantial rewrite against ppad-bolt1 0.1.0, with breaking
changes throughout:
* The API is exported from Lightning.Protocol.BOLT2 alone, and uses
snake_case names, with record fields prefixed by their message's
name (e.g. encode_open_channel, open_channel_funding_satoshis).
* Payload decoders have type ByteString -> Either DecodeError a and
consume their whole input; encoders return Either EncodeError
ByteString only where they can fail. A Message type, with
message_type, encode_message and decode_message, handles complete
messages.
* Every message has a TLV stream. Known TLV records are typed fields
(channel_type is a ppad-bolt9 feature vector), unknown even records
are rejected, and unknown odd records are kept, so encoding a
decoded message reproduces its bytes.
* Amounts use ppad-bolt1's bounded Satoshi and MilliSatoshi, except
max_htlc_value_in_flight_msat. Types from ppad-bolt1 and ppad-tx
are no longer re-exported.
* OnionPacket is renamed OnionRoutingPacket and checks its length;
ScriptPubKey and Witness are bounded at 65535 bytes; FeatureBits,
Initiator and MsgType are removed; OnionHash, AttributionData,
FeeRange and NextFunding are added.
* Catches up with BOLT #2 as of lightning/bolts 1aadb719:
channel_reestablish's next_funding moves to TLV type 1, and
update_fulfill_htlc (fulfillment_payload), commitment_signed
(funding_txid), tx_add_input and tx_signatures gain TLV streams.
* Fixes decoding, which accepted unknown even TLV types, didn't check
known TLV values, point prefixes or amounts, and ignored trailing
bytes on some messages; and encoding, which accepted malformed
field values.
- 0.0.1 (2026-04-18)
* Initial release.