{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/africanmarketos-com/json-schema/africanmarketos-com-key-ceremony-status-schema.json",
  "title": "KeyCeremonyStatus",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/africanmarketos-com-key-ceremony-api-openapi.yml#/components/schemas/KeyCeremonyStatus",
  "type": "object",
  "properties": {
    "contract_version": {
      "type": "string"
    },
    "ceremony": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "not_started",
            "started",
            "completed",
            "failed",
            "unavailable",
            "reset_for_rehearsal"
          ]
        },
        "ceremony_id": {
          "type": "string"
        },
        "key_id": {
          "type": "string"
        },
        "started_at": {
          "type": "string"
        },
        "completed_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "failed_step": {
          "type": [
            "string",
            "null"
          ]
        },
        "failure_code": {
          "type": [
            "string",
            "null"
          ]
        },
        "public_key_fingerprint_sha256": {
          "type": [
            "string",
            "null"
          ]
        },
        "birth_record": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "mvr.receipt-key-birth/1"
              ]
            },
            "ceremony_id": {
              "type": "string"
            },
            "key_id": {
              "type": "string"
            },
            "algorithm": {
              "type": "string",
              "enum": [
                "Ed25519"
              ]
            },
            "public_key_spki_b64": {
              "type": "string"
            },
            "public_key_fingerprint_sha256": {
              "type": "string"
            },
            "participants_sha256": {
              "type": "string"
            },
            "generated_at": {
              "type": "string"
            },
            "not_before": {
              "type": "string"
            },
            "rotation_due_at": {
              "type": "string"
            },
            "generated_in": {
              "type": "string",
              "enum": [
                "cloudflare_worker"
              ]
            },
            "worker_script": {
              "type": "string"
            },
            "deployment_revision": {
              "type": "string"
            },
            "deployed_version_before": {
              "type": "string"
            },
            "private_key_destination": {
              "type": "string"
            },
            "private_key_returned_to_caller": {
              "type": "boolean",
              "enum": [
                false
              ]
            },
            "cloudflare_token_id_sha256": {
              "type": "string"
            },
            "statement": {
              "type": "string"
            }
          },
          "additionalProperties": true
        },
        "birth_signature_b64": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": true,
      "required": [
        "state"
      ]
    },
    "registry_activation": {
      "type": "string"
    },
    "private_key_binding": {
      "type": "object",
      "properties": {
        "present": {
          "type": "boolean"
        },
        "type": {
          "type": [
            "string",
            "null"
          ]
        },
        "algorithm": {
          "type": [
            "string",
            "null"
          ]
        },
        "extractable": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "usages": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": true
    },
    "ceremony_record_present": {
      "type": "boolean"
    },
    "birth_record_verification": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "valid": {
          "type": "boolean"
        },
        "checks": {
          "type": "object",
          "properties": {
            "format": {
              "type": "boolean"
            },
            "fingerprint": {
              "type": "boolean"
            },
            "signature": {
              "type": "boolean"
            }
          },
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    },
    "execution_authorized": {
      "type": "boolean",
      "enum": [
        false
      ]
    }
  },
  "additionalProperties": true,
  "required": [
    "ceremony",
    "registry_activation",
    "private_key_binding"
  ]
}