The Deterministic API Contract

permalink SUBTC
#api#contract#deterministic

A blockchain transaction is probabilistic.
An API contract must not be.
When an application sends:
POST /v1/btc?mode=wallet_send
It is not asking the node to “try.”
It is declaring intent.
A deterministic API contract defines:
Input schema
Execution boundaries
Response schema
Error normalization
Retry behavior
Nothing implicit.
The request must contain:
wallet_id
destination address
amount
idempotency key
The response must contain:
transaction identifier
execution state
error structure (if any)
No undefined states.
No chain-specific formatting leaks.
No ambiguous responses.
If the same request is submitted twice with the same idempotency key:
The same result is returned.
Not a new broadcast.
Not a duplicate transaction.
Determinism does not remove blockchain uncertainty.
It constrains application behavior around it.
A node exposes RPC primitives.
A protocol layer exposes a deterministic contract.
This difference is structural.
Without a contract, integration scales entropy.
With a contract, integration scales predictably.
Determinism begins at the API boundary.