# app.thesocialwire.readState

> Published by [samclemente.me](https://lexicon.garden/identity/did:plc:qy5pluw2bsuq2x6albsgkvx3)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:qy5pluw2bsuq2x6albsgkvx3/app.thesocialwire.readState)
- [Documentation](https://lexicon.garden/lexicon/did:plc:qy5pluw2bsuq2x6albsgkvx3/app.thesocialwire.readState/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:qy5pluw2bsuq2x6albsgkvx3/app.thesocialwire.readState/examples)

## Definitions

### `app.thesocialwire.readState`

**Type**: `record`

Public canonical read/unread manifest. V1 uses head; V2 requires revision and compactionVersion=1 with separate state/device/legacy-receipt roots. Every root must be fully CID-verified before atomic activation. Maintenance revisions never invent user-action sequences.

**Key**: `literal:self`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `compactionVersion` | `integer` | No |  |
| `devicesHead` | `ref` → `com.atproto.repo.strongRef` | No |  |
| `generation` | `string` | Yes |  |
| `head` | `ref` → `com.atproto.repo.strongRef` | No |  |
| `lastSequence` | `integer` | Yes |  |
| `legacyReceiptsHead` | `ref` → `com.atproto.repo.strongRef` | No |  |
| `revision` | `integer` | No |  |
| `stateHead` | `ref` → `com.atproto.repo.strongRef` | No |  |
| `version` | `integer` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Public canonical read/unread manifest. V1 uses head; V2 requires revision and compactionVersion=1 with separate state/device/legacy-receipt roots. Every root must be fully CID-verified before atomic activation. Maintenance revisions never invent user-action sequences.",
      "key": "literal:self",
      "record": {
        "properties": {
          "compactionVersion": {
            "const": 1,
            "type": "integer"
          },
          "devicesHead": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "generation": {
            "maxLength": 128,
            "type": "string"
          },
          "head": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "lastSequence": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "legacyReceiptsHead": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "revision": {
            "maximum": 9007199254740991,
            "minimum": 1,
            "type": "integer"
          },
          "stateHead": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "version": {
            "maximum": 2,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "version",
          "generation",
          "lastSequence"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "app.thesocialwire.readState",
  "lexicon": 1
}
```
