AI prompts
For agents without skill support, or when you would rather steer it yourself. Paste one of these into your assistant inside the project you are integrating.
Integrate the Beexar casino platform into this project using the official SDK.
Install: npm install @beexar/sdk (zero dependencies, ESM + CJS, Node 18+)Docs: https://docs.beexar.com/tools/sdk-node/
1. ANALYSE Find the HTTP router, the configuration layer, and the ledger/wallet code that owns player balances. Report what you found before writing anything.
2. IMPLEMENT a. Launcher — `new Client({ casinoId, apiSecret })` from BEEXAR_CASINO_ID and BEEXAR_API_SECRET. `launchReal()` returns { launch_url } for an iframe. b. Wallet callbacks — implement WalletHandler's four methods (balance, betWin, rollback, finish) against the existing ledger, and mount with `beexarWallet(new WalletServer(handler, { apiSecret }))` from '@beexar/sdk/express'. Mount it BEFORE any JSON body parser; if the app already uses express.json(), switch it to express.json({ verify: captureRawBody }). c. Inside betWin, in ONE database transaction: look up id_provider (return the stored id and stored balance if found); check the rollback tombstone (throw WalletError.alreadyRolledBack() if set); then apply, all-or-nothing. d. Money is the SDK's Money type — never a number, never parseFloat. e. Errors: throw WalletError.insufficientFunds(balance) and friends. Codes 100/105/106 require the balance as an argument.
3. VERIFY List changed files and the env vars I must set. Confirm it builds and any tests you added pass. Tell me to run the Integration Test Game (https://docs.beexar.com/guides/testing/) against the live callbacks.
Do not invent method names. If something in the SDK does not match this prompt,stop and tell me.Integrate the Beexar casino platform into this project using the official SDK.
Install: composer require beexar/sdk (zero dependencies, PHP 8.1+)Docs: https://docs.beexar.com/tools/sdk-php/
1. ANALYSE Find the HTTP routing (framework or none), the configuration layer, and the ledger code that owns player balances. Report what you found first.
2. IMPLEMENT a. Launcher — `new Beexar\Client($casinoId, $apiSecret)` from BEEXAR_CASINO_ID and BEEXAR_API_SECRET. launchReal() returns the URL for an iframe. b. Wallet callbacks — implement Beexar\WalletHandler's four methods against the existing ledger. With a framework, register Beexar\Http\WalletMiddleware BEFORE any body-parsing middleware. Without one, call $server->handleGlobals(). c. Inside betWin(), in ONE database transaction: look up id_provider (return the stored id and stored balance if found); check the rollback tombstone (throw WalletError::alreadyRolledBack() if set); then apply, all-or-nothing. d. Money is Beexar\Money — never a float. e. Errors: throw WalletError::insufficientFunds($balance) and friends. Codes 100/105/106 require the balance as an argument.
3. VERIFY List changed files and the env vars I must set. Confirm it runs and any tests you added pass. Tell me to run the Integration Test Game (https://docs.beexar.com/guides/testing/) against the live callbacks.
Do not invent method names. If something in the SDK does not match this prompt,stop and tell me.Integrate the Beexar casino platform into this project using the official SDK.
Install: go get github.com/beexar-games/beexar-go (stdlib only, Go 1.22+)Docs: https://docs.beexar.com/tools/sdk-go/
1. ANALYSE Find the HTTP mux, the configuration layer, and the ledger code that owns player balances. Report what you found before writing anything.
2. IMPLEMENT a. Launcher — beexar.NewClient(casinoID, apiSecret) from BEEXAR_CASINO_ID and BEEXAR_API_SECRET. LaunchReal returns LaunchURL for an iframe. b. Wallet callbacks — implement beexar.WalletHandler against the existing ledger and mount server.NewHandler() on the router. c. Inside BetWin, in ONE database transaction: look up IDProvider (return the stored id and stored balance if found); check the rollback tombstone (return beexar.ErrAlreadyRolledBack() if set); then apply, all-or-nothing. d. Money is beexar.Money — never a float64. e. Errors: return beexar.ErrInsufficientFunds(balance) and friends. Codes 100/105/106 take the balance as a parameter.
3. VERIFY List changed files and the env vars I must set. Confirm `go build ./...` and `go test ./...` pass. Tell me to run the Integration Test Game (https://docs.beexar.com/guides/testing/) against the live callbacks.
Do not invent identifiers. If something in the SDK does not match this prompt,stop and tell me.Integrate the Beexar casino platform into this project using the official SDK.
Install: pip install beexar (stdlib only, Python 3.9+)Docs: https://docs.beexar.com/tools/sdk-python/
1. ANALYSE Find the web framework, the configuration layer, and the ledger code that owns player balances. Report what you found before writing anything.
2. IMPLEMENT a. Launcher — Client(casino_id, api_secret) from BEEXAR_CASINO_ID and BEEXAR_API_SECRET. launch_real() returns the URL for an iframe. b. Wallet callbacks — a class with balance, bet_win, rollback and finish against the existing ledger, mounted with beexar.asgi.fastapi_router / flask_blueprint / asgi_app. Do NOT declare a Pydantic model on those routes: it consumes the raw body the signature covers. c. Inside bet_win, in ONE database transaction: look up id_provider (return the stored id and stored balance if found); check the rollback tombstone (raise WalletError.already_rolled_back() if set); then apply, all-or-nothing. d. Money is beexar.Money — never a float. e. Errors: raise WalletError.insufficient_funds(balance) and friends. Codes 100/105/106 require the balance as an argument.
3. VERIFY List changed files and the env vars I must set. Confirm the app starts and any tests you added pass. Tell me to run the Integration Test Game (https://docs.beexar.com/guides/testing/) against the live callbacks.
Do not invent method names. If something in the SDK does not match this prompt,stop and tell me.Integrate the Beexar casino platform into this project. There is no SDK for thislanguage, so implement directly against the public OpenAPI contract.
Specs (fetch them, do not guess): https://docs.beexar.com/api/wallet.yaml the four callbacks I implement https://docs.beexar.com/api/softswiss/gateway.yaml launching a session https://docs.beexar.com/api/gateway.yaml the game catalogue https://docs.beexar.com/api/common/schemas.yaml shared schemas
1. ANALYSE the router, the config layer and the ledger. Report first.
2. IMPLEMENT a. Signing: X-REQUEST-SIGN = lowercase hex HMAC-SHA256 of the RAW request body keyed with the API secret. Serialise the body ONCE, sign those exact bytes, send those exact bytes. Verify against the bytes as received — capture them before any JSON middleware. Compare in constant time. b. The four callbacks: POST /balance, /betwin, /rollback, /finish. c. Validate before handling: currency ^[A-Z][A-Z0-9_]{2,31}$ (reject lowercase, do not upcase); amount ^\d+(\.\d{1,16})?$, at most 40 chars, greater than zero — REJECT the exponent form; body at most 64 KiB. Do NOT reject unknown JSON fields. d. In ONE database transaction: dedupe on id_provider (a repeat returns the STORED id and STORED balance), then check the rollback tombstone (answer api_code 409), then apply all-or-nothing. e. On rollback, record a tombstone for original_id_provider whether or not the original exists; answer 200 with an empty id when there was nothing to reverse. f. Money is a decimal string in the currency's main unit. No floats anywhere. g. Errors: {"code":"invalid_argument"|"internal","msg":..., "meta":{"api_code":...,"api_message":...}}. Only HTTP 400 and 500 exist — a bad signature is 400 with api_code 403, never HTTP 403. api_code 100, 105 and 106 must also carry meta.balance.
3. VERIFY against the public conformance fixtures at https://github.com/beexar-games/public-api/tree/main/conformance — request bytes, signature, ledger before and after, expected response. Then tell me to run the Integration Test Game (https://docs.beexar.com/guides/testing/).