# BetPlug > Provably-fair multi-tenant Remote Gaming Server (RGS) serving deterministic fixed-point house games across Instant, Stateful Session, Originals Slots, shared Live Shows, and per-operator Live Tables, with signed REST & seamless wallet APIs (`betrail-v1` / `betrail-v1-answer` + RFC 8032 `ed25519=`), transactional outbox webhooks, vector-only embedded clients, four zero-dependency official SDKs, a remote MCP server, and a Claude Code plugin. ## Quick facts & invariants - **Example hostnames:** `https://api.betrail.example` (REST), `https://play.betrail.example` (isolated play host), `wss://live.betrail.example/v1/live/{game}` (live WebSockets), `https://mcp.betrail.example/mcp` (MCP), `https://betrail.example` (site & docs). - **Signing schemes:** Operator REST requests and webhooks use 6-line `betrail-v1` HMAC-SHA256 (`Betrail-Timestamp`, `Betrail-Nonce`, `Betrail-Signature: v1=...`). Seamless wallet answers sign 6-line `betrail-v1-answer` with RFC 8032 `ed25519=` (no-downgrade pinned once registered) or `v1=`, including signed `4xx` refusals; never sign unauthenticated `401` responses. - **Money & wallet invariants:** All monetary amounts and multipliers are exact decimal strings (`Amount`), never JSON floats. `payout` already includes `refund` (`GGR = stake - payout`). Key wallet idempotency strictly on `transaction_id` (never `round_id`), record rollback tombstones, and never refuse `/credit` or `/rollback` for balance, limits, or player status. Live multiplayer games always require a seamless wallet. - **Full catalog availability:** Every catalog game is mounted and served across `sandbox` and `live` (unknown slugs return `404 unknown_game`; policy/brand exclusions such as `MINES (12, 11)` or live demo launches return `409 not_offered`). `MEME_TRADE` v2 runs in `sandbox` and `live` with position adds refused, mid-round force-close retired, outage void/refund active, and zero cross-operator crowd figures. - **Checkout packages & sandbox-only keys:** Consume `./sdk/{ts,go,python,php}`, `./clients`, `./mcp`, `./claude-plugin`, and `./examples/{next,go,laravel}-casino` directly from your verified repository checkout. Use only sandbox `btr_test_` credentials in development, CI, MCP, and AI agents. ## Core integration guides - [BetPlug developer documentation](https://betrail.example/docs.md): Integration path decision matrix, non-negotiable money and signing invariants, and concise headless SDK quickstart. - [Getting started: credentials, brand configuration & local stack](https://betrail.example/docs/getting-started.md): 5-minute local stack quickstart, Valkey's 330 s epoch, Console onboarding, production deployment knobs, Console insights, and going live. - [Authentication, signing, and idempotency](https://betrail.example/docs/authentication-and-signing.md): API keys, session tokens, 6-line betrail-v1 / betrail-v1-answer HMAC-SHA256 & Ed25519 wire examples, Idempotency-Key retries, and RFC 9457 errors. - [Seamless wallet protocol](https://betrail.example/docs/seamless-wallet.md): Drop-in SDK WalletHandler, debit-timeout rollback/tombstone flow, callback schemas (/balance, /debit, /credit, /rollback), signed 4xx refusals, and 29-check tester. - [Embed mode, launch tokens, and message bridge](https://betrail.example/docs/embed-and-launch.md): Single-use 60 s launch tokens, Web Component & play iframe, live demo/replay, betrail:v1 bridge, white-label theming, CSP/SRI, and reality checks. - [Webhooks (`round.settled`, `credits.low`, `credits.exhausted`)](https://betrail.example/docs/webhooks.md): Outbox retry schedule (1 s to 15 m over 24 h), credit-alert emails, raw-byte verification across all 4 SDKs, and JSON payloads for round.settled, credits.low, and credits.exhausted. ## Games, live protocol & provable fairness - [Game catalog, live games protocol & reference casinos](https://betrail.example/docs/live-games-and-catalog.md): Unified live game catalog across Instant, Session, Slots, Live Shows, and Live Tables, WebSocket state machine and frame examples, tenant isolation, and reference casinos. - [Provable fairness & verification](https://betrail.example/docs/dice-and-fairness.md): Commit-reveal seed lifecycle, pre-draw vs post-draw void rounds, all legacy RNG recipes (dice-sha512, hmac-nonce bcmath-12, plinko-hmac), FairRandom, and live hash chains. ## SDKs, MCP & AI tooling - [Official SDKs (TypeScript, Go, Python & PHP)](https://betrail.example/docs/sdk.md): Zero-dependency TypeScript, Go, Python, and PHP SDKs: install & first-call quickstarts, exact integer-atom money helpers, Ed25519 wallet answers, and runnable samples. - [Remote MCP server (`@betrail/mcp`)](https://betrail.example/docs/mcp.md): Remote Streamable HTTP MCP server (@betrail/mcp), OAuth 2.1 + PKCE delegation, 12 tools (incl. 6-probe wallet tester), all betrail:// resources, and 4 guided prompts. - [Build with Claude Code](https://betrail.example/docs/claude-code.md): Official Claude Code plugin (./claude-plugin v0.1.0), pinned manifest identity, MCP origin wiring, and /betrail-integrate sandbox workflow. ## API reference - [REST & AsyncAPI reference](https://betrail.example/docs/api-reference.md): REST API, seamless wallet callbacks, AsyncAPI live/webhook protocol, shared HTTP error/retry matrix, JSON examples, and component schemas compiled from OpenAPI 3.1 & AsyncAPI 3.1. ## Optional - [Full concatenated documentation (`/llms-full.txt`)](https://betrail.example/llms-full.txt): Single-file bundle with Table of Contents, Quick Integration Cheatsheet, complete game parameter/action/RNG matrix, and all canonical `.md` guides. - [OpenAPI 3.1 specification (`/api/openapi.yaml`)](https://betrail.example/api/openapi.yaml): Complete machine-readable REST, session, and seamless wallet callback specification. - [AsyncAPI 3.1 specification (`/api/asyncapi.yaml`)](https://betrail.example/api/asyncapi.yaml): Complete machine-readable live WebSocket (`joinTicket`) and operator webhook (`round.settled`, `credits.low`, `credits.exhausted`) specification.