npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@octane-rgs/instant

v1.3.1

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/instant

Quick Start

import { OctaneInstantClient } from "@octane-rgs/instant";

const rgs = new OctaneInstantClient({
  baseUrl: "https://staging.octanestudios.ai",
  apiKey: "your-api-key",
});

const { sessionToken } = await rgs.launch({
  externalPlayerId: "player-123",
  tableSessionId: crypto.randomUUID(),
  tableGameCode: "dice",
  currency: "USD",
});

// Play a round — places bet, runs the local instant module, settles if resolved
const { roundId, remainingBalance, gameResult } = await rgs.playRound({
  sessionToken,
  bets: [{ betOption: "over-50", amount: 500 }],
  requestId: crypto.randomUUID(),
});
// remainingBalance reflects post-settlement balance when the game resolves immediately

// For multi-action games (blackjack, gamble features):
const actionResult = await rgs.gameAction({
  sessionToken,
  roundId,
  action: "hit",
});
// When the game resolves, the action response includes the settlement

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 | | redeemLaunch({ sessionToken }) | Single-use exchange of a launch URL token for the session; throws LaunchRedeemError (LAUNCH_ALREADY_REDEEMED, LAUNCH_EXPIRED) | | 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 | | activeByTableCode(tableCode) | Find active table by table code | | activeByAvatar(slug) | Deprecated: use activeByTableCode | | 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, run the instant game module, auto-settle if multipliers returned | | gameAction(params) | Send a game action for multi-step games — auto-settles when multipliers returned |

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 |

Changes

  • 1.3.0: core 1.3.0. redeemLaunch({ sessionToken }) and LaunchRedeemError for single-use, time-boxed launch tokens.
  • 1.2.0 (breaking): core 1.2.0. roundWinners entries and roundDetails players replace playerSessionId with playerRef, a stable pseudonym. The session id is the player's sessionToken, a bearer credential, so it is no longer returned by query endpoints.
  • 1.1.0: remainingBalance is now optional on play results (omitted when the wallet confirmed the debit but its balance could not be read; refresh the balance), and balance fields may be null.