QuantumChain QTCN
MenuClose menu
Documentation QTCN / NETWORK

QUANTUMCHAIN

Explore the docs

Architecture · Payments · Protocol

DEVELOPERS · DESIGN GUIDE

API & SDK boundaries

Understand queries, submissions, proofs and events before relying on a response from a service.

8 min readReviewed 24 November 2026Markdown ↗

An interface has a specific job

The developer-platform design separates low-level node interactions, indexed queries, domain APIs, SDKs and tools. Each surface needs explicit schemas, environment identity, errors and access controls.

This is an architectural reference, not an executable endpoint catalog. No host, method path, package name or authentication scheme is invented here.

05 / EXPLORE AN INTERFACE CONTRACT

Know what the response means.

Expand a responsibility to inspect its evidence boundary.

QUERYRead a scoped view
REQUEST
State selector + network context
RESPONSE
A view with freshness and finality context

A service response alone is not a verified state proof.

SUBMITRequest an action
REQUEST
Authorized transaction + explicit environment
RESPONSE
Acknowledgement or a typed rejection

Acknowledgement is not final settlement.

PROVERetrieve evidence
REQUEST
Object or transaction + intended anchor
RESPONSE
A canonical proof package with context

The consumer must verify the proof against an accepted root.

OBSERVEFollow an event
REQUEST
Scoped subscription + correlation identity
RESPONSE
Status observations and recovery context

Duplicate delivery must not create duplicate value.

Responsibility labels, not HTTP verbs, method names or available endpoints.

Carry enough context to interpret the result

An SDK can help construct requests, prepare witnesses and track status. It must not become the source of canonical validation rules or silently guess a protocol behavior when exactness matters.

Carry enough context to interpret the result
ContextExpected treatment
Network and schema versionExplicit selection and rejection of unsupported combinations
Object or transaction identityStable correlation between requests and later observations
State and finality referenceDistinguish pending, included, finalized and historical data
Proof package where requiredReturn verifiable evidence bound to an appropriate root
Domain and access scopeSeparate public information from protected workflows

Treat submission and observation separately

Treat submission and observation separately
ObservationWhat it establishesWhat remains
Submission acknowledgedA service received or accepted a request for processingExecution and finality
Included but not finalizedAn inclusion observation under the reported stateThe applicable finality rule
FinalizedFinality under the verified chain contextAny separate payout or business obligation
Proof unavailableThe service could not supply the requested proofThis is not proof that the object does not exist

Streams are observations, not extra payments

The specification describes typed event streams and webhook-style delivery. Consumers need stable correlation, explicit status and recovery after interruption.

Reconcile durable state after a reconnect and handle repeated notifications without repeating a consequential action. A timeout during submission leaves the outcome uncertain; inspect the original request or transaction identity before creating another attempt. Exact retry and delivery guarantees require the implemented API contract.

Make errors and permissions explicit

Public lookups, protected reports and operator metrics have different access needs. Authentication and quotas do not replace transaction signing authority. The published implementation must document concrete schemas, supported versions, limits and recovery behavior.

Make errors and permissions explicit
Error familyClient response
Network or version mismatchStop and correct the context; do not silently switch networks
Invalid or unauthorized requestCorrect the request or authority instead of blind retries
Rate limit or unavailable serviceApply documented backoff and preserve request identity
Not found or proof unavailableReport the service result without inventing an absence proof
Conflict or expired requestRe-read authoritative state before further action