org.lichess.puzzle.submitAttempt

pds.dad

{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Submits the outcome of a ranked puzzle previously issued by getNextRanked. The challenge token issued with the puzzle must be passed back verbatim, along with the full solution line the player played. The server validates those moves against the puzzle's actual solution: the attempt counts as solved only if they match. Applies the Glicko-2 rating update and returns the player's new rating, plus a detached signature (sig) proving the server judged the moves; the client should store it in its org.lichess.puzzle.attempt record. Resubmitting the same challenge (same nonce) is idempotent and returns the original result.",
      "errors": [
        {
          "description": "The challenge token is malformed, has a bad signature, or does not belong to the authenticated player.",
          "name": "InvalidChallenge"
        },
        {
          "description": "The challenge token is past its expiry. Request a new puzzle.",
          "name": "ChallengeExpired"
        },
        {
          "description": "No outstanding attempt matches this challenge.",
          "name": "UnknownAttempt"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "challenge": {
              "description": "The opaque signed token issued by getNextRanked, passed back verbatim.",
              "maxLength": 4096,
              "type": "string"
            },
            "solutionMoves": {
              "description": "The full solution line the player played, in the same notation and form as the puzzle's solution moves (org.lichess.puzzle.defs#puzzleView moves). The server compares this against the puzzle's actual solution to decide whether the attempt is solved.",
              "type": "string"
            }
          },
          "required": [
            "challenge",
            "solutionMoves"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "attestation": {
              "description": "The exact payload sig signs, echoed back so callers can see and independently verify what was attested. Present only when the attempt was rated (ranked and not flagged).",
              "ref": "org.lichess.puzzle.defs#resultAttestation",
              "type": "ref"
            },
            "nonce": {
              "description": "The nonce (jti) of the challenge this result resolves. Store it in the attempt record's nonce field so duplicate records are detectable.",
              "maxLength": 64,
              "type": "string"
            },
            "ranked": {
              "description": "Whether this attempt counted towards the player's rating.",
              "type": "boolean"
            },
            "rating": {
              "description": "The player's Glicko-2 rating after applying this attempt.",
              "type": "integer"
            },
            "ratingDeviation": {
              "description": "The player's Glicko-2 rating deviation after applying this attempt.",
              "type": "integer"
            },
            "sig": {
              "description": "base64url (unpadded) detached signature by the service over the canonical DAG-CBOR encoding of attestation (see org.lichess.puzzle.defs#resultAttestation). Present only when the attempt was rated (ranked and not flagged). Store it verbatim in the attempt record's sig field.",
              "maxLength": 128,
              "type": "string"
            },
            "solved": {
              "description": "Whether the submitted solution line matched the puzzle's actual solution, as judged by the server.",
              "type": "boolean"
            }
          },
          "required": [
            "rating",
            "ratingDeviation",
            "ranked",
            "solved",
            "nonce"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "org.lichess.puzzle.submitAttempt",
  "lexicon": 1
}

Validate Record

Validate a record against org.lichess.puzzle.submitAttempt

Validation Options
Automatically resolve and include external schemas for full validation
Treat any remaining unresolved references as valid

Metadata

DID
did:plc:rnpkyqnmsw4ipey6eotbdnnf
CID
bafyreidrzk2zl3oq6socx3x7nhfxwsljzejjwfvcxyv2hzxnhdmhzixkd4
Indexed At
2026-07-26 20:13 UTC
AT-URI
at://did:plc:rnpkyqnmsw4ipey6eotbdnnf/com.atproto.lexicon.schema/org.lichess.puzzle.submitAttempt

Referenced Schemas (1)

  • org.lichess.puzzle.defs#resultAttestation

Similar Lexicons

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • org.lichess.puzzle.attempt recordnot from the namespace authority

    A record of a user's attempt at solving an org.lichess.puzzle. Ranked attempts carry a detached signature (sig) from the service proving the submitted moves were judged server-side. Rating is not part of the record: it …

  • org.lichess.puzzle.getNextRanked querynot from the namespace authority

    Fetches the next ranked puzzle for the authenticated player. Each puzzle needs to be solved or failed before requesting another; if the player already holds an unresolved ranked puzzle, that same puzzle (with a freshly …

  • org.lichess.puzzle.defs not from the namespace authority

    The shared representation of a chess puzzle returned by the puzzle queries.

Lexicon Garden

@