@octane-rgs/engine
v1.0.2
Published
Maths engine SDK for Octane RGS — settlement, RNG, round data
Downloads
723
Readme
@octane-rgs/engine
Standalone SDK for maths engines integrating with Octane RGS. Provides settlement, RNG, and round data management.
This package has no dependency on @octane-rgs/core — it is self-contained for engine microservices.
Install
npm install @octane-rgs/engineQuick Start
import { OctaneEngineClient } from "@octane-rgs/engine";
const rgs = new OctaneEngineClient({
baseUrl: "https://your-rgs.example.com",
apiKey: "your-engine-api-key",
});
// Generate random numbers
const { values } = await rgs.getRng({ roundId, count: 6 });
// Update round data with game results
await rgs.updateRoundOutcome(roundId, {
grid: [[1, 2, 3], [4, 5, 6]],
winLines: [0, 2],
});
// Settle the round (closes round + pays out)
await rgs.settle({
roundId,
gameType: "dice",
closeRound: true,
multipliers: [
{ betOption: "over-50", multiplier: 2 },
],
});API
| Method | Description |
|--------|-------------|
| settle(params) | Settle a round (supports closeRound flag) |
| updateRoundOutcome(roundId, data) | Store game outcome data on a round |
| getRng(params) | Generate provably fair random numbers |
| revealSeed(params) | Reveal server seed for verification |
