arrow_backBack to product
Guides3 guides

Get up and running fast

Everything you need to know — all in one place.

Install the JavaScript SDK

Get the FireWorks JS SDK running in your project and make your first API call in under 10 minutes.

1

Install via npm

Run `npm install @fireball/sdk` in your project. The package includes TypeScript types, full JSDoc annotations, and tree-shaking support for minimal bundle size.

2

Initialize the client

Import the SDK and create a client with your API key from FireStation. The client handles authentication, retries, and connection pooling automatically.

3

Make your first call

Use `client.rounds.create()` to start a game round and `client.rounds.settle()` to resolve it. Both methods return typed responses with full error information.

4

Handle events

Subscribe to round events using the built-in event emitter. This lets you react to wins, timeouts, and state changes in real time without polling.

Connect Your Game Server

Wire up your game server to Fireball using the server-side SDK for secure round management.

1

Choose the right SDK

FireWorks offers both client-side (browser/mobile) and server-side (Node.js, C#, Python, Go) SDKs. Server-side SDKs handle sensitive operations — use them for round settlement and financial logic.

2

Configure authentication

Server SDKs use a separate secret key with elevated permissions. Store it in an environment variable — never in source code. Rotate keys from FireStation without downtime.

3

Implement the round lifecycle

A complete round flows: initiate → bet accepted → game outcome resolved → settle. The SDK provides helpers for each step with built-in idempotency to prevent double-settlements.

4

Test with the sandbox

Point your server SDK to the Fireball sandbox endpoint during development. The sandbox simulates all round outcomes and operator responses without affecting real balances.

Publishing Your Own SDK

Create a community-maintained FireWorks SDK in a new language and earn hosting credits.

1

Review the SDK specification

The Fireball API is fully documented at fireball.readme.io. Your SDK must implement all required endpoints, match the authentication flow, and pass the compatibility test suite.

2

Follow the SDK template

Clone the FireWorks SDK template repository for your language. It includes the folder structure, test harness, and CI configuration that Fireball reviewers expect.

3

Submit for verification

Open a pull request in the FireWorks repository. Include passing test results, a usage README, and an example integration. The review process mirrors FireStarter submissions.

4

Maintenance and credits

Published SDKs earn an initial credit grant plus ongoing maintenance credits for each quarterly update. Community users can also contribute improvements through pull requests.