{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://extol.work/attestation/org/v1/legal-identity/schema.json",
  "title": "Legal identity (org self-attestation)",
  "description": "The organization's own on-chain declaration of its legal metadata, referencing the Extol-issued onboarding-verification attestation that anchors the claim. See https://extol.work/attestation/org/v1/legal-identity for the human-readable specification.",
  "type": "object",
  "required": ["legal_name", "ein", "jurisdiction", "entity_type", "extol_onboarding_verification_reference"],
  "properties": {
    "legal_name": { "type": "string", "description": "Organization's legal name" },
    "ein": { "type": "string", "pattern": "^[0-9]{2}-[0-9]{7}$", "description": "US Employer Identification Number" },
    "jurisdiction": { "type": "string", "description": "ISO 3166 country code with optional subdivision" },
    "entity_type": { "type": "string", "description": "e.g., 501c3, 501c4, LLC, government_agency" },
    "extol_onboarding_verification_reference": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$",
      "description": "SHA-256 hex of the anchoring Extol onboarding-verification attestation's canonical bytes (Notary Spec §4.3 additive-reference convention)"
    }
  }
}
