Skip to main content

Module protocol

Module protocol 

Source

Modules§

identity_token
The identity token is the only carrier of a session’s name. The hub mints signed tokens (iss HUB_ISSUER, EdDSA, verified by the relay against the hub’s JWKS); a client that cannot reach the hub mints the same shape unsigned (iss SELF_ISSUER, alg UNSIGNED_ALG, empty signature) and the relay treats the name as unverified. Keep the claim shape in sync with manabrew-hub/src/auth/token.rs.
state_delta

Structs§

ChatMessage
Deck
DraftConfig
EnginePlayStats
IdentityProof
PlayerDeckInfo
PlayerInfo
ResumeRoomRequest
RoomInfo
RoomPlayerInfo
SealedConfig

Enums§

ChatScope
ClientMessage
ClientPlatform
EngineKind
GameFormat
LocalGameKind
A game running on the player’s own machine, which the relay never sees.
RoomStatus
ServerMessage
StateEnvelope
Typed envelope carried inside ClientMessage::BroadcastState.state / ServerMessage::StateUpdate.state. One discriminator (kind) plus the payload for that variant. Constructed and parsed in every layer that touches the relay (engine, bot, host, web/Tauri UI) — anything that needs to handcraft json!({"kind": "..."}) belongs here instead.

Constants§

CHAT_HISTORY_MAX_AGE_MS
CHAT_HISTORY_MAX_MESSAGES
CHAT_MESSAGE_MAX_CHARS
CHAT_MIN_INTERVAL_MS
DEFAULT_RECONNECT_TIMEOUT_S
FEATURES
FEATURE_CHAT
Names ClientMessage::SendChat in AuthResult::features.
FEATURE_LOCAL_GAME
Names ClientMessage::SetLocalGame in AuthResult::features.
FEATURE_ROOM_INVITES
Names ClientMessage::InviteToRoom in AuthResult::features.
PROTOCOL_VERSION