{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A validated record of a user's score in the Snake game.",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "description": "When the score was achieved",
            "format": "datetime",
            "type": "string"
          },
          "gameProof": {
            "description": "Validation proof to prevent score manipulation",
            "properties": {
              "actionCount": {
                "description": "Number of recorded game actions",
                "minimum": 2,
                "type": "integer"
              },
              "checksum": {
                "description": "Cryptographic checksum of game actions",
                "type": "string"
              },
              "duration": {
                "description": "Game duration in milliseconds",
                "minimum": 1000,
                "type": "integer"
              }
            },
            "type": "object"
          },
          "score": {
            "description": "The player's final score",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "score",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "uk.ewancroft.snake.score",
  "lexicon": 1
}
