{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/peopleprincipia-com/json-schema/peopleprincipia-com-attested-fields-schema.json",
  "title": "AttestedFields",
  "description": "PRN-463 additive keys on every attested prior / effect / construct result (REST and MCP).",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/peopleprincipia-com-effects-api-openapi.yml#/components/schemas/AttestedFields",
  "type": "object",
  "properties": {
    "attestation": {
      "$ref": "#/$defs/Attestation"
    },
    "cite_as": {
      "type": "string",
      "description": "A citation line that names the receipt id (identical to attestation.cite_as)."
    }
  },
  "$defs": {
    "Attestation": {
      "type": "object",
      "description": "PRN-463. Proof that a served record is a leaf of a daily Merkle root Principia published\n(PRN-387 receipts, PRN-420 external anchor). No new proof format: `receipt_id` is the\nPRN-387 receipt content_hash, `path` is its Merkle path, `merkle_root` the day's root.\n`status` is `not_anchored` when the record is in no published root yet (added after the\nlatest anchor, or not an anchored kind, or a culture-conditioned sub-prior): then\n`receipt_id`, `anchored_at` and `merkle_root` are null and `path` is empty. That is a gap,\nnever a finding that the value is wrong.\n",
      "required": [
        "attestation_version",
        "status",
        "record_id",
        "receipt_id",
        "anchored_at",
        "merkle_root",
        "path",
        "external_anchor",
        "scope",
        "verify_url",
        "cite_as"
      ],
      "properties": {
        "attestation_version": {
          "type": "string",
          "enum": [
            "1"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "anchored",
            "not_anchored",
            "anchor_unavailable"
          ]
        },
        "record_id": {
          "type": "string"
        },
        "receipt_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "anchored_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "UTC anchor date of the daily root."
        },
        "merkle_root": {
          "type": [
            "string",
            "null"
          ]
        },
        "path": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MerklePathStep"
          }
        },
        "external_anchor": {
          "type": "object",
          "required": [
            "service",
            "status",
            "summary"
          ],
          "properties": {
            "service": {
              "type": "string"
            },
            "status": {
              "type": "string",
              "enum": [
                "pending",
                "confirmed",
                "failed",
                "not_submitted"
              ]
            },
            "bitcoin_block_height": {
              "type": "string",
              "description": "Confirmed only; a string so it is never read as a served statistic."
            },
            "summary": {
              "type": "string"
            }
          }
        },
        "scope": {
          "type": "string",
          "description": "What the attestation covers and its limit."
        },
        "verify_url": {
          "type": "string"
        },
        "cite_as": {
          "type": "string"
        }
      }
    },
    "MerklePathStep": {
      "type": "object",
      "required": [
        "hash",
        "side"
      ],
      "properties": {
        "hash": {
          "type": "string",
          "description": "Sibling hash (lowercase hex sha256)."
        },
        "side": {
          "type": "string",
          "enum": [
            "left",
            "right"
          ],
          "description": "Which side the sibling sits on when hashing up: left => sha256(hash+current), right => sha256(current+hash)."
        }
      }
    }
  }
}