Aller au contenu principal

Chain — /api/chain/*

Every endpoint scopes to a state machine via the :slug parameter. Authentication is via Bearer zsm_… token (or zeq_auth_token cookie for browser flows). Read endpoints honour is_public for anonymous access; write endpoints always require requireAuth plus the operator role.

Source: shared/api-core/src/routes/chain.ts.

Endpoints

MethodPathAuthNotes
POST/api/chain/state-machinesBearerSpin up a state machine; auto-mints default zsm_ key.
GET/api/chain/state-machinesoptionalList caller's machines + all public machines.
GET/api/chain/state-machines/:slugoptionalMachine metadata.
POST/api/chain/:slug/eventBearer (operator+)Catch-all event log.
POST/api/chain/:slug/stateBearer (operator+)State-hash snapshot.
POST/api/chain/:slug/fileBearer (operator+)File-hash event with metadata.
POST/api/chain/:slug/connectionBearer (operator+)Inbound/outbound connection event.
POST/api/chain/:slug/tx/submitBearer (operator+)Contract transition stub. Returns 501 — use /contracts/:id/transition instead.
GET/api/chain/:slug/stateoptionalLatest state row.
GET/api/chain/:slug/block?zeqond=NoptionalSnapshot at Zeqond N.
GET/api/chain/:slug/explore?from=A&to=BoptionalPaginated chain range.
GET/api/chain/:slug/explore/sseoptionalLive SSE feed.
GET/api/chain/:slug/pohc/validateoptionalProof-of-Harmonic-Convergence entangled state integrity check.
GET/api/chain/aggregate/listnonePublic registry of every is_public state machine.
GET/api/chain/aggregate/ssenoneAggregated public event stream.

Rate limits

  • Spin-up: 10 / min / IP
  • Writes: 600 / min / state machine
  • Reads: 120 / min / state machine

See also