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

stage12-event-network.py

TEXT FILE

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

Download / RawBack to folder
Python · 21 lines
1# SPDX-License-Identifier: 0BSD
2class Projection:
3    def __init__(self):
4        self.events = {}
5    def consume(self, event_id, payload):
6        if event_id in self.events:
7            if self.events[event_id] != payload:
8                raise ValueError("conflicting event")
9            return False
10        self.events[event_id] = payload
11        return True
12
13p = Projection()
14assert p.consume("e1", ("observed", "synthetic-tx"))
15assert not p.consume("e1", ("observed", "synthetic-tx"))
16try:
17    p.consume("e1", ("confirmed", "other-tx"))
18except ValueError:
19    pass
20else:
21    raise AssertionError("conflict 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