{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://xcim.org/schemas/0.1/transparency-batch-inputs.schema.json",
  "title": "XCIM 0.1 Transparency Batch Inputs",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "xcim_version", "object_type", "issuer_id", "batch_sequence",
    "previous_anchor_hash", "proof_bundle_set_hash", "consistency_proof_uri", "valid_until"
  ],
  "properties": {
    "xcim_version": { "const": "0.1" },
    "object_type": { "const": "transparency_batch_inputs" },
    "issuer_id": { "type": "string", "pattern": "^urn:xcim:issuer:[A-Za-z0-9._~:-]+$" },
    "batch_sequence": { "$ref": "#/$defs/positive" },
    "previous_anchor_hash": { "$ref": "#/$defs/hash" },
    "proof_bundle_set_hash": { "$ref": "#/$defs/hash" },
    "consistency_proof_uri": { "$ref": "#/$defs/httpsUri" },
    "valid_until": { "$ref": "#/$defs/canonicalUtc" }
  },
  "$defs": {
    "positive": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
    "hash": { "type": "string", "minLength": 43, "maxLength": 43, "pattern": "^[A-Za-z0-9_-]+$" },
    "httpsUri": { "type": "string", "format": "uri", "pattern": "^https://[^?#\\s]+$" },
    "canonicalUtc": {
      "type": "string",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{1,7})?Z$"
    }
  }
}
