CONTRACT · fidra:v1

Events

Every message the feed emits: the semantic fidra:v1 set your integration should pin to, the raw relay underneath it, the envelope, and the delivery guarantees.

LAST UPDATED 2026-07-27

Two channels, one envelope

Every message carries source: 'fidra' (from the feed) or 'fidra-host' (from you) and proto: 'fidra:v1'. Two families ride this channel:

Feed → host: semantic reference

messagepayloademitted when
fidra:v1:readyframe booted; reply with init
fidra:v1:session_startsessionIdonce per session, before any other message
fidra:v1:bet_placedgameId, amount, roundIda bet was accepted
fidra:v1:cashoutgameId, roundId, multiplier, winplayer cashed out
fidra:v1:round_settledgameId, roundId, payout, multiplierround closed — payout 0 = loss; a cashout emits this and cashout
fidra:v1:open_full_modegameIdcard expanded to full mode
fidra:v1:adapter_opengameIda provider/catalog card opened — the attribution event
fidra:v1:launch_requestref, noncefeed asks you for a tokenized launch URL; echo nonce in your reply
fidra:v1:catalog_reportreportafter catalog normalization — what was accepted/dropped and why
fidra:v1:errormessagefeed-side error surfaced to host
fidra:v1:eventpayload: TrackedEventthe raw relay — every tracked event

Host → feed

messagepayloadeffect
fidra:v1:init{payload: config}apply config (reply to ready); no init within 5s → demo config
fidra:v1:theme_update{payload: {theme?, accent?, accent2?}}live re-skin
fidra:v1:wallet_update{balance}assert the player's displayed balance
fidra:v1:launch_url / launch_error{nonce, url} / {nonce, reason?}reply to launch_request
fidra:v1:realtime_update{channel, data}push live tournament/community data
fidra:v1:currency_update{payload: {code, symbol?, decimals?, position?}}dual-rail session-currency switch — queues during an open round (Currency)
fidra:v1:pauseRG hook: inserts a breather card now; can only add, never remove
fidra:v1:destroyclean unmount before iframe removal

The envelope (raw relay)

fieldtypenotes
seqnumbermonotonic per session, from 1 — a reliable total order within one sessionId
tsnumberepoch ms at track time
sessionIdstringanonymous UUID, stable for the session
mode'static' | 'engine'which feed composition served the session
schemaVersionnumberthe frozen contract number — branch on it if you consume raw events
operatorId?stringyour tenant id, present in operator embeds — the multi-tenant join key
currency?stringthe session currency in force at track time (dual-rail) — money fields on the event are denominated in it; stamped, never rewritten on a later switch. See Currency
eventFeedEventthe event union — full catalog in docs/integration/EVENTS.md
feedContext?objectbet-shaped events only: cardId, cardIndex, precededBySameGame — the recorded basis of feed-attributed GGR
Schema version. The number is CI-frozen: any field change to the envelope or any event type fails the contract test unless the version is bumped in the same commit. Read the current value from SCHEMA_VERSION in apps/web/src/analytics.ts — that file and its contract test are authoritative over any prose, including this page.

Delivery guarantees — stated plainly

roundId correlation

The roundId on bet_placed is the same id used in the wallet RPC (bet_intent) — minted once per round, one open round per game. It is the single join key across analytics and money. Format: <sessionId-prefix>-<seq>.

source of truth: docs/integration/EVENTS.md · apps/web/src/analytics.ts · apps/web/src/bridge.ts fidra is a B2B software supplier — no gambling services operated, no player funds held. g.jgerenaia@tomsons.co