Stake Engine
Alongside XGENIA RGS, XGENIA ships nodes for Stake Engine — Stake's own remote game server. A Stake Engine game is built like any XGENIA project, but the wallet, round lifecycle and bet levels come from Stake's RGS.
The nodes are Pro Nodes, under Stake Engine in the node picker.
The protocol is Stake's — stake-engine.com/docs/rgs is the authority on it. This page covers the XGENIA side.
The round lifecycle
A round runs through four calls, one node each:
| Node | Role |
|---|---|
| RGS Authenticate | Opens the session. Returns the balance, game config, jurisdiction flags — and any round left unfinished last time. |
| RGS Play | Places a bet. Returns the bet id, payout, multiplier and round state. |
| RGS End Round | Closes and settles the round. |
| RGS Event | Sends a named event mid-round, for game-specific steps. |
Start with Authenticate, and check its Round Active output first: if the player closed the tab mid-spin, an unfinished round is waiting, and you must finish it before starting a new one. The Round object says where it got to.
Two nodes watch the session rather than drive it — prefer them over polling, since they also fire on changes your own graph didn't cause:
| Node | Role |
|---|---|
| RGS Balance Update | Pulses whenever the balance changes, for any reason. |
| RGS Round Active | Pulses when a round opens or closes. |
(RGS Balance re-reads the wallet on demand, when you do need to poll.)
Amounts
Stake Engine sends money as integers scaled by 1,000,000 — an API amount of 2500000 is 2.50. Four nodes handle the conversion so you never hard-code it:
| Node | Converts |
|---|---|
| RGS Parse Amount | API integer → decimal. |
| RGS To API Amount | Decimal → API integer. |
| RGS Display Amount | Balance object → formatted string for the UI. |
| RGS API Multiplier | The multiplier itself, for your own arithmetic. |
Ports named (API) — like Amount (API) and Payout (API) — are in the integer scale. Mixing the two conventions is the easiest mistake here: a bet of 1 is not one unit of currency but one millionth of one.
Configuration
Every call node has the same three config ports:
| Port | Purpose |
|---|---|
| URL (optional) | Override the RGS endpoint. Empty = the session's own. |
| Protocol | Protocol version. |
| Enforce Bet Levels | Reject a stake the operator doesn't permit before sending it. Leave on — a local failure you can show the player beats a round that dies at the server. |
Every call node reports Success, Failure and Error. Wire Failure. Refused bets and dropped sessions are normal events on a real network; a game that only handles Success will silently hang on them.
Publishing
Stake hosts the frontend, so publishing is an export: DEPLOY → Deploy to Stake → Pick folder. XGENIA writes the static frontend files there for you to upload to Stake.
This is unrelated to the XGENIA tab's RGS path — no game is created and no maths components are deployed. A Stake Engine game's maths runs on Stake's servers, and these nodes are how the frontend talks to it.