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

Building Deterministic Execution Layers for AI Payments

permalink THAMER
#ai-agents#bitcoin#sdk#wab

Research status: Theoretical SDK design. Examples are illustrative and have not been built or tested against the live engine.

Deterministic execution

Natural language is useful for expressing goals, but a financial operation must have an explicit typed representation. The model proposes a destination and integer satoshi amount. The executor validates the network, authorization and budget, then maps the approved intent to the documented SEND contract. It must not reinterpret the amount after approval.

Proposed state model

PROPOSED -> APPROVED -> SUBMITTING
SUBMITTING -> BROADCAST_OBSERVED
SUBMITTING -> OUTCOME_UNKNOWN
SUBMITTING -> REJECTED
BROADCAST_OBSERVED -> CONFIRMATION_OBSERVED

These are local SDK states, not engine response values. A rejection is definitive only when the documented response establishes that fact. A transport timeout is an unknown outcome. Confirmation observations may change after a chain reorganization; do not model them as irreversible.

Durable execution record

from dataclasses import dataclass
@dataclass(frozen=True)
class PaymentIntent:
    intent_id: str
    wallet_ref: str
    network: str
    destination: str
    amount_sat: int

Store approval, reservation and request correlation separately. Persist the execution record before sending. Use the same engine idempotency identifier for retries only as permitted by the documented API. If a response is lost, reconcile through available engine evidence rather than constructing a new request blindly. A transaction ID is evidence of a reported transaction, not by itself proof of confirmation or recipient acceptance.

Failure boundaries

Do not automatically fall back to mainnet, another wallet or a different address type. Never allow a model to change the fee law. Keep logs free of secrets. Treat application-level errors independently of HTTP status and preserve the original error code where available.

Acceptance plan

Inject a crash before submission, a lost response after submission and repeated model requests. Verify that the same approved intent cannot produce an unintended second payment. Exercise confirmation changes with fixtures and perform a funded testnet experiment. Compare SDK records with transaction status and wallet observations. This state machine is a design proposal, not a demonstrated execution guarantee.

Primary reference

https://thamer.org/api

Related reading

https://thamer.org/docs/wab-sdk-idempotency-retry-strategies
https://thamer.org/docs/wab-sdk-authentication-credential-management
https://thamer.org/docs/wab-sdk-ai-agent-design
https://thamer.org/docs/wab-sdk-ai-agent-tools
https://thamer.org/docs/wab-sdk-openai-tool-interfaces
https://thamer.org/docs/wab-sdk-agent-spending-authorization
https://thamer.org/docs/wab-sdk-mcp-wallet-tools

Questions & Answers

Explore all questions →

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