{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://usedeed.app/contracts/deed.proof_card.external_promotion.v1.schema.json",
  "title": "DEED proof-card external promotion result v1",
  "type": "object",
  "required": ["schema", "adr", "generatedAt", "repoCommit", "card", "externalAttestation", "custodyBoundary"],
  "properties": {
    "schema": { "const": "https://usedeed.app/contracts/deed.proof_card.external_promotion.v1.schema.json" },
    "adr": { "const": "ADR-197" },
    "generatedAt": { "type": "string", "format": "date-time" },
    "repoCommit": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
    "card": {
      "type": "object",
      "required": ["path", "sha256", "cardId", "head", "mark", "verifiedByStandaloneVerifier", "externalAttestationCount"],
      "properties": {
        "path": { "type": "string", "minLength": 1 },
        "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
        "cardId": { "type": "string", "pattern": "^zvpc_sha256_[0-9a-f]{64}$" },
        "head": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
        "mark": { "type": "string", "minLength": 1 },
        "verifiedByStandaloneVerifier": { "const": true },
        "externalAttestationCount": { "type": "integer", "minimum": 1 }
      },
      "additionalProperties": false
    },
    "externalAttestation": { "type": "object" },
    "custodyBoundary": { "type": "string", "minLength": 1 }
  },
  "additionalProperties": false
}
