Skip to main content

Examples

Five patterns, each anchored to a real framework primitive. Each is ~50–100 lines, runnable as written, copy-pasteable. Replace ${ZSM_KEY} and ${SLUG} with your own.

PatternPrimitiveWhen to reach for it
Hash-chained IoT heartbeatPOST /api/chain/:slug/eventDevices that need an audited beacon every Zeqond.
LLM-agent compliance auditPOST /api/chain/:slug/event + contractEvery model call as a transition; chain proves what the agent saw and did.
Conditional release gatetimelock-release Foundations contractHold until N sign-offs or a deadline — no funds.
Machine-to-machine handshakecustom contract + cross-machine eventsTwo state machines negotiating a session, both chains witness.
Scientific instrument provenanceFile events + QM operator sequenceEvery reading hash-chained with operator id and CKO.

Every example assumes you've completed the spin-up tutorial and have:

export ZSM_KEY=zsm_…
export ZID=ZEQ07XXXXXXXXX
export SLUG=your-slug