@octane-rgs/instant
v1.0.3
Published
Instant-resolution game SDK for Octane RGS — playRound, gameAction
Readme
@octane-rgs/instant
SDK for instant-resolution games on Octane RGS. Handles sessions, play-round, multi-step game actions, and queries.
Install
npm install @octane-rgs/instantQuick Start
import { OctaneInstantClient } from "@octane-rgs/instant";
const rgs = new OctaneInstantClient({
baseUrl: "https://your-rgs.example.com",
apiKey: "your-api-key",
});
const { sessionToken } = await rgs.launch({
externalPlayerId: "player-123",
tableSessionId: crypto.randomUUID(),
tableGameCode: "dice",
currency: "USD",
});
// Play a round (places bet + resolves via maths engine in one call)
const { roundId, remainingBalance, gameResult } = await rgs.playRound({
sessionToken,
bets: [{ betOption: "over-50", amount: 500 }],
requestId: crypto.randomUUID(),
});
// For multi-action games (blackjack, gamble features):
const actionResult = await rgs.gameAction({
sessionToken,
roundId,
action: "hit",
});API
Sessions
| Method | Description |
|--------|-------------|
| launch(params, apiKey?) | Create a player session |
| operatorInfo(apiKey) | Get operator details and bet config |
| getBalance(sessionToken) | Get player balance from operator wallet |
| getPlayerSession(sessionToken) | Get session details |
| markStarted(sessionToken) | Mark session as started |
| realityCheck(sessionToken) | Session duration, total wagered, net position |
Table Sessions
| Method | Description |
|--------|-------------|
| upsertTable(params) | Create or update a table session |
| endTable(tableSessionId, endedAt) | End a table session |
| getTableSession(tableSessionId) | Get table session details |
| lobbies(publicOnly?) | List active table sessions |
| activeByGame(gameCode) | Find active table by game code |
| activeByAvatar(slug) | Find active table by avatar slug |
| activeByAvatarGame(avatarName, gameName) | Find active table by avatar + game |
| updateRoomStates(params) | Batch update room states (active/dormant) |
| cleanup(params) | Find and mark stale sessions as dead |
Game Play
| Method | Description |
|--------|-------------|
| playRound(params) | Place bet and resolve via maths engine in one call |
| gameAction(params) | Send a game action for multi-step games (hit, stand, gamble, collect) |
Queries
| Method | Description |
|--------|-------------|
| roundWinners(roundId) | Get winners for a round |
| lastPayout(sessionToken) | Get last payout amount |
| betStatistics(roundId, sides) | Get bet distribution stats |
| playerHistory(sessionToken, limit?, offset?) | Get player bet/payout history |
| roundHistory(tableSessionId, limit?) | Get round history for a table |
Free Rounds
| Method | Description |
|--------|-------------|
| getFreeRounds(playerId, gameCode?) | Get active free round grant |
Self-Exclusion
| Method | Description |
|--------|-------------|
| excludePlayer(params) | Self-exclude a player for a duration |
| getExclusionStatus(externalPlayerId) | Check exclusion status |
