{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "departure": {
      "properties": {
        "digest": {
          "description": "Digest of the departing manager's departure record.",
          "maxLength": 32,
          "minLength": 32,
          "type": "bytes"
        },
        "managerId": {
          "format": "did",
          "type": "string"
        }
      },
      "required": [
        "managerId",
        "digest"
      ],
      "type": "object"
    },
    "main": {
      "description": "One generation of a profile's signed manager list. The record key is the generation.",
      "key": "any",
      "record": {
        "properties": {
          "departures": {
            "items": {
              "ref": "#departure",
              "type": "ref"
            },
            "maxLength": 64,
            "type": "array"
          },
          "generation": {
            "maximum": 4294967295,
            "minimum": 0,
            "type": "integer"
          },
          "managers": {
            "items": {
              "ref": "#manager",
              "type": "ref"
            },
            "maxLength": 64,
            "minLength": 1,
            "type": "array"
          },
          "nonce": {
            "description": "Generation 0 only.",
            "maxLength": 16,
            "minLength": 16,
            "type": "bytes"
          },
          "previousHash": {
            "description": "SHA-256 of the previous generation's signed bytes. Absent at generation 0.",
            "maxLength": 32,
            "minLength": 32,
            "type": "bytes"
          },
          "signatures": {
            "items": {
              "ref": "#signature",
              "type": "ref"
            },
            "maxLength": 64,
            "type": "array"
          }
        },
        "required": [
          "generation",
          "managers",
          "departures",
          "signatures"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "manager": {
      "properties": {
        "id": {
          "format": "did",
          "type": "string"
        },
        "signingKey": {
          "maxLength": 32,
          "minLength": 32,
          "type": "bytes"
        }
      },
      "required": [
        "id",
        "signingKey"
      ],
      "type": "object"
    },
    "signature": {
      "properties": {
        "managerId": {
          "format": "did",
          "type": "string"
        },
        "signature": {
          "maxLength": 64,
          "minLength": 64,
          "type": "bytes"
        }
      },
      "required": [
        "managerId",
        "signature"
      ],
      "type": "object"
    }
  },
  "id": "app.brightblur.profile.managerList",
  "lexicon": 1
}
