{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hogarmas.net/article-50-portfolio/envelope-schema.json",
  "title": "H/M Article 50 Portfolio Checksum Envelope",
  "description": "Unsigned SHA-256 consistency envelope for an Article 50 portfolio snapshot. The checksum does not authenticate an exporter.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema",
    "ruleset",
    "portfolio",
    "integrity",
    "limitations"
  ],
  "properties": {
    "schema": {
      "const": "hm.article50-portfolio-envelope.v1"
    },
    "ruleset": {
      "const": "2026-07-29.1"
    },
    "portfolio": {
      "$ref": "https://hogarmas.net/article-50-portfolio/schema.json"
    },
    "integrity": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "algorithm",
        "digest",
        "cryptographicallySigned",
        "issuerIdentityVerified"
      ],
      "properties": {
        "algorithm": {
          "const": "SHA-256"
        },
        "digest": {
          "type": "string",
          "pattern": "^sha256:[a-f0-9]{64}$"
        },
        "cryptographicallySigned": {
          "const": false
        },
        "issuerIdentityVerified": {
          "const": false
        }
      }
    },
    "limitations": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "checksumAuthenticatesExporter",
        "complianceCertified",
        "semanticTruthProven"
      ],
      "properties": {
        "checksumAuthenticatesExporter": {
          "const": false
        },
        "complianceCertified": {
          "const": false
        },
        "semanticTruthProven": {
          "const": false
        }
      }
    }
  }
}
