{
  "$schema": "qpf-verification/v0",
  "description": "Machine contract for the QPF verification service. An AI agent fetches this file and can submit a job without scraping HTML.",
  "endpoint_human": "https://qpf-verify.pages.dev/",
  "service": "qpf-verification/v0",
  "submit": {
    "url": "https://convenience-adjusted-aerospace-seattle.trycloudflare.com/verify",
    "method": "POST",
    "enctype": "multipart/form-data",
    "fields": [
      "artifact (file bytes)",
      "checks (JSON of {done_when:[...]})"
    ]
  },
  "tiers": {
    "expedited": {
      "checks_max": 10,
      "price_usd": 5.0
    },
    "standard": {
      "checks_max": 5,
      "price_usd": 2.0
    }
  },
  "checks_schema": {
    "done_when": [
      {
        "check": "file_exists",
        "params": {
          "path": "<artifact filename>"
        }
      }
    ],
    "tier_optional": "standard"
  },
  "checks_available": [
    {
      "check": "file_contains",
      "params": [
        "path",
        "content"
      ],
      "proves": "file contains exact text"
    },
    {
      "check": "file_sha256",
      "params": [
        "path",
        "sha256"
      ],
      "proves": "file matches known SHA-256 hex"
    },
    {
      "check": "file_exists",
      "params": [
        "path"
      ],
      "proves": "artifact present and non-empty"
    },
    {
      "check": "file_absent",
      "params": [
        "path"
      ],
      "proves": "file does NOT exist"
    },
    {
      "check": "dir_exists",
      "params": [
        "path"
      ],
      "proves": "directory exists"
    }
  ],
  "example_checks_json": {
    "done_when": [
      {
        "check": "file_exists",
        "params": {
          "path": "artifact.txt"
        }
      },
      {
        "check": "file_contains",
        "params": {
          "content": "CHECKSUM OK",
          "path": "artifact.txt"
        }
      }
    ]
  },
  "rules": [
    "ALL checks must pass for ESTABLISHED",
    "any single failure = FAILED, no invoice, no charge",
    "path must equal the artifact filename",
    "payment ONLY after ESTABLISHED, exact invoiced amount",
    "payment recorded ONLY with real external ref >= 8 chars"
  ],
  "payment": {
    "address": "0x1fF3dbddc1c18C9eC53806BA16Fb6A3E1bE327d3",
    "assets": "USDC/USDT preferred, native accepted",
    "chains": [
      "0G Aristotle Mainnet EVM chainId 16661",
      "Ethereum L1"
    ],
    "fallback": [
      "PayPal transaction ID",
      "Stripe payment intent",
      "bank transfer reference"
    ]
  },
  "returns": [
    "evidence package JSON (result)",
    "invoice if ESTABLISHED (job_ref + amount + address)",
    "receipt after payment (ledger confirmation)"
  ],
  "verify_result": "sha256sum your_file, compare artifact.sha256, re-run checks, confirm verdict"
}
