JRGS Casino API
ReferenceLaunch API

Launch API

RGS launch API, version 1.0.0: the rules that apply to every operation, and the operations.

RGS launch API, version 1.0.0. Download the document: launch.yaml.

The casino calls this API to start game sessions, to read its catalog, and to award its players free rounds. Amounts are integer micro-units: 1000000 = 1.00.

Every request is signed with the casino's Ed25519 key. The RGS keeps only the public key. The signed payload is four lines joined by "\n", with no trailing newline:

X-Timestamp
METHOD                  (as sent, e.g. POST)
path?query              (the request target exactly as sent: path, and "?" and
                         the query when there is one, same order and escaping)
hex(sha256(body))       (lower-case; for an empty body
                         e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855)

X-Signature is the standard base64 (with padding) of the 64-byte signature. X-Timestamp is unix seconds and may differ from the RGS clock by at most 60 s either way.

A key works while it and the casino are active and it is inside its notBefore/notAfter; a revoked key does not work. To rotate, add the new key in the backoffice (Setup, Keys: Rotate) and send the new key id once the backoffice shows it live. The old key keeps working for the overlap window chosen at rotation (7 days unless chosen otherwise, 1 hour to 30 days), then it is refused like an unknown key. Revoking ends a key at once. A key carries scopes (each operation names its own in x-scope) and the networks (CIDRs) requests may come from; a key with no networks is refused from everywhere. The free rounds operations take their own scope, free_rounds: grant it to a key deliberately.

Checks run in this order and the first failure answers: the body is read (at most 1 MiB), the timestamp, the key and signature (an unknown key reads as a bad signature), the scope, the source address. Only then does the operation run.

Every error has the same body, Error. A 400 is a refusal: do not retry it unchanged. Fix the request, or wait for the configuration it names to change (ERR_WALLET_NOT_CERTIFIED, ERR_VAL game and ERR_ATE market depend on market, game and wallet configuration that can change). A 404 is a free rounds award the RGS does not keep. A 401 is a signing or key problem. A 500 is ours and always retryable; its message never says more than "service is unavailable", and the requestId finds it in our logs.

Operations

On this page