{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/farofinance-app/json-schema/farofinance-app-attestation-out-schema.json",
  "title": "AttestationOut",
  "description": "The current Faro credential for a subject — or found=false.",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/farofinance-app-api-openapi.json#/components/schemas/AttestationOut",
  "properties": {
    "found": {
      "type": "boolean",
      "title": "Found"
    },
    "current": {
      "type": "boolean",
      "title": "Current",
      "default": false
    },
    "subject_type": {
      "anyOf": [
        {
          "$ref": "#/$defs/SubjectType"
        },
        {
          "type": "null"
        }
      ]
    },
    "subject_hash": {
      "type": "string",
      "title": "Subject Hash"
    },
    "page_uri": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Page Uri"
    },
    "evidence_hash": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Evidence Hash"
    },
    "check_set_version": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Check Set Version"
    },
    "issued_at": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Issued At"
    },
    "expiration_time": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Expiration Time"
    },
    "expired": {
      "type": "boolean",
      "title": "Expired",
      "default": false
    },
    "revoked": {
      "type": "boolean",
      "title": "Revoked",
      "default": false
    },
    "attester": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Attester"
    },
    "attester_checked": {
      "type": "boolean",
      "title": "Attester Checked",
      "default": false
    },
    "uid": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Uid"
    },
    "txid": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Txid"
    },
    "schema_uid": {
      "type": "string",
      "title": "Schema Uid"
    },
    "easscan": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Easscan"
    },
    "checked_at": {
      "type": "string",
      "format": "date-time",
      "title": "Checked At"
    },
    "cached": {
      "type": "boolean",
      "title": "Cached",
      "description": "Always false — this is a chain read.",
      "default": false
    }
  },
  "type": "object",
  "required": [
    "found",
    "subject_hash",
    "schema_uid",
    "checked_at"
  ],
  "$defs": {
    "SubjectType": {
      "type": "string",
      "enum": [
        "domain",
        "ucp_origin",
        "x402_endpoint",
        "agent_operator"
      ],
      "title": "SubjectType",
      "description": "Namespaces subjectHash so a domain and a UCP origin never collide."
    }
  }
}