Repository navigation
v0.2.0
Breaking changes
ContractParametershas two new public fields,anchorandoutcome_bound_splits. Struct literals needanchor: Noneandoutcome_bound_splits: falseto keep 0.1.0 behaviour.- New
Errorvariants:InvalidAnchorValue,MissingAnchorandUnboundSharedWinners. validatenow also rejects anchors below 240 sats, and, whenoutcome_bound_splitsisfalse, attestation outcomes that pay the same winners different weights (UnboundSharedWinners). Setoutcome_bound_splits: truefor contracts with more than one paid place.
Features
- Pay-to-anchor outputs (#14). With
anchor: Some(AnchorParams { value }), every outcome, expiry and split transaction gets a P2A output (OP_1 <0x4e73>) as its last output, so anyone with spare coins can CPFP a stuck transaction during recovery. Transactions stay version 2 and keep payingfee_rate. Recovery helpers:anchor::find_anchor,SignedContract::presigned_tx_fee,SignedContract::cpfp_child_templateandanchor::cpfp_child_template. - Outcome-bound splits (#15, #16). With
outcome_bound_splits: true, each winner's split leaf starts with<outcome> OP_DROP, so every outcome has its own outcome output, outcome txid and split sighashes. Cooperative spending paths are unchanged.
Compatibility
- Both fields default to off and are left out of serialization when off. Serialized 0.1.0
ContractParametersandSignedContractvalues deserialize, re-serialize to the same bytes, and rebuild byte-identical transactions and sighashes, so stored signatures keep verifying.tests/compat.rschecks this against the published 0.1.0 crate and a pinned digest.
Documentation
- Corrected the fee notes: a split transaction's input carries a BIP-68 relative locktime of
deltablocks, so it confirmsdeltablocks after its outcome transaction at the earliest.
This tag is GPG-signed by the maintainer.