@chaos-overlords/contracts
v0.9.1
Published
Wire contracts shared by the multiplayer server and its clients: valibot request/response schemas, the event union, the error envelope, and one toad-contracts definition per endpoint.
Maintainers
Readme
@chaos-overlords/contracts
Wire contracts for the Chaos Overlords: New Chrome multiplayer server.
Valibot schemas for every multiplayer request, view and event, the error envelope, and one
defineApiContract per endpoint. The server mounts its routes from these and the clients decode
against them, so neither side types the wire format a second time.
import { createMatchContract, matchViewSchema } from '@chaos-overlords/contracts'Install
npm install @chaos-overlords/contractsRequires Node.js 22 or newer.
Documentation
The operator and contributor manual for the whole multiplayer workspace is in
multiplayer/README.md; the design notes are in
docs/MULTIPLAYER.md.
