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
GameOutcomeReport
Engine slots (player-N), never usernames: the relay holds the seat map and does not take a name from a client.
IceServer
An ICE server, shaped like the RTCIceServer dictionary.
IdentityProof
PlaneQualityReport
One end’s account of one direct-plane attempt. Every field is a client claim.
PlayerDeckInfo
PlayerInfo
ResumeRoomRequest
RoomInfo
RoomPlayerInfo
SealedConfig
SeatTransportReport
How one seat’s game traffic travelled, reported by the room’s engine host.
TransportEndpoint
A peer’s addressing information for the direct data plane.
TransportMember
One room member’s endpoint. username is relay-attested, never client supplied.

Enums§

ChatScope
ClientMessage
ClientPlatform
EngineGate
Why the client is or is not running the engine in its own browser. The relay never acts on it; it exists so the hosted-node population can be told apart from the browsers that chose not to use it.
EngineKind
GameFormat
LocalGameKind
A game running on the player’s own machine, which the relay never sees.
RoomStatus
ServerMessage

Constants§

CHAT_HISTORY_MAX_AGE_MS
CHAT_HISTORY_MAX_MESSAGES
CHAT_MESSAGE_MAX_CHARS
CHAT_MIN_INTERVAL_MS
DEFAULT_RECONNECT_TIMEOUT_S
FEATURES
FEATURE_CARD_COSMETICS
FEATURE_CHAT
Names ClientMessage::SendChat in AuthResult::features.
FEATURE_GAME_OUTCOME
Names ClientMessage::ReportGameOutcome in AuthResult::features.
FEATURE_LIMITED_DRAFT_CLOCKS
FEATURE_LIMITED_SESSIONS
FEATURE_LIMITED_SESSION_RECOVERY
FEATURE_LOCAL_GAME
Names ClientMessage::SetLocalGame in AuthResult::features.
FEATURE_PEER_SIGNAL
Names ClientMessage::SignalPeer in AuthResult::features.
FEATURE_PLANE_QUALITY
Names ClientMessage::ReportPlaneQuality in AuthResult::features.
FEATURE_ROOM_INVITES
Names ClientMessage::InviteToRoom in AuthResult::features.
FEATURE_ROOM_TRANSPORT
Names ClientMessage::AnnounceTransport in AuthResult::features.
MAX_CANDIDATE_PAIR_BYTES
Longest candidate_pair the relay records.
MAX_FATAL_MESSAGE_CHARS
Longest fatal_message the relay keeps.
MAX_PLANE_MS
Longest duration the relay records; ten minutes.
MAX_SIGNAL_BYTES
Largest signalling blob the relay forwards.
PLANE_OUTCOMES
Outcomes the relay records; anything else is dropped.
PLANE_OUTCOME_CONNECTED
PLANE_OUTCOME_FAILED
PLANE_OUTCOME_TIMEOUT
PLANE_PHASE_MEASURED
PLANE_PHASE_SETTLED
PROTOCOL_VERSION
TRANSPORT_KIND_WEBRTC
Names for TransportEndpoint::kinds.
TRANSPORT_WEBRTC
A browser pair on an RTCDataChannel.