org.lichess.puzzle.defs
Details · defs
| Kind | defs |
|---|---|
| Authority | puzzle.lichess.org |
| Indexed |
#puzzleView
objectThe shared representation of a chess puzzle returned by the puzzle queries.
Properties
the FEN string of the position before the opponent makes their move.
gameId
stringthe unique identifier of the specific game and move the puzzle was extracted from. The game would be accessible at https://lichess.org/{GameId}
the id of the puzzle.
the solution to the puzzle. All player moves of the solution are "only moves", i.e. playing any other move would considerably worsen the player position. An exception is made for mates in one: there can be several. Any move that checkmates should win the puzzle.
nbPlays
integerthe number of times a puzzle was played.
openingTags
arraya list of openings. This is only set for puzzles starting before move 20.
popularity
integera number between 100 (best) and -100 (worst), calculated as 100 * (upvotes - downvotes)/(upvotes + downvotes). Votes are weighted by various factors such as whether the puzzle was solved successfully or the solver's puzzle rating in comparison to the puzzle's.
minimum: -100maximum: 100
the Glicko-2 rating of the puzzle.
the Glicko-2 rating deviation of the puzzle.
themes
arraya list of puzzle themes.
#resultAttestation
objectThe payload a puzzle service signs when it judges a ranked attempt: proof that the service verified playerMoves against the puzzle's solution with the given solved result. The signature over it is stored in the org.lichess.puzzle.attempt record's sig field; this object itself is never stored, since every field is recoverable from the attempt record and the repo it lives in. To verify: rebuild this object from the record (kind is the constant below; player is the DID of the repo the record lives in), encode it as canonical DAG-CBOR (sorted map keys), and check the record's sig — an unpadded base64url low-S ECDSA signature over the sha256 of those bytes — against the service DID's published atproto verification key.
Properties
always "org.lichess.puzzle.defs#resultAttestation"; domain-separates these signatures from anything else the service key signs.
const: "org.lichess.puzzle.defs#resultAttestation"
nonce of the challenge this result resolves (the attempt record's nonce field).
DID of the player the result belongs to — the repo the attempt record lives in. Binds the signature to its owner so it cannot be replayed into another player's repo.
the solution line the player submitted, exactly as judged (the attempt record's playerMoves field).
Lichess puzzle ID (the attempt record's puzzleId field).
DID of the service that judged the attempt (the attempt record's service field).
the server-judged result (the attempt record's solved field).
#themeView
objectA puzzle theme with its display name and description.
Properties
a sentence describing the theme.
the theme identifier used in puzzle themes and the getRandom themes filter (e.g. "fork").
the human-readable display name of the theme (e.g. "Fork").
Similar lexicons
semantic matchLexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.
-
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 is each scoring service's (appview's) own business.
-
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.