{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "title": "Glass Hull grant milestone attestation (kind-15 payload)",
 "type": "object",
 "additionalProperties": false,
 "required": [
  "class",
  "program",
  "grantee",
  "milestone_sha256",
  "evidence",
  "onchain",
  "onchain_status",
  "verdict",
  "captured_at",
  "packet_sha256",
  "packet_ref"
 ],
 "properties": {
  "class": {
   "const": "grant-milestone"
  },
  "program": {
   "type": "string",
   "maxLength": 80
  },
  "grantee": {
   "type": "string",
   "maxLength": 80
  },
  "milestone_sha256": {
   "type": "string",
   "pattern": "^[0-9a-f]{64}$",
   "description": "sha256 of the milestone text as published by the program"
  },
  "evidence": {
   "type": "array",
   "maxItems": 6,
   "items": {
    "type": "string",
    "pattern": "^[0-9a-f]{64}$"
   },
   "description": "sha256 of each captured evidence file (bytes as fetched, URL and time in the packet)"
  },
  "onchain": {
   "type": "array",
   "maxItems": 4,
   "items": {
    "type": "object",
    "required": [
     "chain_id",
     "block",
     "tx"
    ],
    "properties": {
     "chain_id": {
      "type": "integer"
     },
     "block": {
      "type": "integer"
     },
     "tx": {
      "type": "string",
      "pattern": "^0x[0-9a-f]{64}$"
     }
    }
   }
  },
  "onchain_status": {
   "enum": [
    "FOUND",
    "NOT FOUND",
    "NOT APPLICABLE"
   ]
  },
  "verdict": {
   "enum": [
    "VERIFIED-ONCHAIN",
    "VERIFIED-OFFCHAIN",
    "UNRECONCILED",
    "DENIED"
   ]
  },
  "captured_at": {
   "type": "string"
  },
  "packet_sha256": {
   "type": "string",
   "pattern": "^[0-9a-f]{64}$"
  },
  "packet_ref": {
   "type": "string"
  }
 }
}