# ink.igav.galaxius.temp.period

> Published by [galaxius-gm.igav.ink](https://lexicon.garden/identity/did:plc:whg4cehv5lzx6yorjkwzbk56)

✓ This is the authoritative definition for this NSID.

## Description

One published period of a Galaxius game: the orders batch, the revealed secret and the state it produced.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:whg4cehv5lzx6yorjkwzbk56/ink.igav.galaxius.temp.period)
- [Documentation](https://lexicon.garden/lexicon/did:plc:whg4cehv5lzx6yorjkwzbk56/ink.igav.galaxius.temp.period/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:whg4cehv5lzx6yorjkwzbk56/ink.igav.galaxius.temp.period/examples)

## Definitions

### `ink.igav.galaxius.temp.period#keyChange`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `join` | `ref` → `com.atproto.repo.strongRef` | No | The join record that brought the new key. |
| `seat` | `integer` | Yes | The seat whose key changed. |
| `sessionKey` | `string` | Yes | The seat's new Ed25519 public key as a did:key multikey. |

### `ink.igav.galaxius.temp.period`

**Type**: `record`

A period record, written by the game master; a link in a game's ledger.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `batch` | `blob` | Yes | The batch blob: the period's lines (envelopes, bot orders, refusals, key changes) as gzip-compressed JSON Lines. |
| `encryption` | `unknown` | No | An encryption descriptor, absent in sandbox games until M4. |
| `game` | `ref` → `com.atproto.repo.strongRef` | Yes | A strongRef to the game this period belongs to. |
| `index` | `integer` | Yes | The period's index, from zero. |
| `keyChanges` | `array` | Yes | The session key changes that took effect during this period. |
| `previous` | `ref` → `com.atproto.repo.strongRef` | No | A strongRef to the previous period; absent for period zero. |
| `secret` | `string` | Yes | The secret for this period, revealed here as 64 lowercase hex digits; hashing it gives the previous link's commitment. |
| `stateRoot` | `string` | Yes | The root of the state after the period's last tick, as 64 lowercase hex digits. |
| `ticks` | `ref` → `#tickRange` | Yes | The tick range the period covers. |

### `ink.igav.galaxius.temp.period#tickRange`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `from` | `integer` | Yes | The first tick the period covers. |
| `to` | `integer` | Yes | The last tick the period covers. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "keyChange": {
      "properties": {
        "join": {
          "description": "The join record that brought the new key.",
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "seat": {
          "description": "The seat whose key changed.",
          "minimum": 1,
          "type": "integer"
        },
        "sessionKey": {
          "description": "The seat's new Ed25519 public key as a did:key multikey.",
          "maxLength": 128,
          "type": "string"
        }
      },
      "required": [
        "seat",
        "sessionKey"
      ],
      "type": "object"
    },
    "main": {
      "description": "A period record, written by the game master; a link in a game's ledger.",
      "key": "any",
      "record": {
        "properties": {
          "batch": {
            "accept": [
              "application/gzip"
            ],
            "description": "The batch blob: the period's lines (envelopes, bot orders, refusals, key changes) as gzip-compressed JSON Lines.",
            "maxSize": 1000000,
            "type": "blob"
          },
          "encryption": {
            "description": "An encryption descriptor, absent in sandbox games until M4.",
            "type": "unknown"
          },
          "game": {
            "description": "A strongRef to the game this period belongs to.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "index": {
            "description": "The period's index, from zero.",
            "minimum": 0,
            "type": "integer"
          },
          "keyChanges": {
            "description": "The session key changes that took effect during this period.",
            "items": {
              "ref": "#keyChange",
              "type": "ref"
            },
            "maxLength": 100,
            "type": "array"
          },
          "previous": {
            "description": "A strongRef to the previous period; absent for period zero.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "secret": {
            "description": "The secret for this period, revealed here as 64 lowercase hex digits; hashing it gives the previous link's commitment.",
            "maxLength": 64,
            "type": "string"
          },
          "stateRoot": {
            "description": "The root of the state after the period's last tick, as 64 lowercase hex digits.",
            "maxLength": 64,
            "type": "string"
          },
          "ticks": {
            "description": "The tick range the period covers.",
            "ref": "#tickRange",
            "type": "ref"
          }
        },
        "required": [
          "game",
          "index",
          "ticks",
          "stateRoot",
          "batch",
          "secret",
          "keyChanges"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "tickRange": {
      "properties": {
        "from": {
          "description": "The first tick the period covers.",
          "minimum": 0,
          "type": "integer"
        },
        "to": {
          "description": "The last tick the period covers.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "from",
        "to"
      ],
      "type": "object"
    }
  },
  "description": "One published period of a Galaxius game: the orders batch, the revealed secret and the state it produced.",
  "id": "ink.igav.galaxius.temp.period",
  "lexicon": 1
}
```
