-
-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Richard Fu edited this page Jan 3, 2026
·
4 revisions
Welcome to the comprehensive documentation for the Stake Engine Client - a lightweight TypeScript client for RGS (Remote Gaming Server) API communication.
- Getting Started with Demo - Set up and test with Stake Engine console
- Package Integration - Install and use in your own project
- URL Parameters - Browser-friendly configuration
- authenticate - Player authentication
- play - Play a round (place bet and start)
- endRound - End betting rounds
- getBalance - Get player balance
- endEvent - Track game events
- replay - Fetch historical bet data for replay
- forceResult - Search for specific results (testing)
- replay - Fetch replay data from RGS
-
Replay Helpers -
isReplayMode()andgetReplayUrlParams()
- StakeEngineClient Class - Custom client instances
- Low-Level Fetcher - Direct HTTP client
- Amount Conversion - Understanding format conversions
- TypeScript Types - Type definitions and interfaces
- Common Usage Patterns - Real-world examples
- Error Handling - Handling API errors and edge cases
- Browser Integration - Using in web applications
- Node.js Integration - Server-side usage
- Common Issues - Solutions to frequent problems
- Status Codes - Complete reference of RGS status codes
- Debug Guide - Debugging tips and tools
- 🚀 Lightweight - Only essential RGS communication code
- 📱 Framework Agnostic - Works with any JavaScript framework
- 🔒 Type Safe - Full TypeScript support with auto-generated types
- 🎯 Simple API - High-level methods for common operations
- 🔧 Configurable - Low-level access for custom implementations
- 💰 Smart Conversion - Automatic amount conversion between formats
- 🌐 Browser Friendly - URL parameter fallback for easy integration
- 🔄 Replay Support - Fetch and replay historical bet data
npm install stake-engine-clientimport { authenticate, play } from 'stake-engine-client';
// Authenticate (uses URL params if available)
const auth = await authenticate();
// Play a round
const result = await play({
currency: 'USD',
amount: 1.00,
mode: 'base'
});
console.log('Round ID:', result.round?.roundID);
console.log('Payout:', result.round?.payoutMultiplier);MIT License - see the LICENSE file for details.
Need help? Check the Common Issues page or create an issue on GitHub.