# Web3Guard Pro (v1.0.0)

> Web3Guard Pro is a unified multi-chain Web3 security API gateway combining pre-trade token honeypot & tax simulation (Base, BSC, Arbitrum, Solana), pre-sign EVM anti-drainer transaction & EIP-712 Permit auditing with live OFAC/ScamSniffer/MEW threat feeds (Base, Ethereum, Arbitrum, Optimism, Polygon, BSC), and 6-chain wallet risk & whale profiling under one API key and one deterministic JSON schema.

## Base URL
https://guard.dovafy.com

## Authentication
- RapidAPI subscribers: automatic via RapidAPI gateway (X-RapidAPI-Proxy-Secret).
- Direct / Apify clients: header `X-API-Key: <key>` or `Authorization: Bearer <key>`.
- Pay-per-call AI agents (x402): Base mainnet USDC (eip155:8453) settled to 0x1519E99078EBaB798ef52326b67E5b28603A20ec ($0.005 token, $0.01 tx/permit, $0.01 wallet, $0.015 pre-trade bundle, $0.05 batch up to 10).

## Endpoints
- `GET https://guard.dovafy.com/v1/token/check?chain={base|bsc|arbitrum|solana}&address={addr}` — Pre-trade honeypot, buy/sell tax, Token-2022 & rug check.
- `POST https://guard.dovafy.com/v1/tx/simulate` — Pre-sign EVM transaction calldata audit, bytecode scan, live OFAC/ScamSniffer screening & eth_call simulation (Base, Ethereum, Arbitrum, Optimism, Polygon, BSC).
- `POST https://guard.dovafy.com/v1/permit/check` — Pre-sign EIP-712 Permit, Permit2, Seaport, SafeTx & raw eth_sign phishing audit (6 EVM chains).
- `GET https://guard.dovafy.com/v1/wallet/risk?address={0x...}` — 6-chain OFAC/drainer screening, approval exposure & whale tiering.
- `GET https://guard.dovafy.com/v1/bundle/pre-trade?chain=...&token=...&wallet=...` — Concurrent token + wallet pre-trade bundle.
- `POST https://guard.dovafy.com/v1/batch/check` — Bulk screening of up to 50 tokens/wallets per request.
- `GET https://guard.dovafy.com/v1/sample` — Free cached live sample output.
- `GET https://guard.dovafy.com/health` — Free 7-chain RPC & threat-feed health probe.

## Machine Discovery
- Full AI Reference: https://guard.dovafy.com/llms-full.txt
- OpenAPI 3.1: https://guard.dovafy.com/openapi.json
- x402 Manifest: https://guard.dovafy.com/.well-known/x402
- A2A Agent Card: https://guard.dovafy.com/.well-known/agent.json

## Unified Response Envelope
Every authenticated 200 OK response uses the exact same deterministic top-level envelope:
```json
{
  "ok": true,
  "gateway": "Web3Guard Pro",
  "version": "1.0.0",
  "endpoint": "token_check | tx_simulate | permit_check | wallet_risk | bundle_pre_trade | batch_check",
  "chain": "base",
  "verdict": "SAFE | CAUTION | DANGER | UNKNOWN",
  "riskLevel": "LOW | MEDIUM | HIGH | CRITICAL",
  "action": "ALLOW | REVIEW | WARN | BLOCK",
  "score": 96,
  "summary": "Human- and agent-readable explanation backed by on-chain evidence.",
  "data": { "...full engine output..." },
  "meta": { "authChannel": "rapidapi | internal | api_key | x402", "latencyMs": 220, "checkedAt": "ISO-8601" }
}
```

## Quickstart Examples
```bash
# 1. Free live multi-engine sample (no key required)
curl "https://guard.dovafy.com/v1/sample"

# 2. Multi-chain token honeypot & tax check (Base, BSC, Arbitrum, Solana)
curl -H "X-API-Key: YOUR_KEY" "https://guard.dovafy.com/v1/token/check?chain=base&address=0x532f27101965dd16442E59d40670FaF5eBB142E4"
curl -H "X-API-Key: YOUR_KEY" "https://guard.dovafy.com/v1/token/check?chain=solana&address=JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"

# 3. 6-chain wallet risk & whale profile
curl -H "X-API-Key: YOUR_KEY" "https://guard.dovafy.com/v1/wallet/risk?address=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"

# 4. Concurrent token + counterparty/owner pre-trade bundle
curl -H "X-API-Key: YOUR_KEY" "https://guard.dovafy.com/v1/bundle/pre-trade?chain=base&token=0x532f27101965dd16442E59d40670FaF5eBB142E4&wallet=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
```

## Plan Limits & Error Codes
- RapidAPI Batch Caps: BASIC 3, PRO 10, ULTRA 20, MEGA 35, Apify/Direct 50, x402 10.
- HTTP 400 (`INVALID_ADDRESS`, `INVALID_INPUT`, `UNSUPPORTED_CHAIN`, `BATCH_LIMIT_EXCEEDED`): Rejected before billing.
- HTTP 401 (`UNAUTHORIZED`): Invalid or missing credentials.
- HTTP 402: x402 Base USDC payment challenge when no subscription key is sent.
- HTTP 413 (`PAYLOAD_TOO_LARGE`): Exceeds 64 KiB (single) or 128 KiB (batch) limit.
- HTTP 422 (`NOT_A_CONTRACT`, `NOT_AN_ERC20`, `NOT_A_TOKEN_MINT`): Not a valid token on target chain (x402 not charged).
- HTTP 503 (`UPSTREAM_UNAVAILABLE`): Transient RPC failure (x402 not charged).
