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-store-payments.py

TEXT FILE

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

Download / RawBack to folder
Python · 15 lines
1def total(catalog, cart):
2    if not cart: raise ValueError("empty cart")
3    result = 0
4    for sku, qty in cart.items():
5        price = catalog[sku]
6        if type(qty) is not int or type(price) is not int or not 1 <= qty <= 100 or price <= 0:
7            raise ValueError("invalid item")
8        result += price * qty
9    return result
10
11if __name__ == "__main__":
12    assert total({"book": 1200}, {"book": 2}) == 2400
13    try: total({"book": 1200}, {"book": -1})
14    except ValueError: pass
15    else: raise AssertionError("negative quantity 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