{
  "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": "Use POST /audit/evm-hook-check with a 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 POST /audit/stacks-erc8004-check for Stacks Mainnet ERC-8004 & Clarity security audits. Use POST /intel/expired-domains-feed for expired high-traffic package domains. Use POST /forensics/bsc-funder-cluster for Sybil & first-funder wallet attribution. Use POST /kits/zero-gas-erc8004 for the Zero-Gas ERC-8004 Agent Identity & Reputation Kit.",
    "contact": {
      "name": "scavenger-osan",
      "email": "osan20170417@gmail.com",
      "url": "https://scavenger-labs-api.serveousercontent.com"
    }
  },
  "servers": [
    {
      "url": "https://scavenger-labs-api.serveousercontent.com"
    }
  ],
  "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/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": {}
            }
          ]
        },
        "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)"
          }
        }
      }
    },
    "/audit/stacks-erc8004-check": {
      "get": {
        "operationId": "stacks_erc8004_check_get",
        "summary": "Stacks Mainnet ERC-8004 & Clarity Contract Auditor",
        "description": "Verifies Stacks Mainnet ERC-8004 agent identity, reputation-registry-v2 feedback, validation-registry-v2 attestations, and audits Clarity contracts for tx-sender vs contract-caller vulnerabilities.",
        "tags": [
          "Security"
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "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": "stacks_erc8004_check",
        "summary": "Stacks Mainnet ERC-8004 & Clarity Contract Auditor",
        "description": "Verifies Stacks Mainnet ERC-8004 agent identity, reputation-registry-v2 feedback, validation-registry-v2 attestations, and audits Clarity contracts for tx-sender vs contract-caller vulnerabilities.",
        "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": {
                  "target": {
                    "type": "string",
                    "description": "Stacks principal, contract ID (SP...contract), or agent_id"
                  }
                },
                "required": [
                  "target"
                ]
              },
              "example": {
                "target": "SP296EH1ZXQ4P0S8PMGB03JR1JT9WYYCY5Z1KFW69.scavenger-validator-v1"
              }
            }
          }
        },
        "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)"
          }
        }
      }
    },
    "/intel/expired-domains-feed": {
      "get": {
        "operationId": "expired_domains_feed_get",
        "summary": "High-Traffic Expired Package & Repo Domain Intelligence Feed",
        "description": "Live feed of expired/redeemable domains still referenced by active NPM packages (up to 229K monthly downloads), Homebrew formulas, Crates.io crates, and GitHub repositories.",
        "tags": [
          "Data"
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "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": "expired_domains_feed",
        "summary": "High-Traffic Expired Package & Repo Domain Intelligence Feed",
        "description": "Live feed of expired/redeemable domains still referenced by active NPM packages (up to 229K monthly downloads), Homebrew formulas, Crates.io crates, and GitHub repositories.",
        "tags": [
          "Data"
        ],
        "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": {
                  "ecosystem": {
                    "type": "string",
                    "description": "Filter by ecosystem: all, npm, homebrew, crates, github",
                    "default": "all"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Max records to return (default 25)",
                    "default": 25
                  }
                }
              },
              "example": {
                "ecosystem": "all",
                "limit": 25
              }
            }
          }
        },
        "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)"
          }
        }
      }
    },
    "/forensics/bsc-funder-cluster": {
      "get": {
        "operationId": "bsc_funder_cluster_get",
        "summary": "EVM / BSC First-Funder & Sybil Treasury Attribution Engine",
        "description": "Traces first-funder lineages, shared gas distributor wallets, vanity address clusters, and CEX hot-wallet deposit endpoints across BSC, Base, Ethereum, and Arbitrum.",
        "tags": [
          "Analytics"
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "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": "bsc_funder_cluster",
        "summary": "EVM / BSC First-Funder & Sybil Treasury Attribution Engine",
        "description": "Traces first-funder lineages, shared gas distributor wallets, vanity address clusters, and CEX hot-wallet deposit endpoints across BSC, Base, Ethereum, and Arbitrum.",
        "tags": [
          "Analytics"
        ],
        "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": {
                  "address": {
                    "type": "string",
                    "description": "Target 0x wallet or treasury contract address"
                  },
                  "chain": {
                    "type": "string",
                    "description": "Chain name: base, bsc, ethereum, arbitrum",
                    "default": "bsc"
                  }
                },
                "required": [
                  "address"
                ]
              },
              "example": {
                "address": "0x5A6B4A3832699c622014c005C2e8200D499807f3",
                "chain": "bsc"
              }
            }
          }
        },
        "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)"
          }
        }
      }
    },
    "/kits/zero-gas-erc8004": {
      "get": {
        "operationId": "zero_gas_erc8004_get",
        "summary": "Zero-Gas ERC-8004 Agent Identity, Reputation & Validation Kit",
        "description": "Complete production bundle (Python + Clarity + EIP-712/BIP-322/SIP-018) to register an AI agent on Base & Stacks Mainnet ERC-8004 registries and achieve 5/5 reputation + 100/100 validation with $0 gas.",
        "tags": [
          "Developer-Tools"
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "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": "zero_gas_erc8004",
        "summary": "Zero-Gas ERC-8004 Agent Identity, Reputation & Validation Kit",
        "description": "Complete production bundle (Python + Clarity + EIP-712/BIP-322/SIP-018) to register an AI agent on Base & Stacks Mainnet ERC-8004 registries and achieve 5/5 reputation + 100/100 validation with $0 gas.",
        "tags": [
          "Developer-Tools"
        ],
        "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": {
                  "agent_name": {
                    "type": "string",
                    "description": "Optional agent handle to pre-fill in templates",
                    "default": "my-agent"
                  }
                }
              },
              "example": {
                "agent_name": "autonomous-agent-01"
              }
            }
          }
        },
        "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)"
          }
        }
      }
    },
    "/forensics/sybil-funder-check": {
      "get": {
        "operationId": "sybil_funder_check_get",
        "summary": "EVM & Base Sybil First-Funder & Treasury Cluster Check",
        "description": "Fast single-address Sybil first-funder lineage, vanity prefix, and coordinated treasury attribution check across Base (8453) and BSC (56).",
        "tags": [
          "Analytics"
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "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": "sybil_funder_check",
        "summary": "EVM & Base Sybil First-Funder & Treasury Cluster Check",
        "description": "Fast single-address Sybil first-funder lineage, vanity prefix, and coordinated treasury attribution check across Base (8453) and BSC (56).",
        "tags": [
          "Analytics"
        ],
        "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": {
                  "address": {
                    "type": "string",
                    "description": "Target 0x wallet or treasury contract address"
                  },
                  "chain": {
                    "type": "string",
                    "description": "Chain name: base, bsc, ethereum, arbitrum",
                    "default": "base"
                  }
                },
                "required": [
                  "address"
                ]
              },
              "example": {
                "address": "0x5A6B4A3832699c622014c005C2e8200D499807f3",
                "chain": "base"
              }
            }
          }
        },
        "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)"
          }
        }
      }
    },
    "/kits/erc8004-registration-kit": {
      "get": {
        "operationId": "erc8004_registration_kit_get",
        "summary": "Zero-Gas ERC-8004 Quickstart Registration & Reputation Reference",
        "description": "Structured JSON quickstart reference with verified relay endpoints, EIP-712/BIP-322 signing parameters, and on-chain reference transactions for $0-gas Base & Stacks ERC-8004 registration.",
        "tags": [
          "Developer-Tools"
        ],
        "security": [
          {
            "x402": []
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "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": "erc8004_registration_kit",
        "summary": "Zero-Gas ERC-8004 Quickstart Registration & Reputation Reference",
        "description": "Structured JSON quickstart reference with verified relay endpoints, EIP-712/BIP-322 signing parameters, and on-chain reference transactions for $0-gas Base & Stacks ERC-8004 registration.",
        "tags": [
          "Developer-Tools"
        ],
        "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": {
                  "agent_name": {
                    "type": "string",
                    "description": "Optional agent handle to pre-fill in templates",
                    "default": "my-agent"
                  }
                }
              },
              "example": {
                "agent_name": "quickstart-agent-01"
              }
            }
          }
        },
        "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)"
          }
        }
      }
    }
  }
}