{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Invite other players to a game. The appview writes the invitation to the caller's repo, where the invitees will find it. The state must already be the output of the initiator's own first resolve (see ADR 0006).",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "game": {
              "ref": "games.atplay.game.release",
              "type": "ref"
            },
            "otherPlayers": {
              "description": "Array of DIDs for other players in the game",
              "items": {
                "format": "did",
                "type": "string"
              },
              "minLength": 1,
              "type": "array"
            },
            "parameters": {
              "description": "Any parameters of play used by the game logic",
              "ref": "#parameters",
              "type": "ref"
            },
            "state": {
              "ref": "games.atplay.game.state",
              "type": "ref"
            },
            "uri": {
              "description": "The AT-URI this invitation should be written to. Only its record key is used, and the caller mints it so anything keyed to the invitation — its secrets, above all — can be stored before the game is published.",
              "maxLength": 512,
              "type": "string"
            }
          },
          "required": [
            "uri"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cid": {
              "maxLength": 256,
              "type": "string"
            },
            "uri": {
              "maxLength": 512,
              "type": "string"
            }
          },
          "required": [
            "uri"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "games.atplay.game.createInvitation",
  "lexicon": 1
}
