Building Cross-Language Bitcoin SDK Interfaces
Research status: Theoretical SDK design. Examples are illustrative and have not been built or tested against the live engine.
Shared semantics, native syntax
A family of SDKs should agree on behavior rather than forcing identical method spelling. Go can use explicit context and error returns. Python can expose synchronous or asynchronous methods. TypeScript can use promises and discriminated unions. All must preserve the same network, amount and authorization semantics.
Define a versioned operation manifest in the development project. For each operation record method, path, authentication, required inputs, result decoding and replay policy. This manifest is a proposed engineering artifact, not a claim that the engine publishes a machine-readable schema of every field. Derive it from the reference and refine it with captured test responses.
Illustrative manifest fragment
{
"operation": "wallet.receive",
"method": "POST",
"path": "/api/v5/btc/wallet/receive",
"input": {"net": ["test", "main"], "type": ["segwit", "taproot"]},
"authentication": "X-BTC-KEY",
"replay_policy": "requires_contract_review"
}The manifest is not the JSON body sent to the engine. The actual request selects one value for each field. Use golden request fixtures to detect differences in serializers, especially omitted fields versus explicit null values.
Numeric consistency
Represent satoshi amounts as integers, never floating-point BTC. JavaScript implementations must check safe integer boundaries and avoid silently rounding JSON numbers; other languages must check range and reject overflow. A monetary value and a fee estimate are different concepts. Keep missing values distinct from zero. Do not interpret an unknown response field as a known status.
Compatibility and tests
Share sanitized fixtures across languages. Compare method, path, headers and parsed JSON rather than irrelevant whitespace or object key order. Include error fixtures, Unicode input where appropriate and timeouts. Version the SDK independently from the API. Native interfaces may evolve while preserving wire compatibility. Test every supported runtime in an isolated container before attempting a live cross-language payment scenario. No language implementation is claimed complete by this design.
Primary reference
https://thamer.org/api
Related reading in this stage
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-typed-json-contracts
https://thamer.org/docs/wab-sdk-authentication-credential-management
