{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenAIIS Inclusion Proof Verification — Local Reference HTTP Adapter",
    "version": "1.0.0-candidate",
    "description": "Loopback-only cryptographic inclusion verification using caller-supplied public keys; no network registry submission, independent trust assertion, legal authority, Bitcoin consensus or IETF conformance."
  },
  "servers": [
    {
      "url": "http://127.0.0.1:8081",
      "description": "Local-only; runtime enforces IPv4 loopback"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "responses": {
          "200": {
            "description": "Process liveness, not proof acceptance"
          }
        }
      }
    },
    "/v1/capabilities": {
      "get": {
        "operationId": "capabilities",
        "responses": {
          "200": {
            "description": "Advertised local verifier capabilities and trust limitations"
          }
        }
      }
    },
    "/v1/verify/inclusion": {
      "post": {
        "operationId": "verifyInclusion",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "record_base64",
                  "receipt",
                  "signed_checkpoint",
                  "checkpoint_origin",
                  "issuer_key_hex",
                  "checkpoint_key_hex",
                  "expected_issuer_id"
                ],
                "properties": {
                  "record_base64": {
                    "type": "string",
                    "contentEncoding": "base64",
                    "description": "Exact canonical signed record bytes"
                  },
                  "receipt": {
                    "type": "object",
                    "description": "Existing OpenAIIS Merkle inclusion receipt"
                  },
                  "signed_checkpoint": {
                    "type": "string",
                    "maxLength": 4096,
                    "description": "C2SP signed checkpoint note"
                  },
                  "checkpoint_origin": {
                    "type": "string"
                  },
                  "issuer_key_hex": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "checkpoint_key_hex": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$"
                  },
                  "expected_issuer_id": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cryptographic inclusion valid relative to caller-supplied keys; no independently established identity, consent, legal rights or timestamp",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "profile",
                    "status",
                    "verification",
                    "independent_trust",
                    "content_integrity",
                    "trust_anchor_source",
                    "wire_conformance",
                    "authorization"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "CRYPTOGRAPHIC_INCLUSION_VERIFIED"
                      ]
                    },
                    "verification": {
                      "type": "object"
                    },
                    "trust_anchor_source": {
                      "type": "string",
                      "enum": [
                        "CALLER_SUPPLIED_NOT_INDEPENDENTLY_ATTESTED"
                      ]
                    },
                    "independent_trust": {
                      "type": "string",
                      "enum": [
                        "NOT_EVALUATED"
                      ]
                    },
                    "content_integrity": {
                      "type": "string",
                      "enum": [
                        "NOT_EVALUATED"
                      ]
                    },
                    "profile": {
                      "type": "string"
                    },
                    "wire_conformance": {
                      "type": "string"
                    },
                    "authorization": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Malformed framing, request or input"
          },
          "413": {
            "description": "Body larger than 262144 bytes"
          },
          "415": {
            "description": "Unsupported media type"
          },
          "422": {
            "description": "Cryptographic inclusion could not be verified"
          }
        }
      }
    }
  }
}
