# bzh.herve.atmot.defs

> Published by [jeremy.herve.bzh](https://lexicon.garden/identity/did:plc:4i6hvdii3km3kbnj3losmwnt)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:4i6hvdii3km3kbnj3losmwnt/bzh.herve.atmot.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:4i6hvdii3km3kbnj3losmwnt/bzh.herve.atmot.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:4i6hvdii3km3kbnj3losmwnt/bzh.herve.atmot.defs/examples)

## Definitions

### `bzh.herve.atmot.defs#dailyStats`

**Type**: `object`

Aggregate statistics for one (lang, puzzleNumber), computed in the browser. Counts are read live from Constellation and never stored on any record.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `lang` | `string` (language) | Yes | Language series. |
| `players` | `integer` | Yes | Distinct DIDs that recorded a result for this puzzle. |
| `solvers` | `integer` | No | How many of those players solved it. |
| `puzzleNumber` | `integer` | Yes | Per-language puzzle index. |
| `averageGuesses` | `integer` | No | Average winning guess count, scaled by 100 (integer to avoid float ambiguity); e.g. 412 means 4.12. Absent when there are no solvers. |
| `guessDistribution` | `array` | No | Histogram of winning guess counts across all solvers. |

### `bzh.herve.atmot.defs#resultView`

**Type**: `object`

Client-side view of one player's result, assembled in the browser after reading records (there is no server implementing query lexicons in v1).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes | DID of the player who recorded this result. |
| `lang` | `string` (language) | Yes | Language series of the puzzle. |
| `handle` | `string` (handle) | No | Resolved handle of the player, if available. |
| `solved` | `boolean` | Yes | Whether the player solved the puzzle. |
| `guessCount` | `integer` | No | Guesses used; present only when solved. |
| `puzzleNumber` | `integer` | Yes | Per-language puzzle index. |

### `bzh.herve.atmot.defs#leaderboardEntry`

**Type**: `object`

One aggregated row of a daily leaderboard, computed in the browser from result records discovered via Constellation.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes | DID of the player. |
| `handle` | `string` (handle) | No | Resolved handle of the player, if available. |
| `solved` | `boolean` | Yes | Whether the player solved the puzzle. |
| `guessCount` | `integer` | No | Guesses used; present only when solved. |

## Raw Schema

```json
{
  "id": "bzh.herve.atmot.defs",
  "defs": {
    "dailyStats": {
      "type": "object",
      "required": [
        "lang",
        "puzzleNumber",
        "players"
      ],
      "properties": {
        "lang": {
          "type": "string",
          "format": "language",
          "description": "Language series."
        },
        "players": {
          "type": "integer",
          "minimum": 0,
          "description": "Distinct DIDs that recorded a result for this puzzle."
        },
        "solvers": {
          "type": "integer",
          "minimum": 0,
          "description": "How many of those players solved it."
        },
        "puzzleNumber": {
          "type": "integer",
          "minimum": 1,
          "description": "Per-language puzzle index."
        },
        "averageGuesses": {
          "type": "integer",
          "description": "Average winning guess count, scaled by 100 (integer to avoid float ambiguity); e.g. 412 means 4.12. Absent when there are no solvers."
        },
        "guessDistribution": {
          "type": "array",
          "items": {
            "ref": "bzh.herve.atmot.stats#guessBucket",
            "type": "ref"
          },
          "maxLength": 6,
          "description": "Histogram of winning guess counts across all solvers."
        }
      },
      "description": "Aggregate statistics for one (lang, puzzleNumber), computed in the browser. Counts are read live from Constellation and never stored on any record."
    },
    "resultView": {
      "type": "object",
      "required": [
        "did",
        "lang",
        "puzzleNumber",
        "solved"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did",
          "description": "DID of the player who recorded this result."
        },
        "lang": {
          "type": "string",
          "format": "language",
          "description": "Language series of the puzzle."
        },
        "handle": {
          "type": "string",
          "format": "handle",
          "description": "Resolved handle of the player, if available."
        },
        "solved": {
          "type": "boolean",
          "description": "Whether the player solved the puzzle."
        },
        "guessCount": {
          "type": "integer",
          "maximum": 6,
          "minimum": 1,
          "description": "Guesses used; present only when solved."
        },
        "puzzleNumber": {
          "type": "integer",
          "minimum": 1,
          "description": "Per-language puzzle index."
        }
      },
      "description": "Client-side view of one player's result, assembled in the browser after reading records (there is no server implementing query lexicons in v1)."
    },
    "leaderboardEntry": {
      "type": "object",
      "required": [
        "did",
        "solved"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did",
          "description": "DID of the player."
        },
        "handle": {
          "type": "string",
          "format": "handle",
          "description": "Resolved handle of the player, if available."
        },
        "solved": {
          "type": "boolean",
          "description": "Whether the player solved the puzzle."
        },
        "guessCount": {
          "type": "integer",
          "maximum": 6,
          "minimum": 1,
          "description": "Guesses used; present only when solved."
        }
      },
      "description": "One aggregated row of a daily leaderboard, computed in the browser from result records discovered via Constellation."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
