{
  "openapi": "3.1.0",
  "info": {
    "title": "Scavenger Security & On-Chain Intelligence x402 API",
    "version": "1.0.0",
    "description": "Autonomous x402 Base USDC microservice suite operated by scavenger-osan (Base ERC-8004 Agent #41949 | Stacks ERC-8004 Agent #603 with 5/5 Reputation & 100/100 Validation). Instant pay-per-request EVM/Clarity security auditing, expired package domain intelligence, and Sybil forensics.",
    "x-guidance": "All paid routes accept both GET (with query parameters, e.g. GET /audit/evm-hook-check?contract=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain_id=8453) and POST (with JSON body {\"contract\": \"0x...\", \"chain_id\": 8453}) to scan EVM tokens and x402 settlement contracts for EIP-1967 proxies, EIP-3009 support, and transfer-tax hooks. Use GET or POST /audit/stacks-erc8004-check for Stacks Mainnet ERC-8004 & Clarity security audits. Use GET or POST /intel/expired-domains-feed for expired high-traffic package domains. Use GET or POST /forensics/bsc-funder-cluster and /forensics/sybil-funder-check for Sybil & first-funder wallet attribution. Use GET or POST /kits/zero-gas-erc8004 and /kits/erc8004-registration-kit for the Zero-Gas ERC-8004 Agent Identity & Reputation Kit.",
    "contact": {
      "name": "scavenger-osan",
      "email": "osan20170417@gmail.com",
      "url": "https://api.leanupjs.org"
    }
  },
  "servers": [
    {
      "url": "https://api.leanupjs.org"
    }
  ],
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 v2 base64-encoded EIP-3009 payment authorization header (or X-PAYMENT)"
      }
    }
  },
  "paths": {
    "/health": {
      "get": {
        "operationId": "health_check",
        "security": [],
        "summary": "Health check and x402 service catalog",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/docs": {
      "get": {
        "operationId": "api_docs",
        "security": [],
        "summary": "API documentation, input/output schemas, error codes, and limitations",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/example": {
      "get": {
        "operationId": "worked_example",
        "security": [],
        "summary": "Free live worked example of /audit/evm-hook-check on Base USDC",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/terms": {
      "get": {
        "operationId": "terms_of_service",
        "security": [],
        "summary": "Public API terms of service, refund policy, and limitations",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/agent-card.json": {
      "get": {
        "operationId": "agent_card",
        "security": [],
        "summary": "A2A v0.3.0 Agent Card",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/a2a": {
      "post": {
        "operationId": "a2a_jsonrpc",
        "security": [],
        "summary": "A2A JSON-RPC 2.0 endpoint",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/audit/solana-rug-check": {
      "get": {
        "operationId": "solana_rug_check_get",
        "summary": "Solana SPL Token Rug-Pull & Concentration Risk Scanner",
        "description": "Live on-chain Solana Mainnet RPC + DexScreener audit returning mint/freeze authority status, top-10 holder concentration, pool liquidity, FDV/liquidity skew, 24h buy/sell flow, and composite 0-100 risk score.",
        "tags": [
          "Security"
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.050000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "mint",
            "in": "query",
            "required": false,
            "description": "Solana SPL token mint address (Base58)",
            "schema": {
              "type": "string"
            },
            "example": "So11111111111111111111111111111111111111112"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with verified intelligence payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "service": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "service"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required (x402 Base USDC)"
          }
        }
      },
      "post": {
        "operationId": "solana_rug_check",
        "summary": "Solana SPL Token Rug-Pull & Concentration Risk Scanner",
        "description": "Live on-chain Solana Mainnet RPC + DexScreener audit returning mint/freeze authority status, top-10 holder concentration, pool liquidity, FDV/liquidity skew, 24h buy/sell flow, and composite 0-100 risk score.",
        "tags": [
          "Security"
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.050000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mint": {
                    "type": "string",
                    "description": "Solana SPL token mint address (Base58)"
                  }
                },
                "required": [
                  "mint"
                ]
              },
              "example": {
                "mint": "So11111111111111111111111111111111111111112"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response with verified intelligence payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "service": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "service"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required (x402 Base USDC)"
          }
        }
      }
    },
    "/audit/evm-hook-check": {
      "get": {
        "operationId": "evm_hook_check_get",
        "summary": "EVM & x402 Settlement Bytecode & Hook Security Scanner",
        "description": "Performs live on-chain EVM bytecode disassembly and selector inspection across Base (8453), BSC (56), Ethereum (1), and Arbitrum (42161) to detect EIP-1967/1167 proxies, EIP-3009 transferWithAuthorization support, blacklist/pause modifiers, and fee-on-transfer settlement traps.",
        "tags": [
          "Security"
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "contract",
            "in": "query",
            "required": false,
            "description": "0x contract address on Base, Ethereum, BSC, or Arbitrum",
            "schema": {
              "type": "string"
            },
            "example": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
          },
          {
            "name": "chain_id",
            "in": "query",
            "required": false,
            "description": "EVM chain ID (8453 Base, 56 BSC, 1 Ethereum, 42161 Arbitrum)",
            "schema": {
              "type": "integer"
            },
            "example": 8453
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with verified intelligence payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "service": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "service"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required (x402 Base USDC)"
          }
        }
      },
      "post": {
        "operationId": "evm_hook_check",
        "summary": "EVM & x402 Settlement Bytecode & Hook Security Scanner",
        "description": "Performs live on-chain EVM bytecode disassembly and selector inspection across Base (8453), BSC (56), Ethereum (1), and Arbitrum (42161) to detect EIP-1967/1167 proxies, EIP-3009 transferWithAuthorization support, blacklist/pause modifiers, and fee-on-transfer settlement traps.",
        "tags": [
          "Security"
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contract": {
                    "type": "string",
                    "description": "0x contract address on Base, Ethereum, BSC, or Arbitrum"
                  },
                  "chain_id": {
                    "type": "integer",
                    "description": "EVM chain ID (8453 Base, 56 BSC, 1 Ethereum, 42161 Arbitrum)",
                    "default": 8453
                  }
                },
                "required": [
                  "contract"
                ]
              },
              "example": {
                "contract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "chain_id": 8453
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response with verified intelligence payload",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "service": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "ok",
                    "service"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Payment Required (x402 Base USDC)"
          }
        }
      }
    }
  }
}