{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://extol.work/attestation/statement/v1/hours-verified/schema.json",
  "title": "Hours verified",
  "description": "An organization's authorized operator attests that a named individual performed a specific number of qualifying service hours during a specified time period. The Statement's primary attestation.",
  "type": "object",
  "required": ["hours", "reporting_period", "activity_description", "org_root_pubkey", "delegation_attestation_reference", "operator_legal_name", "operator_title", "confirmed_at", "teos_status_snapshot"],
  "properties": {
    "hours": { "type": "number", "minimum": 0, "description": "Decimal hours performed during the reporting period" },
    "reporting_period": {
      "type": "object",
      "required": ["start", "end"],
      "properties": {
        "start": { "type": "string", "format": "date" },
        "end": { "type": "string", "format": "date" }
      }
    },
    "activity_description": { "type": "string", "description": "Human-readable description of the work performed" },
    "org_root_pubkey": { "type": "string", "contentEncoding": "base64", "description": "32-byte Ed25519 pubkey of the org's root identity, base64-encoded" },
    "delegation_attestation_reference": { "type": "string", "pattern": "^[0-9a-f]{64}$", "description": "SHA-256 hex of the delegation attestation authorizing this operator" },
    "operator_legal_name": { "type": "string", "description": "Operator's full legal name (Neptune §3.1 REQUIRED)" },
    "operator_title": { "type": "string", "description": "Operator's title within the organization (Neptune §3.1 REQUIRED)" },
    "confirmed_at": { "type": "string", "format": "date-time", "description": "Timestamp when operator confirmed via Extol UI" },
    "teos_status_snapshot": {
      "type": "object",
      "required": ["status", "checked_at"],
      "properties": {
        "status": { "type": "string", "enum": ["verified_501c3", "verified_501c4"], "description": "Only 501(c)(3) and 501(c)(4) satisfy the signing gate for v1" },
        "checked_at": { "type": "string", "format": "date-time", "description": "TEOS lookup timestamp; must be within freshness window at signing time" }
      }
    }
  }
}
