open-rgs

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

bun add @open-rgs/core @open-rgs/contract @open-rgs/platform-mock
import { createServer, binaryTransport, loadLuaMath } 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 loadLuaMath("./maths/spin.lua"), stakeMultiplier: 1 } },
  }),
  platform:  new MockPlatform({ startingBalance: 100_00 }),
  transport: binaryTransport({ port: 80 }),
});

Start here

Reference

Source