{"openapi":"3.1.0","info":{"title":"KasOdds HTTP API","version":"EO/v10","description":"Non-custodial Kaspa game protocol. Agents, scripts, and bots are first-class clients: the HTTP API is the product and the browser is one client of it. There are no accounts. A wallet signs every prepared transaction it spends, and confirmed covenant state is authoritative. Read GET /api/config before acting; never choose a network yourself."},"servers":[{"url":"https://kasodds.com","description":"mainnet"}],"tags":[{"name":"Configuration"},{"name":"Matchmaking"},{"name":"Games"},{"name":"Relay"},{"name":"Feedback"},{"name":"Health"},{"name":"Docs"}],"paths":{"/healthz":{"get":{"summary":"Liveness probe","tags":["Health"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/readyz":{"get":{"summary":"Readiness probe","tags":["Health"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ready"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/config":{"get":{"summary":"Read the network identity","description":"The server owns the network. Never choose a chain yourself.","tags":["Configuration"],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkConfig"}}}}}}},"/api/visit":{"post":{"summary":"Report that the browser app loaded","tags":["Analytics"],"responses":{"202":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Accepted"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/feedback":{"post":{"summary":"Send anonymous feedback","tags":["Feedback"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}}},"responses":{"202":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Accepted"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/matchmaking/join":{"post":{"summary":"Join the public queue","tags":["Matchmaking"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakingJoinRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchState"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/matchmaking/room":{"post":{"summary":"Create a private friend room","tags":["Matchmaking"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakingRoomRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchState"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/matchmaking/code":{"post":{"summary":"Take the second seat by room code","description":"The code is case-insensitive and separators are ignored. This route has its own tighter rate limit.","tags":["Matchmaking"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakingCodeRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchState"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/matchmaking/{matchId}":{"get":{"summary":"Poll a matchmaking session","tags":["Matchmaking"],"parameters":[{"name":"matchId","in":"path","required":true,"schema":{"type":"string"},"description":"The matchmaking session id returned when you joined or created a room."},{"name":"address","in":"query","required":false,"schema":{"type":"string"},"description":"The wallet address asking for its role and side."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchState"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/matchmaking/{matchId}/join":{"post":{"summary":"Take the second seat by invite link","tags":["Matchmaking"],"parameters":[{"name":"matchId","in":"path","required":true,"schema":{"type":"string"},"description":"The private room id returned when the host created it."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchmakingSeatRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchState"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/matchmaking/{matchId}/leave":{"post":{"summary":"Leave a matchmaking session","tags":["Matchmaking"],"parameters":[{"name":"matchId","in":"path","required":true,"schema":{"type":"string"},"description":"The matchmaking session id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaveRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchState"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/matchmaking/{matchId}/bot":{"post":{"summary":"Offer the second seat to the fallback bot","description":"Only the waiting creator, only after the grace period, and only while the bot is free.","tags":["Matchmaking"],"parameters":[{"name":"matchId","in":"path","required":true,"schema":{"type":"string"},"description":"The matchmaking session id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BotOfferRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchState"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/games/prepare":{"post":{"summary":"Prepare the creation transaction","description":"Returns unsigned SafeJSON. Sign only your funding inputs and submit it unchanged otherwise.","tags":["Games"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreationRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreparedCreation"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/games/submit":{"post":{"summary":"Submit the signed creation transaction","tags":["Games"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequest"}}}},"responses":{"202":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResult"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/games/{gameId}":{"get":{"summary":"Read the authoritative game view","tags":["Games"],"parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"},"description":"The creation transaction id, 64 hex characters."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameView"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/games/{gameId}/join/prepare":{"post":{"summary":"Prepare the join transaction","tags":["Games"],"parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"},"description":"The creation transaction id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JoinRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreparedJoin"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/games/{gameId}/join/submit":{"post":{"summary":"Submit the signed join transaction","tags":["Games"],"parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"},"description":"The creation transaction id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequest"}}}},"responses":{"202":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResult"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/games/{gameId}/reveal/prepare":{"post":{"summary":"Prepare a reveal or settlement transaction","description":"Either player may lead. The second reveal settles the game. Retry REVEAL_WAITING until it is your turn.","tags":["Games"],"parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"},"description":"The creation transaction id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreparedReveal"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/games/{gameId}/reveal/submit":{"post":{"summary":"Submit the signed reveal transaction","tags":["Games"],"parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"},"description":"The creation transaction id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequest"}}}},"responses":{"202":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResult"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/games/{gameId}/creator_refund/prepare":{"post":{"summary":"Prepare the creator refund","description":"Available while the game is still waiting for a joiner.","tags":["Games"],"parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"},"description":"The creation transaction id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SafetyActionRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreparedSafetyAction"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/games/{gameId}/creator_refund/submit":{"post":{"summary":"Submit the signed creator refund","tags":["Games"],"parameters":[{"name":"gameId","in":"path","required":true,"schema":{"type":"string"},"description":"The creation transaction id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequest"}}}},"responses":{"202":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResult"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/relay/{relayId}":{"post":{"summary":"Store a relay payload","description":"A small keyed store for handing a payload between clients. The id is 32 bytes of hex and entries expire.","tags":["Relay"],"parameters":[{"name":"relayId","in":"path","required":true,"schema":{"type":"string"},"description":"32 bytes of hex."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelayPayload"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Accepted"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Read a relay payload","tags":["Relay"],"parameters":[{"name":"relayId","in":"path","required":true,"schema":{"type":"string"},"description":"32 bytes of hex."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelayPayload"}}}},"400":{"description":"Validation or domain error. Do not retry the same request unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"This wallet may not perform the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The game, match, or preparation does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The state changed or the action is still in flight. Refetch and retry when `retry` is present.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"The request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited. Respect `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal error. Retry later, not the same request immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A chain or storage dependency is unavailable. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/llms.txt":{"get":{"summary":"Agent entry point","tags":["Docs"],"responses":{"200":{"description":"Plain-text map of the API.","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/docs/agent-guide.md":{"get":{"summary":"Agent guide","tags":["Docs"],"responses":{"200":{"description":"Markdown guide: signing, lifecycle, retries.","content":{"text/markdown":{"schema":{"type":"string"}}}}}}},"/docs/http-api.md":{"get":{"summary":"Agent guide alias","tags":["Docs"],"responses":{"200":{"description":"Markdown guide alias.","content":{"text/markdown":{"schema":{"type":"string"}}}}}}},"/api/openapi.json":{"get":{"summary":"OpenAPI document","tags":["Docs"],"responses":{"200":{"description":"The same document.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/openapi.json":{"get":{"summary":"OpenAPI document alias","tags":["Docs"],"responses":{"200":{"description":"The same document.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/.well-known/openapi.json":{"get":{"summary":"OpenAPI document alias","tags":["Docs"],"responses":{"200":{"description":"The same document.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/docs/api":{"get":{"summary":"Rendered API reference","tags":["Docs"],"responses":{"200":{"description":"HTML reference generated from the OpenAPI document.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/robots.txt":{"get":{"summary":"Crawler rules","tags":["Docs"],"responses":{"200":{"description":"Crawler rules pointing at the sitemap.","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap","tags":["Docs"],"responses":{"200":{"description":"The public pages and agent documents.","content":{"application/xml":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error","message","requestId"],"properties":{"error":{"type":"string","description":"Stable, machine-readable error code."},"message":{"type":"string","description":"Human-readable explanation."},"requestId":{"type":"string","description":"Correlates with server logs and the X-Request-Id header."},"retry":{"type":"string","enum":["AFTER_REFRESH"],"description":"Present when the caller should refetch or wait before retrying."}},"additionalProperties":true},"NetworkConfig":{"type":"object","required":["network","addressPrefix","kaswareNetwork","protocolVersion","explorerUrl"],"properties":{"network":{"type":"string","enum":["mainnet","testnet-10"]},"addressPrefix":{"type":"string","enum":["kaspa","kaspatest"]},"kaswareNetwork":{"type":"string"},"protocolVersion":{"type":"string"},"gameFeePublicKey":{"type":["string","null"]},"explorerUrl":{"type":"string"},"botAvailable":{"type":"boolean"},"botStakeKas":{"type":["number","null"]}},"additionalProperties":true},"MatchmakingJoinRequest":{"type":"object","required":["address","publicKey","limitKas"],"properties":{"address":{"type":"string"},"publicKey":{"type":"string","description":"32-byte x-only public key, hex."},"limitKas":{"type":"number","minimum":1,"maximum":1000000}}},"MatchmakingRoomRequest":{"type":"object","required":["address","publicKey","stakeKas"],"properties":{"address":{"type":"string"},"publicKey":{"type":"string"},"stakeKas":{"type":"number","minimum":1,"maximum":1000000}}},"MatchmakingCodeRequest":{"type":"object","required":["address","publicKey","code"],"properties":{"address":{"type":"string"},"publicKey":{"type":"string"},"code":{"type":"string","description":"Six-character friend-room code."}}},"MatchmakingSeatRequest":{"type":"object","required":["address","publicKey"],"properties":{"address":{"type":"string"},"publicKey":{"type":"string"}}},"LeaveRequest":{"type":"object","required":["address"],"properties":{"address":{"type":"string"}}},"BotOfferRequest":{"type":"object","required":["address"],"properties":{"address":{"type":"string"}}},"MatchState":{"type":"object","required":["matchId","status"],"properties":{"matchId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["waiting","matched","cancelled","left"]},"role":{"type":["string","null"],"enum":["creator","joiner",null]},"side":{"type":["string","null"],"enum":["even","odd",null]},"gameId":{"type":["string","null"]},"creation":{"type":["object","null"],"additionalProperties":true},"stakeKas":{"type":["number","null"]},"myLimitKas":{"type":["number","null"]},"rivalLimitKas":{"type":["number","null"]},"opponentConnected":{"type":"boolean"},"opponentType":{"type":["string","null"],"enum":["human","bot",null]},"code":{"type":["string","null"]}},"additionalProperties":true},"CreationRequest":{"type":"object","required":["creatorAddress","creatorPublicKey","creatorCommitment","side","stakeKas"],"properties":{"creatorAddress":{"type":"string"},"creatorPublicKey":{"type":"string"},"creatorCommitment":{"type":"string","description":"blake2b256(choice_le64 || nonce32), hex."},"side":{"type":"string","enum":["even","odd"]},"stakeKas":{"type":"number","minimum":1,"maximum":1000000},"matchId":{"type":"string","format":"uuid"}}},"JoinRequest":{"type":"object","required":["joinerAddress","joinerPublicKey","joinerCommitment"],"properties":{"joinerAddress":{"type":"string"},"joinerPublicKey":{"type":"string"},"joinerCommitment":{"type":"string","description":"blake2b256(choice_le64 || nonce32), hex."},"matchId":{"type":"string","format":"uuid"}}},"RevealRequest":{"type":"object","required":["playerAddress","playerPublicKey","choice","nonceHex"],"properties":{"playerAddress":{"type":"string"},"playerPublicKey":{"type":"string"},"choice":{"type":"integer","enum":[0,1]},"nonceHex":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}},"SafetyActionRequest":{"type":"object","required":["playerAddress","playerPublicKey"],"properties":{"playerAddress":{"type":"string"},"playerPublicKey":{"type":"string"}}},"PreparedCreation":{"type":"object","required":["network","preparedHash","txJson","feeSompi","deadlineDaa","changeScriptPublicKey"],"properties":{"network":{"type":"string"},"preparedHash":{"type":"string"},"txJson":{"type":"string","description":"Unsigned SafeJSON transaction."},"feeSompi":{"type":"string"},"deadlineDaa":{"type":"string"},"changeScriptPublicKey":{"type":"string"}},"additionalProperties":true},"PreparedJoin":{"type":"object","required":["gameId","preparedHash","txJson","stakeSompi","feeSompi","verification"],"properties":{"gameId":{"type":"string"},"preparedHash":{"type":"string"},"txJson":{"type":"string"},"stakeSompi":{"type":"string"},"feeSompi":{"type":"string"},"verification":{"type":"object","additionalProperties":true}},"additionalProperties":true},"PreparedReveal":{"type":"object","required":["gameId","preparedHash","txJson","feeSompi","stage","verification"],"properties":{"gameId":{"type":"string"},"preparedHash":{"type":"string"},"txJson":{"type":"string"},"feeSompi":{"type":"string"},"stage":{"type":"string","enum":["first_reveal","settlement"]},"verification":{"type":"object","additionalProperties":true}},"additionalProperties":true},"PreparedSafetyAction":{"type":"object","required":["gameId","preparedHash","txJson","feeSompi","action","verification"],"properties":{"gameId":{"type":"string"},"preparedHash":{"type":"string"},"txJson":{"type":"string"},"feeSompi":{"type":"string"},"action":{"type":"string","enum":["creator_refund"]},"verification":{"type":"object","additionalProperties":true}},"additionalProperties":true},"SubmitRequest":{"type":"object","required":["preparedHash","signedTxJson"],"properties":{"preparedHash":{"type":"string"},"signedTxJson":{"type":"string","description":"SafeJSON signed only in the wallet funding inputs."},"matchId":{"type":"string","format":"uuid"}}},"SubmitResult":{"type":"object","required":["status"],"properties":{"gameId":{"type":"string"},"transactionId":{"type":"string"},"network":{"type":"string"},"status":{"type":"string","enum":["broadcast","join_broadcast","reveal_broadcast","settlement_broadcast","creator_refund_broadcast"]}},"additionalProperties":true},"GameView":{"type":"object","required":["gameId","network","status"],"properties":{"gameId":{"type":"string"},"network":{"type":"string"},"status":{"type":"string"},"confirmationStatus":{"type":["string","null"]},"stakeKas":{"type":["number","null"]},"creator":{"type":["object","null"],"additionalProperties":true},"joiner":{"type":["object","null"],"additionalProperties":true},"deadlineDaa":{"type":["string","null"]},"canJoin":{"type":"boolean"},"canCancel":{"type":"boolean"},"canReveal":{"type":"boolean"},"joinTransactionId":{"type":["string","null"]},"revealCount":{"type":"integer"},"firstRevealer":{"type":["string","null"]},"winner":{"type":["string","null"],"enum":["creator","joiner",null]},"winnerAddress":{"type":["string","null"]},"transactions":{"type":"array","items":{"type":"string"}}},"additionalProperties":true},"FeedbackRequest":{"type":"object","required":["message"],"properties":{"message":{"type":"string","minLength":1,"maxLength":1500}}},"Accepted":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"}}},"Health":{"type":"object","required":["ok","service","network"],"properties":{"ok":{"type":"boolean"},"service":{"type":"string","enum":["kasodds"]},"network":{"type":"string"},"startedAt":{"type":"string","format":"date-time"}}},"Ready":{"type":"object","required":["ok","service","network"],"properties":{"ok":{"type":"boolean"},"service":{"type":"string","enum":["kasodds"]},"network":{"type":"string"},"startedAt":{"type":"string","format":"date-time"},"error":{"type":"string"}}},"RelayPayload":{"type":"object","additionalProperties":true,"description":"Any JSON object. The id is 32 bytes of hex and the value expires."}}}}