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

Delegated Bitcoin Agent Spending Authority

permalink THAMER
#ai-agents#bitcoin#python#spending-policy

Delegated Bitcoin Agent Spending Authority

Design and trust boundary

A trusted policy registry can issue narrow grants for a specific agent, wallet, network and destination. Expiration is exclusive. This is a local authorization predicate, not a signed capability or authentication protocol. A separate ledger enforces cumulative spending.

Independent reference implementation

Python · 14 lines
1"""Offline educational example; no wallet calls."""
2def permits(grant, intent, now):
3    fields = ("agent", "wallet", "network", "destination")
4    return (grant["network"] in ("main", "test") and
5            all(type(grant[k]) is str and grant[k] and grant[k] == intent[k] for k in fields) and
6            type(now) is int and type(grant["expires"]) is int and now < grant["expires"] and
7            type(intent["debit"]) is int and type(grant["max_debit"]) is int and
8            0 < intent["debit"] <= grant["max_debit"])
9
10g = dict(agent="a", wallet="w", network="test", destination="fixture", expires=100, max_debit=500)
11i = dict(agent="a", wallet="w", network="test", destination="fixture", debit=500)
12assert permits(g,i,99)
13assert not permits(g,i,100)
14assert not permits(g,dict(i,network="main"),99)

Operational boundaries

All amounts are integer satoshis. This offline example assumes trusted policy inputs and does not authenticate a caller or execute SEND. Production requires durable state, exact intent binding, stable idempotency and reconciliation of uncertain broadcasts. The external policy must not modify the immutable wallet fee law.

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