API reference

Game server

How the browser talks to the arena. Documented so you know what it sends; it is not a public API.

Flow#

StepWhat happens
ConnectThe browser opens a WebSocket to the game server (the address is gameWsUrl in /api/config, or /ws on this site)
Sign inThe server sends a one-time nonce; the wallet signs a text message containing it. The server checks the ed25519 signature and returns a session token, so later visits don't need a new signature. Guests skip this step
JoinThe browser asks to join with a fighter look; the server places it in an arena
InputsAbout 30 times a second: movement direction, aim point, charging, scooping
SnapshotsAbout 30 times a second: every fighter's position and state, plus events (throws, hits, freezes, presents)

What the server trusts#

Inputs only

The server never accepts a position, a hit or a score from a browser. It runs the arena at 30 Hz from inputs, caps how many inputs it takes per tick, and counts hits under the fair-play rules. A modified client can only send the same inputs a normal one can.

Spectators#

A spectator connection receives snapshots of the busiest arena without joining it. The home page hero uses one.