API overview¶
HyperToken exposes a CRDT-native core plus the Engine facade. The public package
entrypoint is core/index.ts (published as dist/core/index.js).
The root export surface currently includes:
Token, Stack, Space, Source, Chronicle, ConsensusCore, Emitter,
mulberry32, shuffleArray, parseTokenSetObject, loadTokenSetJSON, and
Engine.
Storage adapters and network classes are not re-exported by core/index.ts; use
their documented deep module paths.
The most common path is:
- Create a
Chronicle. - Attach
Stack,Space, and/orSourcefacades to that same session. - Construct an
Enginewith those components. - Mutate through
await engine.dispatch(type, payload). - Observe
state:changedon the Chronicle orstate:updatedon the Engine.
All containers are views over one Automerge document. Tokens are immutable values. Concurrent changes merge using Automerge CRDT semantics; this is not transactional last-command-wins gameplay.
See Engine API, Token API, and the storage and network pages for operational integrations.