Public application and observation routes
| Method and path | Purpose | Parameters and response |
|---|---|---|
POST / | Mempool health and epoch status. | MempoolStatusRequest; returns MempoolStatusResponse. TODO: confirm request fields from the Pydantic model declaration. |
POST /threshold-access/nonces/consume | Consume a public threshold-access nonce after wallet/device proof validation. | JSON proof request; returns a source-defined nonce-consumption record. |
POST /tin-operations | Submit a TIN creation or update operation. | JSON operation request; returns PublicTinOperationRecord; idempotency and route validation are source-defined. |
POST /intents | Submit an idempotent signed payment intent. | JSON CreateIntentRequest; returns PublicMempoolIntent. paymentId is the idempotency key. |
GET /tin-operations | List public TIN operation records. | Optional status and intent_type; returns PublicTinOperationRecord[]. |
GET /tin-operations/{intent_id} | Read one public TIN operation. | Required path intent_id; returns PublicTinOperationRecord; 404 when missing. |
GET /metrics | Read Node uptime and settlement metrics. | No parameters; returns MetricsResponse. |
GET /settlement-networks | Read destinations that pass registry and live-liquidity checks. | No parameters; returns ready route objects; 503 when the registry is invalid. |
GET /network/overview | Read aggregate Cranker, liquidity, and intent state. | No parameters; returns NetworkOverviewResponse. |
GET /epoch/status | Read current epoch state. | No parameters; returns EpochStatus. |
Worker and Cranker routes
All rows in this table requirex-api-key via require_worker_api_key unless the source says otherwise.
| Method and path | Purpose | Parameters and response |
|---|---|---|
POST /internal/wake | Wake the Receiver verifier. | No body; returns { ok, status }; 503 if the verifier is not ready. |
POST /internal/settlement-authorizations/settlement | Mint one-time payout authorization for a leased settlement. | JSON { workId, crankerPubkey }; returns TSN_PAYOUT_AUTHORIZATION; 403/409/422 on lease or evidence failure. |
GET /intents | List worker-visible intents. | Optional status; returns PublicMempoolIntent[]. |
PATCH /intents/{intent_id}/status | Update worker lifecycle data. | Path intent_id, UpdateStatusRequest; returns MempoolIntent; 404 when missing. |
GET /intent-work | Read pending payment-intent work. | Optional limit 1–500, default 50; returns IntentWorkItem[]. |
POST /crankers/heartbeat | Record a Cranker’s liveness. | CrankerHeartbeatRequest; returns CrankerHeartbeatRecord. |
GET /tin-operations/verification-work | List TIN operations awaiting verification. | Optional limit 1–500, default 50; returns TinOperationRecord[]. |
GET /tin-operations/fee-work | List operations awaiting fee commitment. | Optional operator_pubkey, limit; returns TinOperationRecord[]. |
GET /tin-operations/registry-work | List operations awaiting registry submission. | Optional operator_pubkey, limit; returns TinOperationRecord[]. |
POST /tin-operations/{intent_id}/verified | Mark a TIN operation verified. | Path intent_id, TinOperationStageRequest; requires verifier Cranker. |
POST /tin-operations/{intent_id}/fee-committed | Commit the operation fee. | Path intent_id, TinOperationStageRequest; requires a valid submitter and lifecycle state. |
POST /tin-operations/{intent_id}/submitted | Record an on-chain submission. | Requires submitter and transaction signature in TinOperationStageRequest. |
POST /tin-operations/{intent_id}/finalized | Finalize and reconcile the operation. | Optional transaction signature; returns TinOperationRecord. |
POST /tin-operations/{intent_id}/failed | Mark an operation failed. | Optional failure reason; returns TinOperationRecord. |
POST /tin-operations/{intent_id}/rejected | Mark an operation rejected. | Optional reason; returns TinOperationRecord. |
POST /epoch/close | Close and archive the current epoch. | No body; returns EpochCloseResult. |
Application example
curl -X GET "$TSN_NODE_URL/settlement-networks"
import { TsnHttpClient } from "@trustlink/tsn-sdk";
const client = new TsnHttpClient({ baseUrl: process.env.TSN_NODE_URL! });
const routes = await client.get("/settlement-networks");
POST /intents requires the complete signed request produced by the SDK; do not hand-assemble its commitment fields in application code.
Source: server.py:3485-3640, server.py:3733-4007, server.py:4009-4290