{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Announces that a game exists and is taking players. Written by the host, from their own PDS, to their public repo (rkey = game id). Players join by giving the game server the game's 4-character code; the code itself is never published. codeHash is an HMAC of the code under the space host's secret key: unkeyed, all ~1M codes could be hashed in about a second. The server indexes lobbies by codeHash and hashes the code a player gives it.",
"key": "any",
"record": {
"properties": {
"codeHash": {
"description": "HMAC-SHA256 of the normalized code under the space host's secret key (base64url).",
"maxLength": 128,
"type": "string"
},
"createdAt": {
"format": "datetime",
"type": "string"
},
"expiresAt": {
"description": "After this the code no longer admits anyone.",
"format": "datetime",
"type": "string"
},
"game": {
"maxLength": 64,
"type": "string"
},
"spaceHost": {
"description": "The game server hosting the game's spaces; the only party that can check codes.",
"format": "did",
"type": "string"
}
},
"required": [
"game",
"spaceHost",
"codeHash",
"createdAt",
"expiresAt"
],
"type": "object"
},
"type": "record"
}
},
"id": "games.cavu.tier-madness.lobby",
"lexicon": 1
}