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

stage11-shopping-review.py

TEXT FILE

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

Download / RawBack to folder
Python · 17 lines
1def review(quote, merchant, now, ceiling):
2    if quote.get('merchant') != merchant:
3        raise ValueError('merchant mismatch')
4    amount = quote.get('amount_sat')
5    expiry = quote.get('expires_at')
6    if type(amount) is not int or not 0 < amount <= ceiling:
7        raise ValueError('amount rejected')
8    if type(expiry) is not int or expiry <= now:
9        raise ValueError('expired quote')
10    return {'status':'review_required','amount_sat':amount}
11
12if __name__ == '__main__':
13    q = {'merchant':'demo','amount_sat':1200,'expires_at':200}
14    assert review(q,'demo',100,2000)['status'] == 'review_required'
15    try: review(q,'demo',200,2000)
16    except ValueError: pass
17    else: raise AssertionError('expired quote accepted')
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