{
  "$id": "https://acreseal.com/.well-known/acreseal-verify-bundle.schema.json",
  "title": "AcreSeal Verify Bundle 1.0.0",
  "description": "Profile acreseal.field-evidence.v1. A versioned public document that lets a third party reproduce the integrity conclusion for one field-evidence record without an AcreSeal account. sealStatus is four-valued and its members never collapse: `sealed` and `not_sealed` are findings about the record, `not_found` is a confirmed absence after a lookup that completed, and `integrity_unavailable` is a statement about the CHECK — a read did not complete, so nothing was determined. Generated from the Zod schema; do not hand-edit.",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "type": "string",
      "const": "1.0.0"
    },
    "profile": {
      "type": "string",
      "const": "acreseal.field-evidence.v1"
    },
    "generatedAt": {
      "type": "string"
    },
    "subject": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": ["landowner_complaint", "job_seal"]
        },
        "trackingCode": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "recordId": {
          "type": "string"
        },
        "jobId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["kind", "trackingCode", "recordId", "jobId"],
      "additionalProperties": false
    },
    "sealStatus": {
      "type": "string",
      "enum": ["sealed", "not_sealed", "integrity_unavailable", "not_found"]
    },
    "reproducibilityGrade": {
      "type": "string",
      "enum": ["A", "B", "C"]
    },
    "digests": {
      "type": "object",
      "properties": {
        "photoSha256": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "serverPhotoHash": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "envHash": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "forensicHash": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "canonicalSealMessage": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "merkleRoot": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "photoSha256",
        "serverPhotoHash",
        "envHash",
        "forensicHash",
        "canonicalSealMessage",
        "merkleRoot"
      ],
      "additionalProperties": false
    },
    "canonicalization": {
      "type": "object",
      "properties": {
        "photo": {
          "type": "string",
          "const": "sha256-stored-object-bytes"
        },
        "sealMessage": {
          "type": "string"
        },
        "merkle": {
          "type": "string"
        },
        "timestamp": {
          "type": "string"
        }
      },
      "required": ["photo", "sealMessage", "merkle", "timestamp"],
      "additionalProperties": false
    },
    "inclusion": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": ["included", "not_included", "unavailable"]
        },
        "leafIndex": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "leafHash": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "proof": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "position": {
                    "type": "string",
                    "enum": ["left", "right"]
                  },
                  "hash": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  }
                },
                "required": ["position", "hash"],
                "additionalProperties": false
              }
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["status", "leafIndex", "leafHash", "proof"],
      "additionalProperties": false
    },
    "signature": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": ["present", "absent", "unavailable"]
        },
        "algorithm": {
          "anyOf": [
            {
              "type": "string",
              "const": "Ed25519"
            },
            {
              "type": "null"
            }
          ]
        },
        "publicKeyUrl": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "publicKeyPem": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "signatureBase64": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "signedMessageEncoding": {
          "anyOf": [
            {
              "type": "string",
              "const": "utf8"
            },
            {
              "type": "null"
            }
          ]
        },
        "publicKeyIsCurrentSigningKey": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "status",
        "algorithm",
        "publicKeyUrl",
        "publicKeyPem",
        "signatureBase64",
        "signedMessageEncoding",
        "publicKeyIsCurrentSigningKey"
      ],
      "additionalProperties": false
    },
    "timestamp": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": ["present", "absent", "unavailable"]
        },
        "authority": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "tokenBase64": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "digestHex": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "genTime": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "validation": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "parsed": {
                  "type": "boolean"
                },
                "imprint": {
                  "type": "string",
                  "enum": ["verified", "mismatch", "not_checked"]
                },
                "nonce": {
                  "type": "string",
                  "enum": ["verified", "mismatch", "absent", "not_checked"]
                },
                "signature": {
                  "type": "string",
                  "const": "not_checked"
                },
                "source": {
                  "type": "string",
                  "const": "rfc3161_parsed"
                },
                "reason": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": ["parsed", "imprint", "nonce", "signature", "source", "reason"],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["status", "authority", "tokenBase64", "digestHex", "genTime", "validation"],
      "additionalProperties": false
    },
    "transparencyLog": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": ["present", "absent", "unavailable"]
        },
        "checkpointUrl": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "treeSize": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "witnessLimitation": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["status", "checkpointUrl", "treeSize", "witnessLimitation"],
      "additionalProperties": false
    },
    "anchoring": {
      "type": "object",
      "properties": {
        "status": {
          "type": "string",
          "enum": ["anchored", "unanchored", "unavailable"]
        },
        "anchorsUrl": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "latestAnchor": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "string"
                },
                "providerReference": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "headPosition": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "headDigest": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                },
                "requestedAt": {
                  "type": "string"
                },
                "providerAssertedTime": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "provider",
                "providerReference",
                "headPosition",
                "headDigest",
                "requestedAt",
                "providerAssertedTime"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "record": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "enum": ["covered", "pending_anchor", "unavailable"]
                },
                "reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "after_anchored_head",
                        "not_yet_logged",
                        "no_anchored_head",
                        "proof_mismatch"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "leafIndex": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "anchoredTreeSize": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "exclusiveMinimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "proof": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "position": {
                            "type": "string",
                            "enum": ["left", "right"]
                          },
                          "hash": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{64}$"
                          }
                        },
                        "required": ["position", "hash"],
                        "additionalProperties": false
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "recomputedRoot": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "status",
                "reason",
                "leafIndex",
                "anchoredTreeSize",
                "proof",
                "recomputedRoot"
              ],
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ]
        },
        "coverage": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["status", "anchorsUrl", "latestAnchor", "record", "coverage"],
      "additionalProperties": false
    },
    "timeline": {
      "type": "object",
      "properties": {
        "capturedAtDevice": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "acceptedAtServer": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "sealedAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["capturedAtDevice", "acceptedAtServer", "sealedAt", "note"],
      "additionalProperties": false
    },
    "trustGraph": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string"
          },
          "edge": {
            "type": "string"
          },
          "to": {
            "type": "string"
          }
        },
        "required": ["from", "edge", "to"],
        "additionalProperties": false
      }
    },
    "program": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "op": {
                "type": "string",
                "const": "fetch_photo"
              },
              "url": {
                "type": "string"
              },
              "out": {
                "type": "string",
                "const": "photoBytes"
              }
            },
            "required": ["op", "url", "out"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "type": "string",
                "const": "sha256"
              },
              "in": {
                "type": "string",
                "const": "photoBytes"
              },
              "out": {
                "type": "string",
                "const": "photoSha256"
              }
            },
            "required": ["op", "in", "out"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "type": "string",
                "const": "assert_eq"
              },
              "left": {
                "type": "string"
              },
              "right": {
                "type": "string"
              },
              "means": {
                "type": "string"
              }
            },
            "required": ["op", "left", "right", "means"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "type": "string",
                "const": "merkle_verify"
              },
              "leafHash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "proof": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "position": {
                      "type": "string",
                      "enum": ["left", "right"]
                    },
                    "hash": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    }
                  },
                  "required": ["position", "hash"],
                  "additionalProperties": false
                }
              },
              "root": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "target": {
                "type": "string",
                "enum": ["seal_root", "anchored_log_head"]
              }
            },
            "required": ["op", "leafHash", "proof", "root"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "type": "string",
                "const": "ed25519_verify"
              },
              "message": {
                "type": "string"
              },
              "signatureBase64": {
                "type": "string"
              },
              "publicKeyUrl": {
                "type": "string"
              },
              "publicKeyPem": {
                "type": "string"
              }
            },
            "required": ["op", "message", "signatureBase64", "publicKeyUrl", "publicKeyPem"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "type": "string",
                "const": "rfc3161_verify_optional"
              },
              "tokenBase64": {
                "type": "string"
              },
              "digestHex": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "tsaUrl": {
                "type": "string"
              }
            },
            "required": ["op", "tokenBase64", "digestHex", "tsaUrl"],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "op": {
                "type": "string",
                "const": "note"
              },
              "text": {
                "type": "string"
              }
            },
            "required": ["op", "text"],
            "additionalProperties": false
          }
        ]
      }
    },
    "verification": {
      "type": "object",
      "properties": {
        "summary": {
          "type": "string"
        },
        "steps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "tool": {
                "type": "string",
                "enum": ["shasum", "openssl", "curl", "cli", "other"]
              },
              "command": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "expect": {
                "type": "string"
              },
              "notes": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": ["id", "title", "tool", "command", "expect", "notes"],
            "additionalProperties": false
          }
        }
      },
      "required": ["summary", "steps"],
      "additionalProperties": false
    },
    "doesNotProve": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "disclosures": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "links": {
      "type": "object",
      "properties": {
        "humanVerify": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "howTo": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "caseStudy": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "schema": {
          "type": "string"
        },
        "openApi": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": ["humanVerify", "howTo", "caseStudy", "schema", "openApi"],
      "additionalProperties": false
    }
  },
  "required": [
    "schemaVersion",
    "profile",
    "generatedAt",
    "subject",
    "sealStatus",
    "reproducibilityGrade",
    "digests",
    "canonicalization",
    "inclusion",
    "signature",
    "timestamp",
    "transparencyLog",
    "anchoring",
    "timeline",
    "trustGraph",
    "program",
    "verification",
    "doesNotProve",
    "disclosures",
    "links"
  ],
  "additionalProperties": false
}
