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

Bitcoin SDK Spending Limits and Agent Authorization

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.

Policy placement

Spending limits belong in a trusted application or SDK executor outside the engine. They are additional authorization constraints, not changes to the signed fee law established at wallet creation. A client-side check alone cannot restrict a caller that possesses the full wallet key and can bypass the client.

Define maximum authorized amount per operation, cumulative budget and time-window budget. Specify whether each limit counts requested amount, actual wallet debit or another documented quantity. If the debit cannot be bounded from the available contract, do not claim a hard debit limit. Reserve a conservative amount or require explicit approval.

Conceptual Go policy

type Budget struct {
    MaxPerPaymentSat int64
    DailyLimitSat int64
    TotalLimitSat int64
}
type Reservation struct {
    IntentID string
    ReservedSat int64
}

A durable transaction should atomically check remaining limits and create a reservation. Concurrent requests must not both consume the same remaining allowance. Keep unresolved reservations after transport failures until reconciliation establishes the outcome. Use checked integer arithmetic and define the time zone and reset rule for daily budgets.

Authorization lifecycle

Bind approval to wallet, network, destination, amount, expiry and intent identifier. An expired or changed intent requires new authorization. Separate a proposal from approval and execution. A PIN may be an additional application control but should not be sent to the model or treated as a replacement for secure key custody.

The same destination may legitimately receive multiple payments with distinct authorized intents. Do not impose address-based blocking or cooldown as an assumed engine rule. Idempotency protects a single operation, not all future payments to an address.

Acceptance plan

Test boundary amounts, simultaneous reservations, time-window rollover, restart recovery and unknown outcomes. Verify that the policy rejects unauthorized requests before engine execution. Test a permitted payment on testnet and reconcile the reservation with observed debit and fee information. No production budget guarantee is established until bypass resistance and accounting are tested.

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-deterministic-ai-payments
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