{
  "openapi": "3.0.3",
  "info": {
    "title": "Token Risk & Honeypot Screening (x402)",
    "description": "Pay-per-call token risk screening for agents. USDC on Base via x402.",
    "version": "0.3.1"
  },
  "servers": [{ "url": "https://213-165-37-71.sslip.io" }],
  "paths": {
    "/v1/jetton/risk": {
      "get": {
        "summary": "TON jetton risk & honeypot screening",
        "description": "Risk and honeypot screening for any TON jetton by address. Returns a 0-100 risk score with flags: mint not revoked, admin present, holder concentration, DEX liquidity, taxable transfers, blacklist.",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "description": "TON jetton master address (EQ... friendly form)",
            "schema": { "type": "string", "example": "EQD-cvR0Nz6XAyRBvbhz-abTrRC6sI5tvHvvpeQraV9UAAD7" }
          }
        ],
        "responses": {
          "200": {
            "description": "Risk assessment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "address": { "type": "string" },
                    "symbol": { "type": "string", "nullable": true },
                    "mintRevoked": { "type": "boolean" },
                    "holdersCount": { "type": "integer", "nullable": true },
                    "honeypot": { "type": "object" },
                    "liquidity": { "type": "object" },
                    "score": { "type": "integer", "minimum": 0, "maximum": 100 },
                    "flags": { "type": "array", "items": { "type": "string" } }
                  }
                }
              }
            }
          },
          "402": { "description": "Payment required (x402, USDC on Base)" }
        }
      }
    },
    "/v1/evm/token/risk": {
      "get": {
        "summary": "EVM token risk & honeypot screening",
        "description": "Honeypot and rug-pull screening for any ERC-20 token by contract address. Chains: Ethereum, BSC, Base, Arbitrum, Polygon, Optimism, Avalanche. Static contract analysis plus live buy/sell simulation. Returns a 0-100 risk score with flags.",
        "parameters": [
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "description": "Chain name or id (default: base)",
            "schema": {
              "type": "string",
              "enum": ["ethereum", "bsc", "base", "arbitrum", "polygon", "optimism", "avalanche"],
              "default": "base"
            }
          },
          {
            "name": "address",
            "in": "query",
            "required": true,
            "description": "0x-prefixed ERC-20 contract address",
            "schema": { "type": "string", "pattern": "^0x[0-9a-fA-F]{40}$", "example": "0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed" }
          }
        ],
        "responses": {
          "200": {
            "description": "Risk assessment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "chain": { "type": "object" },
                    "address": { "type": "string" },
                    "symbol": { "type": "string", "nullable": true },
                    "honeypot": { "type": "object" },
                    "contract": { "type": "object" },
                    "owner": { "type": "object" },
                    "liquidity": { "type": "object" },
                    "holders": { "type": "object" },
                    "score": { "type": "integer", "minimum": 0, "maximum": 100 },
                    "flags": { "type": "array", "items": { "type": "string" } }
                  }
                }
              }
            }
          },
          "402": { "description": "Payment required (x402, USDC on Base)" }
        }
      }
    }
  }
}
