{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rootz.global/schemas/ask-orders/capture-receipt.schema.json",
  "title": "ASK capture receipt \u2014 these bytes, captured by this device, at this (device-clock) time (ORD-032)",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "kind",
    "subject",
    "inclusion",
    "checkpoint",
    "authority",
    "keys"
  ],
  "properties": {
    "kind": {
      "const": "ask-orders.capture-receipt.v1"
    },
    "subject": {
      "$ref": "leaf.schema.json"
    },
    "inclusion": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "leaf_index",
        "tree_size",
        "path"
      ],
      "properties": {
        "leaf_index": {
          "type": "integer",
          "minimum": 0
        },
        "tree_size": {
          "type": "integer",
          "minimum": 1
        },
        "path": {
          "type": "array",
          "items": {
            "$ref": "common.schema.json#/$defs/Digest"
          }
        }
      }
    },
    "checkpoint": {
      "$ref": "checkpoint.schema.json"
    },
    "authority": {
      "$ref": "origin-receipt.schema.json#/$defs/AuthorityEvidence"
    },
    "keys": {
      "type": "object",
      "required": [
        "keys"
      ],
      "properties": {
        "keys": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      }
    },
    "openings": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "path": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "value",
            "salt"
          ],
          "properties": {
            "value": {},
            "salt": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{22}$"
            }
          }
        },
        "host": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "value",
            "salt"
          ],
          "properties": {
            "value": {},
            "salt": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{22}$"
            }
          }
        },
        "mtime_ms": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "value",
            "salt"
          ],
          "properties": {
            "value": {},
            "salt": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{22}$"
            }
          }
        }
      }
    }
  }
}
