THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

Conditional Bitcoin Commerce: Evidence Before Fulfillment

permalink THAMER
#ai-agents#bitcoin#commerce#python

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

Python · 14 lines
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

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects