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

Bitcoin API Economy: Versioned Per-Request Pricing

permalink THAMER
#ai-agents#bitcoin#machine-economy#python

Bitcoin API Economy: Versioned Per-Request Pricing

Bind a service quote to an immutable tariff version and count only accepted requests.

Design and trust boundary

A quote is not proof of consumption. Freeze the tariff version before work begins and retain the accepted request identifiers. A changed tariff must produce a new quote, not retroactively alter an existing obligation. The integer total is a service price, not an engine SEND amount or a guaranteed recipient amount.

Independent reference implementation

Python · 14 lines
1def quote(version, units, rate_sat):
2    if not isinstance(version, str) or not version or len(version)>64:
3        raise ValueError("tariff version")
4    if any(type(x) is not int or not 0 < x <= 1000000 for x in (units, rate_sat)):
5        raise ValueError("invalid quantity or rate")
6    return {"tariff": version, "units": units, "total_sat": units * rate_sat}
7
8assert quote("v1", 12, 3)["total_sat"] == 36
9try:
10    quote("v1", True, 3)
11except ValueError:
12    pass
13else:
14    raise AssertionError("boolean accepted")

Operational boundaries

Run with Python 3. The assertions use synthetic data only. No SEND, wallet credentials or live API calls are included. Use a separate authorized execution service for actual settlement. Preserve the WAB Engine API and immutable signed fee law. These are proposed application patterns, not interoperability standards or production financial systems.

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