Thing/packages/eve-contracts/README.md
2026-07-17 04:46:49 +01:00

841 B

@gamecult/eve-contracts

Canonical TypeScript types and runtime validators for Eve provider boundaries. The generated sources come from the JSON Schemas in ../../schemas; run npm run generate after changing an authoritative schema. npm test rejects schema drift.

import {
  parseEveProviderAdvertisement,
  parseEveSurfaceDocument,
  parseEveCommandInvocation,
  parseEveInputCapability,
} from "@gamecult/eve-contracts";

const provider = parseEveProviderAdvertisement(untrustedAdvertisement);
const surface = parseEveSurfaceDocument(untrustedSurface);
const command = parseEveCommandInvocation(untrustedCommand);
const input = parseEveInputCapability(untrustedInputCapability);

Providers own their state, surfaces, command acceptance, and receipts. This package owns only the portable contract and validation boundary.