open-rgs

A small, MIT-licensed Remote Game Server. One Bun file boots a WebSocket, a TypeScript math module, and a wallet adapter.

bun add @open-rgs/core @open-rgs/contract @open-rgs/platform-mock
import { createServer, binaryTransport, loadTsMath } from "@open-rgs/core";
import { defineGame } from "@open-rgs/contract";
import { MockPlatform } from "@open-rgs/platform-mock";

await createServer({
  manifest: defineGame({
    id: "hello", declaredRtp: 0.95, defaultMode: "default",
    modes: { default: { math: await loadTsMath("./maths/spin.ts"), stakeMultiplier: 1 } },
  }),
  platform:  new MockPlatform({ startingBalance: 100_000 }),
  transport: binaryTransport({ port: 8080 }),
});

Start here

Reference

Source