RGS integration tools
Stake Engine Frontend Helpers — RGS client, money, bets, social mode
By Namz Games
Small, tested building blocks for the browser side of a Stake Engine game, whatever you render with.
- Launch parameters:
sessionID,rgs_url(bare hosts included),lang(social mode forces English),currency,device,social, replay links with an amount read by its shape. - RGS client: authenticate, play, end-round, balance,
/bet/eventand replay, with timeouts and typed errors whose messages are safe in social mode.settleRoundsends end-round only for a round that paid;resumableRoundrestores an interrupted round with its own bet; an event queue saves progress without ever blocking the game. - Money: integer amounts (1000000 = 1.00), Engine's currency table (GC/SC never with "quot;, BTC with 6 decimals), exact wins at $0.01 bets.
- Bets: ladders from the authenticate config with min, max and the default bet selectable;
canAffordso no play request goes out uncovered. - Social mode: Engine's restricted-word table, a checker that also finds words inside longer ones ("PAYLOAD"), and a CLI to run it over your strings in CI.
- Wins and flags: big-win tiers measured against the round cost, a count-up that ends exactly on the total, operator flags with safe defaults.
- Mock RGS for local development and tests.
Zero dependencies, ES modules, TypeScript declarations, 49 automated tests. Unofficial, not affiliated with Stake or Engine; Engine also publishes an official TypeScript client.