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

stage19-wallet-health.py

TEXT FILE

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

Download / RawBack to folder
Python · 15 lines
1def classify(observation, now, max_age=30):
2    stamp = observation.get('observed_at')
3    if type(stamp) is not int or not 0 <= now - stamp <= max_age:
4        return 'UNKNOWN'
5    reachable = observation.get('reachable')
6    ready = observation.get('ready')
7    if reachable is False or ready is False:
8        return 'DEGRADED'
9    if reachable is True and ready is True:
10        return 'HEALTHY'
11    return 'UNKNOWN'
12
13assert classify(dict(observed_at=100, reachable=True, ready=True), 110) == 'HEALTHY'
14assert classify(dict(observed_at=100, reachable=True, ready=True), 140) == 'UNKNOWN'
15assert classify(dict(observed_at=100, reachable=True), 110) == 'UNKNOWN'
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