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

stage18-secure-communication.py

TEXT FILE

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

Download / RawBack to folder
Python · 17 lines
1import hashlib
2import hmac
3import json
4
5def tag(key, audience, message):
6    body = json.dumps(['bitcoin-agent/v1', audience, message], separators=(',', ':'), ensure_ascii=True).encode()
7    return hmac.new(key, body, hashlib.sha256).digest()
8
9def verify(key, audience, message, signature):
10    return hmac.compare_digest(tag(key, audience, message), signature)
11
12if __name__ == '__main__':
13    key = b'fixture-only'
14    sig = tag(key, 'agent-A', 'quote-1')
15    assert verify(key, 'agent-A', 'quote-1', sig)
16    assert not verify(key, 'agent-B', 'quote-1', sig)
17    assert not verify(key, 'agent-A', 'quote-2', sig)
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