{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.dharma-ai.io/setup-claim-credential/v1",
  "title": "Sealed native setup credential response bound to parent challenge",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema", "organizationId", "setupReference", "issuedAt", "expiresAt", "ephemeralPublicKey", "iv", "ciphertext", "tag", "contextDigest"],
  "properties": {
    "schema": { "const": "dharma.setup-claim-credential/v1" },
    "organizationId": { "type": "string", "maxLength": 256, "pattern": "^org_[A-Za-z0-9]+$" },
    "setupReference": { "type": "string", "format": "uuid" },
    "issuedAt": { "type": "string", "format": "date-time" },
    "expiresAt": { "type": "string", "format": "date-time" },
    "ephemeralPublicKey": { "type": "string", "pattern": "^[A-Za-z0-9_-]{43}$" },
    "iv": { "type": "string", "pattern": "^[A-Za-z0-9_-]{16}$" },
    "ciphertext": { "type": "string", "minLength": 2, "maxLength": 10923, "pattern": "^[A-Za-z0-9_-]+$" },
    "tag": { "type": "string", "pattern": "^[A-Za-z0-9_-]{22}$" },
    "contextDigest": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
  }
}
