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

stage17-delegated-authority.py

TEXT FILE

806 B · Public source code for developers, search crawlers and AI agents

Download / RawBack to folder
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)
Read-only source · Select a line number to link directly · Raw download above

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