{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A verified leaderboard entry stored in the mathr.app official repository",
      "key": "tid",
      "record": {
        "properties": {
          "createdAt": {
            "description": "Timestamp when the score was verified and added to the leaderboard",
            "format": "datetime",
            "type": "string"
          },
          "level": {
            "description": "The highest level reached by the player",
            "minimum": 1,
            "type": "integer"
          },
          "percentage": {
            "description": "Success rate as a percentage (0-100)",
            "maximum": 100,
            "minimum": 0,
            "type": "integer"
          },
          "playerAvatar": {
            "description": "URL to the player's avatar at the time of submission",
            "format": "uri",
            "type": "string"
          },
          "playerDid": {
            "description": "The DID of the player who achieved this score",
            "format": "did",
            "type": "string"
          },
          "playerDisplayName": {
            "description": "The player's display name at the time of submission",
            "type": "string"
          },
          "playerHandle": {
            "description": "The player's handle at the time of submission",
            "type": "string"
          },
          "postUri": {
            "description": "Optional AT URI to the player's Bluesky post announcing the score",
            "format": "at-uri",
            "type": "string"
          },
          "totalChallenges": {
            "description": "Total number of challenges attempted",
            "minimum": 1,
            "type": "integer"
          },
          "totalSuccesses": {
            "description": "Total number of correct answers",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "playerDid",
          "level",
          "totalSuccesses",
          "totalChallenges",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.mathr.leaderboard.entry",
  "lexicon": 1
}
