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

stage14-approval-binding.py

TEXT FILE

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

Download / RawBack to folder
Python · 14 lines
1# SPDX-License-Identifier: 0BSD
2import hashlib, json, hmac
3
4def fingerprint(intent):
5    return hashlib.sha256(b'approved-intent-v1\x00'+json.dumps(intent,sort_keys=True,separators=(',',':'),ensure_ascii=True,allow_nan=False).encode()).hexdigest()
6
7def matches(record,intent,now):
8    return (record['agent']==intent['agent'] and now < record['expires'] and hmac.compare_digest(record['digest'],fingerprint(intent)))
9
10p=dict(agent='buyer',wallet='demo',net='test',to='synthetic',amount_sat=1000,request_id='r1')
11r=dict(agent='buyer',expires=110,digest=fingerprint(p))
12assert matches(r,p,100)
13assert not matches(r,dict(p,amount_sat=1001),100)
14assert not matches(r,p,110)
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