@flayerlabs/gamemode-gate 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +31 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -101,6 +101,37 @@ const app = createGameServerGate({
101
101
  })
102
102
  ```
103
103
 
104
+ The launch page reads `GET /config` before it lets anyone launch a coin through your game, and
105
+ `createGameServerGate()` serves that route only when you pass `announce` — without it the form
106
+ reports your gate as not answering. Add it to the options:
107
+
108
+ ```ts
109
+ const app = createGameServerGate({
110
+ // ...the options above...
111
+ announce: () => ({
112
+ chainId: 84532,
113
+ contracts: {
114
+ positionManager: '0x4E7cB1e6800a7B297B38BddcecAF9Ca5b6616FDC',
115
+ spendGatedCalculator: '0x8cbbE6b4cFA5Ccf68399Dbf1429d91A21097ebA5',
116
+ },
117
+ signer: signerAddress,
118
+ settler: signerAddress,
119
+ walletCapWei: '25000000000000000',
120
+ roundDurationMs: 90_000,
121
+ minLobbyLeadMs: 60_000,
122
+ gateEndsAtGraceS: 10,
123
+ flaunchVariant: 'legacy11',
124
+ requiresEoa: false,
125
+ accepting: true,
126
+ publicLaunchesOpen: true,
127
+ privateLaunches: false,
128
+ }),
129
+ })
130
+ ```
131
+
132
+ The addresses are per chain (the pair above is Base Sepolia); announce a signer you actually hold —
133
+ launches write it into their pools as the trusted signer. Verify with `curl https://<gate>/config`.
134
+
104
135
  Generate a random 256-bit award token, for example with `openssl rand -hex 32`. Keep it on the gate
105
136
  and authoritative game server. Never send it to the browser or use a memorable value.
106
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flayerlabs/gamemode-gate",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Server-authoritative rooms, economy, admission and registry for Flaunch Game Modes",
5
5
  "license": "MIT",
6
6
  "author": "Flayer Labs",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@fastify/cors": "^11.3.0",
47
47
  "@fastify/websocket": "^11.3.0",
48
- "@flayerlabs/gamemode-spec": "^0.4.0",
48
+ "@flayerlabs/gamemode-spec": "^0.4.1",
49
49
  "@types/node": "^22.10.2",
50
50
  "@types/pg": "^8.21.0",
51
51
  "fastify": "^5.11.3",