Conditional Bitcoin Commerce: Evidence Before Fulfillment
Conditional Bitcoin Commerce: Evidence Before Fulfillment
Evaluate payment evidence against a fixed order contract.
Design and trust boundary
The observer must independently verify the chain, output script, amount and confirmation depth. A model cannot supply trusted evidence. This predicate assumes a trusted observer and does not implement Bitcoin Script escrow. Recheck after reorganizations.
Independent reference implementation
1def eligible(order, evidence):
2 return (evidence['network'] == order['network']
3 and evidence['script'] == order['script']
4 and type(evidence['sat']) is int
5 and evidence['sat'] == order['sat']
6 and type(evidence['confirmations']) is int
7 and evidence['confirmations'] >= order['min_confirmations']
8 and evidence['canonical'] is True)
9
10order = dict(network='test', script='synthetic-script', sat=5000, min_confirmations=2)
11evidence = dict(network='test', script='synthetic-script', sat=5000, confirmations=2, canonical=True)
12assert eligible(order,evidence)
13assert not eligible(order,dict(evidence,canonical=False))
14assert not eligible(order,dict(evidence,network='main'))Operational boundaries
Run with Python 3. Assertions use synthetic data only. No wallet credentials, SEND or live API calls are included. Preserve the WAB Engine API and immutable signed fee law. Amounts are integer satoshis. Production use requires authenticated inputs, durable state and independent authorization. This is a proposed application pattern, not a production financial system.
Related research
https://thamer.org/learn/bitcoin-for-ai-agents-open-integration-guide
https://thamer.org/api
