{
 "openapi": "3.1.0",
 "info": {
  "title": "Nalvorn verification tools",
  "version": "1.0.0",
  "summary": "Pay-per-call verification checks with evidence in the answer.",
  "description": "11 checks that return evidence rather than opinion: manifests, JSON schemas, Russian text, receipt digests, OpenAPI conformance, domain and mail, certificates, security headers, packages and site readiness. 3 of them are free. Payment is USDC on Base through x402: call an endpoint without payment and the service answers HTTP 402 with the exact price and receiving address.",
  "x-guidance": "Call any POST endpoint with a JSON body. Without payment you get HTTP 402 with accepts[] holding the price in token atomic units, the receiving address and the network. Pay with an x402 wallet, then repeat the same request with the signed proof in the PAYMENT-SIGNATURE header and read the JSON result. Every answer states what was checked and never guesses: if a check cannot be made, it says so.",
  "contact": {
   "name": "Nalvorn",
   "url": "https://nalvorn.top"
  },
  "license": {
   "name": "Pay-per-call, no redistribution"
  }
 },
 "servers": [
  {
   "url": "https://tools.nalvorn.top"
  }
 ],
 "paths": {
  "/verify-manifest": {
   "post": {
    "operationId": "verify-manifest",
    "summary": "Compare a list of files with a sha256 manifest",
    "description": "Compare a list of files with a sha256 manifest and report every mismatch",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "manifest",
         "files"
        ],
        "properties": {
         "manifest": {
          "type": "string",
          "description": "sha256sum-style lines: \"<hash>  <path>\""
         },
         "files": {
          "type": "object",
          "description": "map of path to its sha256",
          "additionalProperties": {
           "type": "string"
          }
         }
        }
       },
       "example": {
        "manifest": "a1b2c3…  ./file.txt",
        "files": {
         "file.txt": "a1b2c3…"
        }
       }
      }
     }
    },
    "x-payment-info": {
     "mode": "free"
    },
    "responses": {
     "200": {
      "description": "Check result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "ok": true,
         "checked": 1,
         "mismatches": []
        }
       }
      }
     }
    }
   }
  },
  "/json-schema-strict": {
   "post": {
    "operationId": "json-schema-strict",
    "summary": "Validate JSON against a schema and return exact error paths",
    "description": "Validate JSON against a schema; returns exact error paths",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "schema"
        ],
        "properties": {
         "schema": {
          "type": "object",
          "description": "JSON Schema subset: type, required, properties, items"
         },
         "data": {
          "description": "value to validate"
         }
        }
       },
       "example": {
        "schema": {
         "type": "object",
         "required": [
          "id"
         ]
        },
        "data": {
         "id": 1
        }
       }
      }
     }
    },
    "x-payment-info": {
     "mode": "free"
    },
    "responses": {
     "200": {
      "description": "Check result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "valid": true,
         "errors": []
        }
       }
      }
     }
    }
   }
  },
  "/ru-text-normalize": {
   "post": {
    "operationId": "ru-text-normalize",
    "summary": "Normalise Russian text and return metrics",
    "description": "Normalise Russian text (yo, quotes, dashes, spaces) and return metrics",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "text"
        ],
        "properties": {
         "text": {
          "type": "string"
         },
         "restore_yo": {
          "type": "boolean",
          "default": false
         }
        }
       },
       "example": {
        "text": "Текст \"в кавычках\" - с тире",
        "restore_yo": true
       }
      }
     }
    },
    "x-payment-info": {
     "mode": "free"
    },
    "responses": {
     "200": {
      "description": "Check result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "text": "Текст «в кавычках» — с тире",
         "changes": 2
        }
       }
      }
     }
    }
   }
  },
  "/receipt-verify": {
   "post": {
    "operationId": "receipt-verify",
    "summary": "Verify a receipt: canonical JSON digest and declared sha256",
    "description": "Verify a receipt: canonical JSON digest and declared sha256",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "payload",
         "sha256"
        ],
        "properties": {
         "payload": {
          "description": "any JSON value that was receipted"
         },
         "sha256": {
          "type": "string",
          "description": "declared digest, hex"
         }
        }
       },
       "example": {
        "payload": {
         "a": 1
        },
        "sha256": "0f343b09…"
       }
      }
     }
    },
    "x-payment-info": {
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.01"
     },
     "protocols": [
      {
       "x402": {}
      }
     ]
    },
    "responses": {
     "200": {
      "description": "Check result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "match": true,
         "computed": "0f343b09…"
        }
       }
      }
     },
     "402": {
      "description": "Payment Required"
     }
    },
    "security": [
     {
      "x402": []
     }
    ]
   }
  },
  "/openapi-conformance": {
   "post": {
    "operationId": "openapi-conformance",
    "summary": "Check a live API against its OpenAPI description",
    "description": "Check a live API against its OpenAPI document and list mismatches",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "openapi_url"
        ],
        "properties": {
         "openapi_url": {
          "type": "string",
          "format": "uri",
          "description": "URL of the spec, json or yaml"
         },
         "base_url": {
          "type": "string",
          "format": "uri",
          "description": "origin to test; defaults to spec server"
         },
         "params": {
          "type": "object",
          "description": "sample parameters per path, optional"
         }
        }
       },
       "example": {
        "openapi_url": "https://example.com/openapi.json",
        "base_url": "https://example.com"
       }
      }
     }
    },
    "x-payment-info": {
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.05"
     },
     "protocols": [
      {
       "x402": {}
      }
     ]
    },
    "responses": {
     "200": {
      "description": "Check result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "findings": [],
         "checked_paths": 3
        }
       }
      }
     },
     "402": {
      "description": "Payment Required"
     }
    },
    "security": [
     {
      "x402": []
     }
    ]
   }
  },
  "/full-report": {
   "post": {
    "operationId": "full-report",
    "summary": "One signed report: domain and mail, certificate, headers, crawl readiness, optional package",
    "description": "One signed report: domain and mail, certificate, headers, crawl readiness, optional package",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "url"
        ],
        "properties": {
         "url": {
          "type": "string"
         }
        }
       },
       "example": {
        "url": "https://example.com",
        "package": "requests",
        "ecosystem": "pypi"
       }
      }
     }
    },
    "x-payment-info": {
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.03"
     },
     "protocols": [
      {
       "x402": {}
      }
     ]
    },
    "responses": {
     "200": {
      "description": "Check result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "ok": true,
         "target": "example.com",
         "verdict": "fail",
         "score": 64,
         "failed_sections": [
          "headers",
          "readiness"
         ],
         "findings": [
          {
           "section": "headers",
           "finding": "content-security-policy missing"
          }
         ],
         "note": "one payment, one signed report"
        }
       }
      }
     },
     "402": {
      "description": "Payment Required"
     }
    },
    "security": [
     {
      "x402": []
     }
    ]
   }
  },
  "/domain-posture": {
   "post": {
    "operationId": "domain-posture",
    "summary": "Mail and DNS posture: A/AAAA, MX, SPF, DMARC policy, CAA, with a verdict",
    "description": "Mail and DNS posture: A/AAAA, MX, SPF, DMARC policy, CAA, with a verdict",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "domain"
        ],
        "properties": {
         "domain": {
          "type": "string"
         }
        }
       },
       "example": {
        "domain": "example.com"
       }
      }
     }
    },
    "x-payment-info": {
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.01"
     },
     "protocols": [
      {
       "x402": {}
      }
     ]
    },
    "responses": {
     "200": {
      "description": "Check result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "ok": true,
         "domain": "example.com",
         "verdict": "fail",
         "records": {
          "MX": [
           "10 mail.example.com."
          ],
          "SPF": [
           "v=spf1 include:_spf.example.com -all"
          ],
          "DMARC_policy": "quarantine",
          "CAA": []
         },
         "findings": [
          "no CAA record: any certificate authority may issue for this domain"
         ]
        }
       }
      }
     },
     "402": {
      "description": "Payment Required"
     }
    },
    "security": [
     {
      "x402": []
     }
    ]
   }
  },
  "/tls-cert": {
   "post": {
    "operationId": "tls-cert",
    "summary": "Certificate expiry, issuer and SAN coverage for a host, days left and verdict",
    "description": "Certificate expiry, issuer and SAN coverage for a host, days left and verdict",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "host"
        ],
        "properties": {
         "host": {
          "type": "string"
         }
        }
       },
       "example": {
        "host": "example.com"
       }
      }
     }
    },
    "x-payment-info": {
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.005"
     },
     "protocols": [
      {
       "x402": {}
      }
     ]
    },
    "responses": {
     "200": {
      "description": "Check result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "ok": true,
         "host": "example.com",
         "days_left": 62,
         "verdict": "pass",
         "issuer": {
          "organizationName": "Example CA"
         },
         "findings": []
        }
       }
      }
     },
     "402": {
      "description": "Payment Required"
     }
    },
    "security": [
     {
      "x402": []
     }
    ]
   }
  },
  "/http-headers": {
   "post": {
    "operationId": "http-headers",
    "summary": "Security headers and the redirect chain, with what is missing and why it matters",
    "description": "Security headers and the redirect chain, with what is missing and why it matters",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "url"
        ],
        "properties": {
         "url": {
          "type": "string"
         }
        }
       },
       "example": {
        "url": "https://example.com"
       }
      }
     }
    },
    "x-payment-info": {
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.01"
     },
     "protocols": [
      {
       "x402": {}
      }
     ]
    },
    "responses": {
     "200": {
      "description": "Check result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "ok": true,
         "final_url": "https://example.com/",
         "status": 200,
         "verdict": "fail",
         "present_count": 2,
         "expected_count": 6,
         "findings": [
          "content-security-policy missing (CSP: limits what injected scripts can do)"
         ]
        }
       }
      }
     },
     "402": {
      "description": "Payment Required"
     }
    },
    "security": [
     {
      "x402": []
     }
    ]
   }
  },
  "/package-check": {
   "post": {
    "operationId": "package-check",
    "summary": "Registry check for npm or PyPI: latest version, deprecation, licence, staleness",
    "description": "Registry check for npm or PyPI: latest version, deprecation, licence, staleness",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "name"
        ],
        "properties": {
         "name": {
          "type": "string"
         }
        }
       },
       "example": {
        "ecosystem": "npm",
        "name": "left-pad"
       }
      }
     }
    },
    "x-payment-info": {
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.005"
     },
     "protocols": [
      {
       "x402": {}
      }
     ]
    },
    "responses": {
     "200": {
      "description": "Check result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "ok": true,
         "ecosystem": "npm",
         "name": "left-pad",
         "latest": "1.3.0",
         "verdict": "fail",
         "deprecated": true,
         "findings": [
          "package is deprecated"
         ]
        }
       }
      }
     },
     "402": {
      "description": "Payment Required"
     }
    },
    "security": [
     {
      "x402": []
     }
    ]
   }
  },
  "/site-ready": {
   "post": {
    "operationId": "site-ready",
    "summary": "Crawl and AI readiness: robots, sitemap, llms.txt, AI-crawler blocks, response time",
    "description": "Crawl and AI readiness: robots, sitemap, llms.txt, AI-crawler blocks, response time",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "url"
        ],
        "properties": {
         "url": {
          "type": "string"
         }
        }
       },
       "example": {
        "url": "https://example.com"
       }
      }
     }
    },
    "x-payment-info": {
     "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.01"
     },
     "protocols": [
      {
       "x402": {}
      }
     ]
    },
    "responses": {
     "200": {
      "description": "Check result",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        },
        "example": {
         "ok": true,
         "url": "https://example.com",
         "verdict": "fail",
         "home": {
          "status": 200,
          "ms": 180
         },
         "probes": {
          "robots.txt": {
           "status": 200,
           "bytes": 42
          }
         },
         "findings": [
          "no llms.txt: language models get no curated summary"
         ]
        }
       }
      }
     },
     "402": {
      "description": "Payment Required"
     }
    },
    "security": [
     {
      "x402": []
     }
    ]
   }
  }
 },
 "components": {
  "securitySchemes": {
   "x402": {
    "type": "apiKey",
    "in": "header",
    "name": "PAYMENT-SIGNATURE",
    "description": "Signed EIP-3009 authorisation (x402 v2; X-PAYMENT is accepted as a legacy alias)"
   }
  }
 }
}