{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://clavenar.com/schemas/ledger-verify.schema.json",
  "title": "Clavenar Ledger VerifyResult",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "valid",
    "entries_checked",
    "first_invalid_seq"
  ],
  "properties": {
    "valid": {
      "type": "boolean"
    },
    "entries_checked": {
      "type": "integer",
      "minimum": 0
    },
    "first_invalid_seq": {
      "type": [
        "integer",
        "null"
      ]
    },
    "unsupported_chain_version": {
      "type": [
        "integer",
        "null"
      ]
    },
    "commitment": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "contract",
        "head_hash",
        "length"
      ],
      "properties": {
        "contract": {
          "const": "clavenar.verified-chain/v1"
        },
        "head_hash": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "length": {
          "type": "integer",
          "minimum": 0
        },
        "tail_chain_version": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "cryptographic": {
      "type": "object"
    },
    "anchors": {
      "type": "array"
    },
    "anchor_mismatch": {
      "type": [
        "boolean",
        "null"
      ]
    }
  }
}
