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

Designing Bitcoin Transaction Execution Interfaces

permalink THAMER
#bitcoin#sdk#software-engineering#wab

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

Separate intent from execution

SEND is an irreversible financial operation once a transaction is accepted and confirmed. A client should accept an explicit wallet scope, destination, integer amount and stable operation identity. Validate inputs before dispatch, but do not promise acceptance. The engine applies its signed birth fee law and Bitcoin transaction rules. The SDK must not silently gross up an amount or alter the fee policy.

Proposed TypeScript interface

type SendIntent = {
  net: "test" | "main";
  type: "segwit" | "taproot";
  destination: string;
  amountSat: bigint;
  operationId: string;
};

This is a public model, not the wire body. The adapter must map fields and the idempotency mechanism from the verified API reference. BigInt requires explicit serialization; do not pass it directly to JSON.stringify. Validate range before converting to a JSON number if the documented wire contract uses numbers.

Amount and evidence

Distinguish requested amount, recipient output, mining fee and software fee. An inclusive fee policy can make the recipient output smaller than the requested amount. Do not infer the complete fee distribution from a single difference. The application should disclose the relevant semantics before authorizing payment. Preserve the actual response and transaction ID in a protected audit record.

A successful broadcast is not confirmation. A timeout after dispatch is not proof of failure. Expose an unresolved execution outcome and use documented transaction-status and reconciliation procedures. Do not automatically issue another SEND with a new identifier. Keep spending approval in the trusted application executor, particularly when the caller is an AI agent.

Acceptance plan

Use a funded Testnet wallet and an independently controlled recipient. Verify the intended network, destination output, actual fees where evidence supports them, broadcast and later confirmation. Compare SegWit and Taproot cases. Test invalid amounts and addresses with fixtures before live calls. Do not claim exact fee behavior beyond the observed wallet law and transaction evidence.

Primary reference

https://thamer.org/api

Related reading in this series

https://thamer.org/docs/wab-sdk-designing-bitcoin-sdk
https://thamer.org/docs/wab-sdk-api-engine-application-boundaries
https://thamer.org/docs/wab-sdk-wallet-identity-management
https://thamer.org/docs/wab-sdk-cross-language-interfaces
https://thamer.org/docs/wab-sdk-typed-json-contracts
https://thamer.org/docs/wab-sdk-authentication-credential-management
https://thamer.org/docs/wab-sdk-wallet-creation-restoration
https://thamer.org/docs/wab-sdk-receive-address-interfaces
https://thamer.org/docs/wab-sdk-balance-utxo-management
https://thamer.org/docs/wab-sdk-idempotency-retry-strategies
https://thamer.org/docs/wab-sdk-wallet-recovery-local-lifecycle

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