@octane-rgs/core
v1.0.2
Published
Core SDK for Octane RGS — sessions, table management, queries
Readme
@octane-rgs/core
Base SDK for Octane RGS. Provides session management, table sessions, queries, and shared types.
Most consumers should use @octane-rgs/live (live/dealer games) or @octane-rgs/instant (instant-resolution games) instead — they extend this package and include all methods listed below.
Install
npm install @octane-rgs/coreQuick Start
import { OctaneRgsClient } from "@octane-rgs/core";
const rgs = new OctaneRgsClient({
baseUrl: "https://your-rgs.example.com",
apiKey: "your-api-key",
});
const { sessionToken } = await rgs.launch({
externalPlayerId: "player-123",
tableSessionId: "550e8400-e29b-41d4-a716-446655440000",
tableGameCode: "baccarat",
currency: "USD",
});
const { balance } = await rgs.getBalance(sessionToken);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 |
Queries
| Method | Description |
|--------|-------------|
| roundWinners(roundId) | Get winners for a round |
| lastPayout(sessionToken) | Get last payout amount |
| betStatistics(roundId, betOptions) | 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 |
