tx

Minimal transaction primitives (docs.ppad.tech/tx).
git clone git://git.ppad.tech/tx.git
Log | Files | Refs | README | LICENSE

.commit_msg (651B)


      1 Implement transaction encoding (Phase 1)
      2 
      3 Add binary serialisation for Bitcoin transactions using
      4 Data.ByteString.Builder:
      5 
      6 - Internal helpers: put_compact (compactSize/varint encoding),
      7   put_word32_le, put_word64_le, to_strict
      8 - Component encoders: put_outpoint, put_txin, put_txout, put_witness
      9 - Main functions: to_bytes (segwit-aware), to_bytes_legacy
     10 
     11 to_bytes emits segwit format (marker 0x00, flag 0x01, witnesses after
     12 outputs) when witnesses are present, otherwise delegates to legacy.
     13 to_bytes_legacy always emits legacy format (no marker/flag/witnesses),
     14 used for txid computation.
     15 
     16 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>