# airdress.peer_trust.*

{/* Generated by scripts/generate-event-reference.mjs from https://schemas.airdress.co/operator/events/v1.json (operator v0.1.138).
    Do not edit by hand: run `pnpm generate:event-reference` and commit the result. */}

The events in the `airdress.peer_trust` family. How to read a section, and what
each audience means, is on the [event reference](/events/) page.

## `airdress.peer_trust.added`

Owner info Functions

A peer trust key was recorded for a subject and purpose that had no live key.

**Audience: owner.** About the airdress as a whole. Only the owner receives it: the owner's devices and the owner's subscriptions.

**Where it goes**

- **The operator's journal**, as one log line at this level, and **the event log**, where `airdress events tail` reads it.
- **Subscriptions** that name it, within its audience.
- **Functions bound to this operator's events** (`source: operator`).

**Versions**

- Version 1: first carried by operator v0.1.138.

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `kid` | string | yes |  |
| `provenance` | string | yes |  |
| `purpose` | string | yes |  |
| `rotated_out` | array of string | yes | Always empty here; kept so both arms carry the same fields. |
| `subject` | string | yes |  |

<details>
<summary>JSON Schema</summary>

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A peer trust key was recorded for a subject and purpose that had no live key.",
  "properties": {
    "kid": {
      "type": "string"
    },
    "provenance": {
      "type": "string"
    },
    "purpose": {
      "type": "string"
    },
    "rotated_out": {
      "description": "Always empty here; kept so both arms carry the same fields.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "subject": {
      "type": "string"
    }
  },
  "required": [
    "kid",
    "provenance",
    "purpose",
    "rotated_out",
    "subject"
  ],
  "title": "PeerTrustAdded",
  "type": "object"
}
```

</details>

## `airdress.peer_trust.changed`

Owner warn Functions

A first-seen peer key changed: the new key was refused, and nothing was recorded, until the owner revokes the old one.

**Audience: owner.** About the airdress as a whole. Only the owner receives it: the owner's devices and the owner's subscriptions.

**Where it goes**

- **The operator's journal**, as one log line at this level, and **the event log**, where `airdress events tail` reads it.
- **Subscriptions** that name it, within its audience.
- **Functions bound to this operator's events** (`source: operator`).

**Versions**

- Version 1: first carried by operator v0.1.138.

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `kid` | string | yes |  |
| `provenance` | string | yes |  |
| `purpose` | string | yes |  |
| `subject` | string | yes |  |

<details>
<summary>JSON Schema</summary>

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A first-seen peer key changed: the new key was refused, and nothing was recorded, until the owner revokes the old one.",
  "properties": {
    "kid": {
      "type": "string"
    },
    "provenance": {
      "type": "string"
    },
    "purpose": {
      "type": "string"
    },
    "subject": {
      "type": "string"
    }
  },
  "required": [
    "kid",
    "provenance",
    "purpose",
    "subject"
  ],
  "title": "PeerTrustChanged",
  "type": "object"
}
```

</details>

## `airdress.peer_trust.conflict`

Owner warn Functions

A lower-precedence key disagrees with the trusted one and was ignored. Once per subject and purpose per process.

**Audience: owner.** About the airdress as a whole. Only the owner receives it: the owner's devices and the owner's subscriptions.

**Where it goes**

- **The operator's journal**, as one log line at this level, and **the event log**, where `airdress events tail` reads it.
- **Subscriptions** that name it, within its audience.
- **Functions bound to this operator's events** (`source: operator`).

**Versions**

- Version 1: first carried by operator v0.1.138.

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `purpose` | string | yes |  |
| `subject` | string | yes |  |

<details>
<summary>JSON Schema</summary>

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A lower-precedence key disagrees with the trusted one and was ignored. Once per subject and purpose per process.",
  "properties": {
    "purpose": {
      "type": "string"
    },
    "subject": {
      "type": "string"
    }
  },
  "required": [
    "purpose",
    "subject"
  ],
  "title": "PeerTrustConflict",
  "type": "object"
}
```

</details>

## `airdress.peer_trust.revoked`

Owner info Functions

A live peer trust key was revoked.

**Audience: owner.** About the airdress as a whole. Only the owner receives it: the owner's devices and the owner's subscriptions.

**Where it goes**

- **The operator's journal**, as one log line at this level, and **the event log**, where `airdress events tail` reads it.
- **Subscriptions** that name it, within its audience.
- **Functions bound to this operator's events** (`source: operator`).

**Versions**

- Version 1: first carried by operator v0.1.138.

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `kid` | string | yes |  |
| `provenance` | string | yes |  |
| `purpose` | string | yes |  |
| `revocation_kind` | string | yes | `rotated` or `compromised`; empty when no kind was given. |
| `subject` | string | yes |  |

<details>
<summary>JSON Schema</summary>

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A live peer trust key was revoked.",
  "properties": {
    "kid": {
      "type": "string"
    },
    "provenance": {
      "type": "string"
    },
    "purpose": {
      "type": "string"
    },
    "revocation_kind": {
      "description": "`rotated` or `compromised`; empty when no kind was given.",
      "type": "string"
    },
    "subject": {
      "type": "string"
    }
  },
  "required": [
    "kid",
    "provenance",
    "purpose",
    "revocation_kind",
    "subject"
  ],
  "title": "PeerTrustRevoked",
  "type": "object"
}
```

</details>

## `airdress.peer_trust.rotated`

Owner info Functions

A peer trust key was recorded and rotated out the live keys listed in `rotated_out` (their kids).

**Audience: owner.** About the airdress as a whole. Only the owner receives it: the owner's devices and the owner's subscriptions.

**Where it goes**

- **The operator's journal**, as one log line at this level, and **the event log**, where `airdress events tail` reads it.
- **Subscriptions** that name it, within its audience.
- **Functions bound to this operator's events** (`source: operator`).

**Versions**

- Version 1: first carried by operator v0.1.138.

**Data**

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `kid` | string | yes |  |
| `provenance` | string | yes |  |
| `purpose` | string | yes |  |
| `rotated_out` | array of string | yes |  |
| `subject` | string | yes |  |

<details>
<summary>JSON Schema</summary>

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A peer trust key was recorded and rotated out the live keys listed in `rotated_out` (their kids).",
  "properties": {
    "kid": {
      "type": "string"
    },
    "provenance": {
      "type": "string"
    },
    "purpose": {
      "type": "string"
    },
    "rotated_out": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "subject": {
      "type": "string"
    }
  },
  "required": [
    "kid",
    "provenance",
    "purpose",
    "rotated_out",
    "subject"
  ],
  "title": "PeerTrustRotated",
  "type": "object"
}
```

</details>