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

stage16-order-state.py

TEXT FILE

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

Download / RawBack to folder
Python · 16 lines
1def advance(state, event):
2    transitions = {('open','accept'):'awaiting_payment',
3                   ('awaiting_payment','verified_payment'):'paid',
4                   ('paid','fulfill'):'fulfilled',
5                   ('open','cancel'):'cancelled'}
6    if (state,event) not in transitions:
7        raise ValueError('invalid transition')
8    return transitions[state,event]
9
10assert advance('paid','fulfill') == 'fulfilled'
11try:
12    advance('paid','cancel')
13except ValueError:
14    pass
15else:
16    raise AssertionError('paid order cancelled')
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