{
  "openapi": "3.1.0",
  "info": {
    "title": "x402 Web3 Security & Financial Audit Gateway",
    "version": "1.0.0",
    "description": "Direct 0%-fee native x402 Base Mainnet USDC REST & MCP API Gateway paying directly to 0xfEbDbB880C7f323c145d61683874a45540208a68.",
    "contact": {
      "name": "x402 Web3 & Financial Security Gateway",
      "email": "chenshulang0223@gmail.com",
      "url": "https://x402-web3-fin-gateway.vercel.app"
    },
    "x-guidance": "All POST /api/v1/* endpoints are keyless x402 paid routes on Base Mainnet USDC (chainId 8453, asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) settling directly to 0xfEbDbB880C7f323c145d61683874a45540208a68. Send an unauthenticated POST first to receive the HTTP 402 challenge (both v1 JSON body and v2 PAYMENT-REQUIRED header), sign the EIP-3009 TransferWithAuthorization via x402-fetch / @x402/fetch, and retry with X-PAYMENT or PAYMENT-SIGNATURE. Invalid request bodies return HTTP 400 before settlement ($0 charged)."
  },
  "servers": [
    {
      "url": "https://x402-web3-fin-gateway.vercel.app"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Gateway health & settled USDC telemetry",
        "operationId": "getHealth",
        "security": [],
        "responses": {
          "200": {
            "description": "Healthy status JSON"
          }
        }
      }
    },
    "/api/catalog": {
      "get": {
        "summary": "Machine-readable catalog of x402 REST & MCP tools",
        "operationId": "getCatalog",
        "security": [],
        "responses": {
          "200": {
            "description": "Catalog JSON"
          }
        }
      }
    },
    "/.well-known/x402.json": {
      "get": {
        "summary": "x402 Discovery Manifest",
        "operationId": "getWellKnownX402",
        "security": [],
        "responses": {
          "200": {
            "description": "x402 discovery manifest"
          }
        }
      }
    },
    "/api/v1/validate-address": {
      "post": {
        "summary": "Validate & Normalize Multichain Wallet Address ($0.01 USDC via x402 across Base, Celo, Arbitrum, Polygon, Optimism, Avalanche & Solana)",
        "description": "Cryptographically validates and normalizes wallet/contract addresses across 8 ecosystems: EVM (Keccak-256 EIP-55 checksum + typo/burn detection), Tron (T... SHA-256d Base58Check + 0x41/EVM conversion), Bitcoin (BIP-173 Bech32 bc1q, BIP-350 Bech32m bc1p Taproot, Base58Check), Solana (Ed25519 curve vs off-curve PDA detector), TON (EQ/UQ CRC16-XMODEM + bounceable trap alert), XRPL (classic r... + XLS-5d X-address tag decoder), Cosmos Bech32, and Stacks c32check.\n\n**x402 Payment**: `0.01 USDC` (`10000` atomic units) settled directly with 0% middleman fee to `0xfEbDbB880C7f323c145d61683874a45540208a68` on EVM (`Base`, `Celo USDC/USDT`, `Arbitrum`, `Polygon`, `Optimism`, `Avalanche`) or `2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC` on `Solana Mainnet` (`SPL USDC`).",
        "operationId": "validate_multichain_address",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0xcebA9300f2b948710d2653dD7B07f33A8B32118C",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42161",
                "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:137",
                "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:10",
                "asset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:43114",
                "asset": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
                "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                "payTo": "2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC"
              }
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          }
        },
        "x-402": {
          "scheme": "exact",
          "network": "base",
          "caip2Network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68",
          "maxAmountRequired": "10000",
          "priceUsd": "0.01"
        },
        "parameters": [
          {
            "name": "X-PAYMENT",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v1 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v2 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "X-TX-HASH",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Direct settled Base Mainnet USDC transfer transaction hash (0x + 64 hex)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "description": "Wallet or contract address string to validate and normalize."
                  },
                  "chain": {
                    "type": "string",
                    "description": "Optional chain constraint: auto, evm, tron, bitcoin, solana, ton, xrpl, cosmos, or stacks.",
                    "default": "auto"
                  },
                  "expectedNetwork": {
                    "type": "string",
                    "enum": [
                      "any",
                      "mainnet",
                      "testnet"
                    ],
                    "description": "Expected network environment (any, mainnet, or testnet).",
                    "default": "any"
                  }
                },
                "required": [
                  "address"
                ]
              },
              "example": {
                "address": "0xfEbDbB880C7f323c145d61683874a45540208a68",
                "chain": "evm",
                "expectedNetwork": "mainnet"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verified & settled deterministic tool output",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "valid": {
                          "type": "boolean"
                        },
                        "safeToTransact": {
                          "type": "boolean"
                        },
                        "riskLevel": {
                          "type": "string"
                        },
                        "chain": {
                          "type": "string"
                        },
                        "network": {
                          "type": "string"
                        },
                        "canonicalAddress": {
                          "type": "string"
                        }
                      }
                    },
                    "analysis": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input arguments (validated BEFORE payment settlement; $0 charged)"
          },
          "402": {
            "description": "x402 Payment Required challenge (`accepts` array for Base Mainnet USDC)"
          }
        }
      }
    },
    "/api/v1/audit-calldata": {
      "post": {
        "summary": "Decode & Audit Raw EVM Transaction Calldata ($0.01 USDC via x402 across Base, Celo, Arbitrum, Polygon, Optimism, Avalanche & Solana)",
        "description": "Deterministically decodes raw hex EVM transaction payloads (`to`, `value`, `data`, `chainId`) across ERC-20 (`transfer`, `approve`, `transferFrom`, `increaseAllowance`), ERC-721/1155 (`setApprovalForAll`, `safeTransferFrom`), Permit2, Uniswap V2/V3/UniversalRouter, 1inch, Multicall (recursive inner-call decoding), and Gnosis Safe `execTransaction`. Flags CRITICAL unlimited approvals, setApprovalForAll(true), zero-minOut MEV sandwich exposure, non-zero ETH sent with approvals, and DELEGATECALL takeovers.\n\n**x402 Payment**: `0.01 USDC` (`10000` atomic units) settled directly with 0% middleman fee to `0xfEbDbB880C7f323c145d61683874a45540208a68` on EVM (`Base`, `Celo USDC/USDT`, `Arbitrum`, `Polygon`, `Optimism`, `Avalanche`) or `2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC` on `Solana Mainnet` (`SPL USDC`).",
        "operationId": "decode_and_audit_evm_calldata",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0xcebA9300f2b948710d2653dD7B07f33A8B32118C",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42161",
                "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:137",
                "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:10",
                "asset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:43114",
                "asset": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
                "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                "payTo": "2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC"
              }
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          }
        },
        "x-402": {
          "scheme": "exact",
          "network": "base",
          "caip2Network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68",
          "maxAmountRequired": "10000",
          "priceUsd": "0.01"
        },
        "parameters": [
          {
            "name": "X-PAYMENT",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v1 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v2 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "X-TX-HASH",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Direct settled Base Mainnet USDC transfer transaction hash (0x + 64 hex)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "string",
                    "description": "Target 0x contract or recipient address."
                  },
                  "value": {
                    "type": "string",
                    "description": "Native ETH/gas token value in wei (decimal or 0x hex).",
                    "default": "0"
                  },
                  "data": {
                    "type": "string",
                    "description": "0x-prefixed hex calldata string.",
                    "default": "0x"
                  },
                  "chainId": {
                    "type": "number",
                    "description": "EVM Chain ID (default: 8453 Base).",
                    "default": 8453
                  },
                  "sender": {
                    "type": "string",
                    "description": "Optional sender 0x address for swap output-diversion checks."
                  },
                  "referenceTimestamp": {
                    "type": "number",
                    "description": "Optional Unix timestamp in seconds."
                  }
                },
                "required": [
                  "data"
                ]
              },
              "example": {
                "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "value": "0",
                "data": "0x095ea7b30000000000000000000000001111111254eeb25477b68fb85ed929f73a960582ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
                "chainId": 8453
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verified & settled deterministic tool output",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "safeToExecute": {
                          "type": "boolean"
                        },
                        "recommendation": {
                          "type": "string"
                        },
                        "riskLevel": {
                          "type": "string"
                        },
                        "riskScore": {
                          "type": "number"
                        },
                        "standard": {
                          "type": "string"
                        },
                        "functionName": {
                          "type": "string"
                        },
                        "findingCount": {
                          "type": "number"
                        }
                      }
                    },
                    "audit": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input arguments (validated BEFORE payment settlement; $0 charged)"
          },
          "402": {
            "description": "x402 Payment Required challenge (`accepts` array for Base Mainnet USDC)"
          }
        }
      }
    },
    "/api/v1/audit-eip712": {
      "post": {
        "summary": "Audit Off-Chain EIP-712 Typed-Data Signature Payload ($0.01 USDC via x402 across Base, Celo, Arbitrum, Polygon, Optimism, Avalanche & Solana)",
        "description": "Audits off-chain `eth_signTypedData_v4` JSON objects or strings (`Permit`, DAI `Permit`, `PermitSingle`, `PermitBatch`, `PermitTransferFrom`, Seaport `OrderComponents`, Circle USDC EIP-3009 `TransferWithAuthorization` / `x402`, `ForwardRequest`, `SafeTx`) before signing. Computes EIP-712 `domainSeparator` and flags unlimited allowances, Seaport zero-consideration drains, DELEGATECALL meta-txs, multi-month expirations, and chainId/contract spoofing.\n\n**x402 Payment**: `0.01 USDC` (`10000` atomic units) settled directly with 0% middleman fee to `0xfEbDbB880C7f323c145d61683874a45540208a68` on EVM (`Base`, `Celo USDC/USDT`, `Arbitrum`, `Polygon`, `Optimism`, `Avalanche`) or `2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC` on `Solana Mainnet` (`SPL USDC`).",
        "operationId": "audit_eip712_signature_payload",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0xcebA9300f2b948710d2653dD7B07f33A8B32118C",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42161",
                "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:137",
                "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:10",
                "asset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:43114",
                "asset": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
                "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                "payTo": "2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC"
              }
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          }
        },
        "x-402": {
          "scheme": "exact",
          "network": "base",
          "caip2Network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68",
          "maxAmountRequired": "10000",
          "priceUsd": "0.01"
        },
        "parameters": [
          {
            "name": "X-PAYMENT",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v1 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v2 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "X-TX-HASH",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Direct settled Base Mainnet USDC transfer transaction hash (0x + 64 hex)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "typedData": {
                    "description": "eth_signTypedData_v4 JSON object or serialized JSON string."
                  },
                  "expectedChainId": {
                    "type": "number",
                    "description": "Optional expected EVM chainId."
                  },
                  "expectedVerifyingContract": {
                    "type": "string",
                    "description": "Optional expected 0x verifyingContract."
                  },
                  "expectedRecipient": {
                    "type": "string",
                    "description": "Optional expected 0x recipient for x402 / EIP-3009."
                  },
                  "expectedMaxAmount": {
                    "type": "string",
                    "description": "Optional maximum expected raw token amount."
                  },
                  "referenceTimestamp": {
                    "type": "number",
                    "description": "Optional Unix timestamp in seconds."
                  }
                },
                "required": [
                  "typedData"
                ]
              },
              "example": {
                "typedData": {
                  "domain": {
                    "name": "USD Coin",
                    "version": "2",
                    "chainId": 8453,
                    "verifyingContract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
                  },
                  "primaryType": "TransferWithAuthorization",
                  "types": {
                    "TransferWithAuthorization": [
                      {
                        "name": "from",
                        "type": "address"
                      },
                      {
                        "name": "to",
                        "type": "address"
                      },
                      {
                        "name": "value",
                        "type": "uint256"
                      },
                      {
                        "name": "validAfter",
                        "type": "uint256"
                      },
                      {
                        "name": "validBefore",
                        "type": "uint256"
                      },
                      {
                        "name": "nonce",
                        "type": "bytes32"
                      }
                    ]
                  },
                  "message": {
                    "from": "0x1111111111111111111111111111111111111111",
                    "to": "0xfEbDbB880C7f323c145d61683874a45540208a68",
                    "value": "10000",
                    "validAfter": "0",
                    "validBefore": "1893456000",
                    "nonce": "0x0000000000000000000000000000000000000000000000000000000000000001"
                  }
                },
                "expectedChainId": 8453
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verified & settled deterministic tool output",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "safeToSign": {
                          "type": "boolean"
                        },
                        "recommendation": {
                          "type": "string"
                        },
                        "riskLevel": {
                          "type": "string"
                        },
                        "riskScore": {
                          "type": "number"
                        },
                        "schemaCategory": {
                          "type": "string"
                        },
                        "primaryType": {
                          "type": "string"
                        },
                        "findingCount": {
                          "type": "number"
                        }
                      }
                    },
                    "audit": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input arguments (validated BEFORE payment settlement; $0 charged)"
          },
          "402": {
            "description": "x402 Payment Required challenge (`accepts` array for Base Mainnet USDC)"
          }
        }
      }
    },
    "/api/v1/repair-cjk-csv": {
      "post": {
        "summary": "Repair CJK CSV Mojibake & Neutralize Formula Injection ($0.01 USDC via x402 across Base, Celo, Arbitrum, Polygon, Optimism, Avalanche & Solana)",
        "description": "Detects and repairs garbled Chinese/Japanese/Korean CSV/TSV exports from GB18030, GBK, Big5, Shift-JIS, EUC-KR, UTF-16LE/BE, and double-encoded UTF-8-as-Latin1/CP1252; heals unquoted currency thousands commas; strips dangerous control bytes; armors 15+ digit IDs; and neutralizes OWASP CSV/DDE formula injection (=, +, -, @) into Excel-ready UTF-8 BOM CSV + structured JSON rows.\n\n**x402 Payment**: `0.01 USDC` (`10000` atomic units) settled directly with 0% middleman fee to `0xfEbDbB880C7f323c145d61683874a45540208a68` on EVM (`Base`, `Celo USDC/USDT`, `Arbitrum`, `Polygon`, `Optimism`, `Avalanche`) or `2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC` on `Solana Mainnet` (`SPL USDC`).",
        "operationId": "repair_cjk_csv_mojibake",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0xcebA9300f2b948710d2653dD7B07f33A8B32118C",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42161",
                "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:137",
                "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:10",
                "asset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:43114",
                "asset": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
                "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                "payTo": "2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC"
              }
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          }
        },
        "x-402": {
          "scheme": "exact",
          "network": "base",
          "caip2Network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68",
          "maxAmountRequired": "10000",
          "priceUsd": "0.01"
        },
        "parameters": [
          {
            "name": "X-PAYMENT",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v1 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v2 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "X-TX-HASH",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Direct settled Base Mainnet USDC transfer transaction hash (0x + 64 hex)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string",
                    "description": "Optional source filename (e.g. alipay_export.csv)",
                    "default": "export.csv"
                  },
                  "contentBase64": {
                    "type": "string",
                    "description": "Base64-encoded raw CSV bytes (GBK/GB18030/Big5/Shift-JIS/EUC-KR/UTF-16)"
                  },
                  "content": {
                    "type": "string",
                    "description": "Garbled or raw CSV text (e.g. UTF-8 bytes mis-decoded as Latin-1/Windows-1252)"
                  }
                }
              },
              "example": {
                "filename": "alipay_export.csv",
                "content": "订单号,商户名称,金额\n202611240001,阿里云计算,¥1,250.00\n"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verified & settled deterministic tool output",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "summary": {
                      "type": "object"
                    },
                    "headers": {
                      "type": "array"
                    },
                    "rows": {
                      "type": "array"
                    },
                    "utf8BomCsv": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input arguments (validated BEFORE payment settlement; $0 charged)"
          },
          "402": {
            "description": "x402 Payment Required challenge (`accepts` array for Base Mainnet USDC)"
          }
        }
      }
    },
    "/api/v1/extract-tables": {
      "post": {
        "summary": "Extract & Clean Multi-Page PDF / HTML / Messy Tables to OpenXML XLSX ($0.02 USDC via x402 across Base, Celo, Arbitrum, Polygon, Optimism, Avalanche & Solana)",
        "description": "Extracts tables from multi-page PDF binaries (Base64), HTML (with 2D rowspan/colspan expansion), Markdown, JSON/JSONL, or messy CSVs; stitches repeating headers across page breaks, repairs CJK mojibake, neutralizes Excel formula/DDE injection on user cells while generating live =SUM() and =AVERAGE() summary rows, and outputs Base64 OpenXML .xlsx, Markdown, and UTF-8 BOM CSV.\n\n**x402 Payment**: `0.02 USDC` (`20000` atomic units) settled directly with 0% middleman fee to `0xfEbDbB880C7f323c145d61683874a45540208a68` on EVM (`Base`, `Celo USDC/USDT`, `Arbitrum`, `Polygon`, `Optimism`, `Avalanche`) or `2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC` on `Solana Mainnet` (`SPL USDC`).",
        "operationId": "extract_and_clean_pdf_tables_to_xlsx",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0xcebA9300f2b948710d2653dD7B07f33A8B32118C",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42161",
                "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:137",
                "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:10",
                "asset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:43114",
                "asset": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
                "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                "payTo": "2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC"
              }
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          }
        },
        "x-402": {
          "scheme": "exact",
          "network": "base",
          "caip2Network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68",
          "maxAmountRequired": "20000",
          "priceUsd": "0.02"
        },
        "parameters": [
          {
            "name": "X-PAYMENT",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v1 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v2 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "X-TX-HASH",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Direct settled Base Mainnet USDC transfer transaction hash (0x + 64 hex)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string",
                    "description": "Input filename with extension hint (e.g. report.pdf, table.html)",
                    "default": "document.html"
                  },
                  "contentBase64": {
                    "type": "string",
                    "description": "Base64-encoded PDF or legacy-encoded file bytes"
                  },
                  "content": {
                    "type": "string",
                    "description": "Direct HTML, Markdown, CSV, or JSON string payload"
                  },
                  "mergePages": {
                    "type": "boolean",
                    "description": "Stitch multi-page continuation tables sharing identical headers (default: true)",
                    "default": true
                  },
                  "dedupeRows": {
                    "type": "boolean",
                    "description": "Remove exact duplicate rows across pages (default: false)",
                    "default": false
                  },
                  "injectFormulas": {
                    "type": "boolean",
                    "description": "Append live =SUM() and =AVERAGE() summary rows to numeric columns (default: true)",
                    "default": true
                  }
                }
              },
              "example": {
                "filename": "quarterly.html",
                "content": "<table><tr><th>Item</th><th>Amount</th></tr><tr><td>Cloud Compute</td><td>120.50</td></tr></table>"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verified & settled deterministic tool output",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "summary": {
                      "type": "object"
                    },
                    "tables": {
                      "type": "array"
                    },
                    "markdown": {
                      "type": "string"
                    },
                    "utf8BomCsv": {
                      "type": "string"
                    },
                    "xlsxBase64": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input arguments (validated BEFORE payment settlement; $0 charged)"
          },
          "402": {
            "description": "x402 Payment Required challenge (`accepts` array for Base Mainnet USDC)"
          }
        }
      }
    },
    "/api/v1/reconcile-statements": {
      "post": {
        "summary": "Reconcile Bank / Payment Statements & Electronic Invoices ($0.02 USDC via x402 across Base, Celo, Arbitrum, Polygon, Optimism, Avalanche & Solana)",
        "description": "Deterministically reconciles Alipay, WeChat Pay, Stripe, PayPal, or bank CSV/JSON statements against electronic invoices (CN Digital e-Invoice XML/PDF, UBL 2.1 XML, CSV, JSON) using exact BigInt micro-unit math: 1:1 order-ID matching, vendor+amount+date matching, cross-currency FX spread matching, and N-to-1 subset-sum combined invoice matching. Outputs structured JSON summary, anomaly alerts, UTF-8 BOM CSV, and Base64 3-sheet OpenXML .xlsx workbook.\n\n**x402 Payment**: `0.02 USDC` (`20000` atomic units) settled directly with 0% middleman fee to `0xfEbDbB880C7f323c145d61683874a45540208a68` on EVM (`Base`, `Celo USDC/USDT`, `Arbitrum`, `Polygon`, `Optimism`, `Avalanche`) or `2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC` on `Solana Mainnet` (`SPL USDC`).",
        "operationId": "reconcile_statements_and_invoices",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0xcebA9300f2b948710d2653dD7B07f33A8B32118C",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42161",
                "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:137",
                "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:10",
                "asset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:43114",
                "asset": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
                "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                "payTo": "2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC"
              }
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          }
        },
        "x-402": {
          "scheme": "exact",
          "network": "base",
          "caip2Network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68",
          "maxAmountRequired": "20000",
          "priceUsd": "0.02"
        },
        "parameters": [
          {
            "name": "X-PAYMENT",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v1 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v2 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "X-TX-HASH",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Direct settled Base Mainnet USDC transfer transaction hash (0x + 64 hex)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "statements": {
                    "type": "array",
                    "description": "List of payment statement files ({ filename, content? | contentBase64? }) from Alipay, WeChat Pay, Stripe, or bank CSV/JSON exports.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "filename": {
                          "type": "string"
                        },
                        "content": {
                          "type": "string"
                        },
                        "contentBase64": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "filename"
                      ]
                    }
                  },
                  "invoices": {
                    "type": "array",
                    "description": "List of electronic invoice files ({ filename, content? | contentBase64? }).",
                    "items": {
                      "type": "object",
                      "properties": {
                        "filename": {
                          "type": "string"
                        },
                        "content": {
                          "type": "string"
                        },
                        "contentBase64": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "filename"
                      ]
                    }
                  },
                  "baseCurrency": {
                    "type": "string",
                    "default": "CNY"
                  },
                  "expectedBuyerName": {
                    "type": "string"
                  },
                  "expectedBuyerTaxId": {
                    "type": "string"
                  },
                  "dateWindowDays": {
                    "type": "number",
                    "default": 45
                  },
                  "includeXlsxBase64": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "required": [
                  "statements"
                ]
              },
              "example": {
                "statements": [
                  {
                    "filename": "stripe_nov.csv",
                    "content": "id,date,merchant,amount,currency\nord_1001,2026-11-20,AWS Cloud,99.00,USD\n"
                  }
                ],
                "invoices": [
                  {
                    "filename": "inv_aws.json",
                    "content": "{\"invoiceNumber\":\"INV-9001\",\"orderId\":\"ord_1001\",\"sellerName\":\"AWS Cloud\",\"issueDate\":\"2026-11-21\",\"totalAmount\":99.00,\"currency\":\"USD\"}"
                  }
                ],
                "baseCurrency": "USD"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verified & settled deterministic tool output",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "summary": {
                      "type": "object"
                    },
                    "transactions": {
                      "type": "array"
                    },
                    "invoices": {
                      "type": "array"
                    },
                    "anomalies": {
                      "type": "array"
                    },
                    "utf8BomCsv": {
                      "type": "string"
                    },
                    "xlsxBase64": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input arguments (validated BEFORE payment settlement; $0 charged)"
          },
          "402": {
            "description": "x402 Payment Required challenge (`accepts` array for Base Mainnet USDC)"
          }
        }
      }
    },
    "/api/v1/scan-token-risk": {
      "post": {
        "summary": "Live On-Chain Base, Celo & Solana Token Technical Risk Scanner ($0.01 USDC via x402 across Base, Celo, Arbitrum, Polygon, Optimism, Avalanche & Solana)",
        "description": "Automated technical token risk signals for software and agent workflows (not investment or financial advice). Queries public permissionless JSON-RPC state on Base Mainnet (`8453`), Celo Mainnet (`42220`), and Solana Mainnet directly to inspect EIP-1967 upgradeable proxies, unrenounced `owner()`, `SELFDESTRUCT`/`DELEGATECALL`/blacklist/fee-setter bytecode selectors, on-chain Uniswap V2/V3, Ubeswap & Aerodrome pool contract reserves + LP burn %, live `eth_call` `transfer()` simulation, Solana `mintAuthority`/`freezeAuthority`, Token-2022 `permanentDelegate`/`transferFeeConfig`/`transferHook` extensions, and Top-1/Top-5/Top-10 holder concentration.\n\n**x402 Payment**: `0.01 USDC` (`10000` atomic units) settled directly with 0% middleman fee to `0xfEbDbB880C7f323c145d61683874a45540208a68` on EVM (`Base`, `Celo USDC/USDT`, `Arbitrum`, `Polygon`, `Optimism`, `Avalanche`) or `2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC` on `Solana Mainnet` (`SPL USDC`).",
        "operationId": "scan_token_rug_risk",
        "x-payment-info": {
          "protocols": [
            {
              "x402": {
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0xcebA9300f2b948710d2653dD7B07f33A8B32118C",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42220",
                "asset": "0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:42161",
                "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:137",
                "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:10",
                "asset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "eip155:43114",
                "asset": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
                "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68"
              }
            },
            {
              "x402": {
                "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
                "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
                "payTo": "2h68rTXHZW65UWnM1uXnE5ABD4Tj62qN14vFZvVaX3bC"
              }
            }
          ],
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          }
        },
        "x-402": {
          "scheme": "exact",
          "network": "base",
          "caip2Network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0xfEbDbB880C7f323c145d61683874a45540208a68",
          "maxAmountRequired": "10000",
          "priceUsd": "0.01"
        },
        "parameters": [
          {
            "name": "X-PAYMENT",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v1 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Base64-encoded x402 v2 EIP-3009 Base USDC payment payload."
          },
          {
            "name": "X-TX-HASH",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Direct settled Base Mainnet USDC transfer transaction hash (0x + 64 hex)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tokenAddress": {
                    "type": "string",
                    "description": "Base / Celo Mainnet ERC-20 contract address (0x + 40 hex) or Solana SPL / Token-2022 mint address (32–44 Base58 chars)."
                  },
                  "chain": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "base",
                      "celo",
                      "solana"
                    ],
                    "description": "Target chain: auto (default), base, celo, or solana.",
                    "default": "auto"
                  }
                },
                "required": [
                  "tokenAddress"
                ]
              },
              "example": {
                "tokenAddress": "0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed",
                "chain": "base"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verified & settled deterministic tool output",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    },
                    "summary": {
                      "type": "object",
                      "properties": {
                        "chain": {
                          "type": "string"
                        },
                        "tokenAddress": {
                          "type": "string"
                        },
                        "safeToTrade": {
                          "type": "boolean"
                        },
                        "recommendation": {
                          "type": "string"
                        },
                        "riskLevel": {
                          "type": "string"
                        },
                        "riskScore": {
                          "type": "number"
                        },
                        "findingCount": {
                          "type": "number"
                        },
                        "latencyMs": {
                          "type": "number"
                        }
                      }
                    },
                    "scan": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input arguments (validated BEFORE payment settlement; $0 charged)"
          },
          "402": {
            "description": "x402 Payment Required challenge (`accepts` array for Base Mainnet USDC)"
          }
        }
      }
    }
  }
}