Skip to main content

TypeScript API

This reference is generated from the published package barrels. Start with the package that owns the task you are doing:

PackageOpen it when you need to…
@eigeninteractive/rulesImplement a GameModule, payload schemas, hooks, observations, ratings, or bots. This is where most game code lives.
@eigeninteractive/serverCompose the Cloudflare Worker with createEngine, BaseGameDO, bindings, deep links, avatars, or the public site.
@eigeninteractive/testkitRun twin fixtures, emit/check game-contract.json, or drive rules through the kernel in tests.
@eigeninteractive/server/testingMint local Firebase-compatible tokens and supply explicit no-op Firebase Admin effects for Worker integration tests. Never use it in production code.

Selling something is optional. The storefronts ship inside @eigeninteractive/server as separate entry points, so importing one carries only that one into your Worker and a game that sells nothing carries none:

Entry pointOpen it when you need to…
@eigeninteractive/server/commerce/google-playSell through Google Play Billing on Android: purchase verification, the acknowledgement Play refunds you for skipping, and developer notifications.
@eigeninteractive/server/commerce/stripeSell on the web through Stripe: hosted Checkout, Billing subscriptions, the customer portal, and signed webhooks.
@eigeninteractive/server/commerce/razorpaySell in India through Razorpay: payment links, subscriptions, and signed webhooks.
@eigeninteractive/server/commerce-kitWrite your own provider adapter. The Workers-side primitives the three above share.

Game Workers depend directly on rules and server; testkit and server/testing are test-only. The task guides show how the TypeScript and Dart halves fit together.

The kernel page is an engine internal. It remains available for debugging and contributors, but a game should not import it to implement rules or deploy a Worker. The D1 and Durable Object storage schemas are not documented here at all: they are private to the engine, and readGameRow returns a game row typed without them.