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

stage24-digital-delivery.py

TEXT FILE

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

Download / RawBack to folder
Python · 16 lines
1import sqlite3
2
3def grant(db, order, customer, product, payment_state):
4    if payment_state != "paid": return False
5    with db:
6        db.execute("INSERT OR IGNORE INTO entitlement VALUES (?,?,?)",(order,customer,product))
7        row=db.execute("SELECT customer,product FROM entitlement WHERE order_id=?",(order,)).fetchone()
8        if row != (customer,product): raise ValueError("entitlement conflict")
9    return True
10
11if __name__ == "__main__":
12    db=sqlite3.connect(":memory:")
13    db.execute("CREATE TABLE entitlement(order_id TEXT PRIMARY KEY, customer TEXT, product TEXT)")
14    assert not grant(db,"o","c","p","underpaid")
15    assert grant(db,"o","c","p","paid") and grant(db,"o","c","p","paid")
16    assert db.execute("SELECT COUNT(*) FROM entitlement").fetchone()[0]==1
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