Base URL: /api
Request and response types are defined in Typescript here.
All responses are wrapped in the ResultResponse<T> type. If a response is an error then the ErrorResponse type is returned.
Returns indexer status, current height, version and availability.
Response: Info
Query Parameters (BlockQuery):
cursor?: number– cursor-based paginationoffset?: number– offset-based pagination (mutually exclusive with cursor)limit?: number(default: implementation-defined)order?: "asc" | "desc"(default: desc)relevant?: boolean– only blocks containing indexed transactions
Response: PaginatedResponse<BlockRow>
Latest indexed block.
Response: BlockRow
Path Param: height_or_hash – block height (as number string) or block hash (hex)
Response: BlockRow
404 if not found
Path Param: height – block height
Response: PaginatedResponse<TransactionRow>
Query Parameters (TransactionQuery):
- same pagination fields as
BlockQuery height?: numbercontract?: string– filter by contract address
Response: PaginatedResponse<TransactionRow>
Response: TransactionRow
404 if not indexed
Parses the transaction and returns every detected op with its execution result (if any).
Response: OpWithResult[]
Inspects an arbitrary transaction hex (does not need to be indexed).
Request Body: TransactionHex
Response: OpWithResult[]
Simulates the execution of a transaction's operations. Useful for testing transaction before broadcasting.
Request Body: TransactionHex
Response: OpWithResult[]
Full compose (commit + reveal) in one call.
Request Body: ComposeQuery
Response: ComposeOutputs
Only the commit phase (for 2-step reveals).
Request Body: ComposeQuery
Response: CommitOutputs
Only the reveal phase (when you already have a commit).
Request Body: RevealQuery
Response: RevealOutputs
List all deployed contracts.
Response: ContractListRow[]
Path Param: address – contract address (as string)
Response: ContractResponse
404 if contract not found
503 if indexer runtime is not available
Execute a read-only view expression against the contract state.
Path Param: address – contract address
Request Body: ViewExpr
Response: ViewResult
503 if indexer runtime is not available
Query Parameters (ResultQuery):
- same pagination fields as others
height?: numberstart_height?: number (mutually exclusive with height)contract?: stringfunc?: string (requires contract)
Response: PaginatedResponse<ResultRow>
Path Param: id – txid_inputIndex_opIndex (e.g. a94a8f..._0_0)
Response: ResultRow | null
Base URL: /ws
Upon connection, the client will be subscribed to indexer events (see WsResponse).
Request: WsRequest
Response: WsResponse
POST /api/transactions/broadcast and POST /api/transactions/reconcile accept
{"transactions": ["<signed transaction hex>", "<signed child hex>"]} in dependency
order. The broadcast route observes the exact bytes first, skips already observed
transactions, relays the remainder, then observes the full package again. The
reconcile route only observes and never publishes. All transaction hex is parsed
before any relay occurs. Malformed input returns HTTP 400.
Both return the usual result envelope containing:
{
"result": {
"outcome": "partial",
"transactions": [
{ "txid": "...", "wtxid": "...", "status": "accepted", "reason": null },
{ "txid": "...", "wtxid": "...", "status": "unknown", "reason": "not_observed: ..." }
]
}
}Entries retain request order and bind both transaction and witness identity.
Outcome is accepted when all exact transactions are observed, partial when
some are, or unknown when none are. Partial/unknown outcomes are successful HTTP
reports, not a claim that publication failed. A differing witness is reported as
unknown with a conflicting_witness reason. A lost HTTP response is also uncertain.
Callers must not free funding merely because a transaction is unobserved or a relay
was rejected. These observations are not confirmation, Kontor execution receipts,
or finality. Exact retry is safe to request, but may still be rejected by Bitcoin.
Fresh lookup bypasses the node's transaction cache. Confirmed transaction lookup
requires Bitcoin Core's txindex=1; an unavailable lookup stays unknown. This
prelaunch change replaces the old broadcast { txid } response. The SDK retains
signed submission recovery and funding ownership across uncertain outcomes.
GET /api/protocol is available independently of the normal API readiness gate.
It returns protocol availability, canonical protocol identity, certified progress,
installed protocols, and observation from one deferred database read transaction.
No Bitcoin RPC is performed for this request.
observation is null when authentic initialized canonical history is unavailable.
Otherwise it contains nullable bitcoin_tip and checkpoint members, each with
height (an exact decimal string) and hash (the full hexadecimal hash). Each
height belongs to its own row: checkpoints can be sparse. Rollback and replay can
replace both rows. A recovering or unsupported observation is diagnostic, not a
completed state suitable for cross-node equality checks.
Compare ready nodes on the expected chain at the same certified.closed_height.
Then compare the full certified decision, canonical protocol and lineage,
Bitcoin tip, and checkpoint height/hash. Do not group observations by the hash
under comparison. Different heights indicate lag or incomparable samples;
missing checkpoints cannot establish equality. These checks do not establish
that either node is caught up to the network.