{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.sectigoaxiom.com/contract/schemas/ReceiptBundle.json",
  "type": "object",
  "properties": {
    "type": { "type": "string", "const": "axiom.receipt.bundle.v1" },
    "receipt": {
      "type": "object",
      "properties": {
        "payload": { "type": "string" },
        "signatures": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "protected": { "type": "string" },
              "signature": { "type": "string" },
              "header": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }
            },
            "required": ["protected", "signature"]
          }
        }
      },
      "required": ["payload", "signatures"]
    },
    "disclosures": {
      "type": "object",
      "propertyNames": { "type": "string" },
      "additionalProperties": {
        "type": "object",
        "properties": { "salt": { "type": "string" }, "value": { "$ref": "Json.json" } },
        "required": ["salt", "value"]
      }
    },
    "keys": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kty": { "type": "string", "enum": ["EC", "OKP"] },
          "crv": { "type": "string", "enum": ["P-256", "Ed25519"] },
          "x": { "type": "string" },
          "y": { "type": "string" },
          "kid": { "type": "string" },
          "alg": { "type": "string", "enum": ["ES256", "EdDSA"] },
          "use": { "type": "string", "const": "sig" }
        },
        "required": ["kty", "crv", "x"]
      }
    },
    "status": {
      "type": "object",
      "properties": {
        "checked_at": { "type": "string", "description": "RFC 3339 timestamp" },
        "keys": {
          "type": "object",
          "propertyNames": { "type": "string" },
          "additionalProperties": { "type": "string", "enum": ["active", "retired", "revoked"] }
        },
        "source": { "type": "string" }
      },
      "required": ["checked_at", "keys", "source"]
    }
  },
  "required": ["type", "receipt", "disclosures", "keys"],
  "description": "Signed receipt bundle (JWS general serialization + salted disclosures + key snapshot)"
}
