# games.atplay.game.secrets

> Published by [atplay.games](https://lexicon.garden/identity/did:plc:xawtkr77srkxlwhxjf7whbml)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:xawtkr77srkxlwhxjf7whbml/games.atplay.game.secrets)
- [Documentation](https://lexicon.garden/lexicon/did:plc:xawtkr77srkxlwhxjf7whbml/games.atplay.game.secrets/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:xawtkr77srkxlwhxjf7whbml/games.atplay.game.secrets/examples)

## Definitions

### `games.atplay.game.secrets`

**Type**: `record`

A player's private secrets for one game, stored in their own 'me only' permissioned space — never on the public network. Written with the same record key as the invitation it belongs to, so it can be found without a query.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `secrets` | `ref` → `#secrets` | Yes | Replaces any previously stored secrets for this game in full; game logic replaces rather than merges this map on every resolve. |
| `invitation` | `ref` → `com.atproto.repo.strongRef` | Yes | The game this holds secrets for. Record keys are only unique within a collection, so this disambiguates same-key invitations from different repos. |

### `games.atplay.game.secrets#secrets`

**Type**: `object`

Open-ended map of string keys to string values, opaque to everything but the game logic and middleware that produced it (committed cleartexts awaiting reveal, per-item decryption keys, and so on).

| Property | Type | Required | Description |
|----------|------|----------|-------------|

## Raw Schema

```json
{
  "id": "games.atplay.game.secrets",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "invitation",
          "secrets"
        ],
        "properties": {
          "secrets": {
            "ref": "#secrets",
            "type": "ref",
            "description": "Replaces any previously stored secrets for this game in full; game logic replaces rather than merges this map on every resolve."
          },
          "invitation": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref",
            "description": "The game this holds secrets for. Record keys are only unique within a collection, so this disambiguates same-key invitations from different repos."
          }
        }
      },
      "description": "A player's private secrets for one game, stored in their own 'me only' permissioned space — never on the public network. Written with the same record key as the invitation it belongs to, so it can be found without a query."
    },
    "secrets": {
      "type": "object",
      "properties": {},
      "description": "Open-ended map of string keys to string values, opaque to everything but the game logic and middleware that produced it (committed cleartexts awaiting reveal, per-item decryption keys, and so on)."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
