{
  "$schema": "https://www.x402.org/well-known/x402-schema.json",
  "version": "1.0",
  "service": {
    "name": "MainStreet",
    "description": "Reputation oracle for onchain AI agents on Base. Aggregates x402 Bazaar activity, ERC-8004 ReputationRegistry feedback, and live endpoint health into a 0-100 score.",
    "url": "https://avisradar-production.up.railway.app/mainstreet.html",
    "operator": "0xAC3ca7c5d3cDD7702fd08F9C4C28dAA22296aDa9",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "openapi": "https://avisradar-production.up.railway.app/api/agent/openapi.json",
    "agentCard": "https://avisradar-production.up.railway.app/.well-known/agent-card.json"
  },
  "endpoints": [
    {
      "method": "GET",
      "path": "/api/agent/score/{address}",
      "url": "https://avisradar-production.up.railway.app/api/agent/score/{address}",
      "description": "Reputation score 0-100 for any onchain AI agent on Base. Free cached snapshot. Add ?live=1 for fresh fetch ($0.05 USDC via x402).",
      "discoverable": true,
      "pricing": {
        "scheme": "exact",
        "amount": "50000",
        "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "network": "eip155:8453",
        "humanPrice": "0.05 USDC",
        "freeRead": true,
        "paidParam": "?live=1"
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "address": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" },
          "live": { "type": "boolean", "description": "Force live re-score (paid)" }
        },
        "required": ["address"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "score": { "type": ["integer", "null"], "minimum": 0, "maximum": 100 },
          "metrics": { "type": "object" },
          "description": { "type": "string" },
          "resourcePath": { "type": ["string", "null"] },
          "health": { "type": "object", "description": "Live endpoint health from daily probe" }
        }
      },
      "tags": ["reputation", "ai-agent", "ERC-8004", "x402", "ACP", "oracle"]
    },
    {
      "method": "GET",
      "path": "/api/agent/snapshot/{placeId}",
      "url": "https://avisradar-production.up.railway.app/api/agent/snapshot/{placeId}",
      "description": "Google review snapshot for a real-world business + up to 3 competitors. Useful for RWA underwriting agents.",
      "discoverable": true,
      "pricing": {
        "scheme": "exact",
        "amount": "50000",
        "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "network": "eip155:8453",
        "humanPrice": "0.05 USDC"
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "placeId": { "type": "string", "description": "Google Maps Place ID (ChIJ... format)" }
        },
        "required": ["placeId"]
      },
      "tags": ["reputation", "google-reviews", "local-business", "due-diligence", "RWA-oracle"]
    },
    {
      "method": "GET",
      "path": "/api/agent/leaderboard",
      "url": "https://avisradar-production.up.railway.app/api/agent/leaderboard",
      "description": "Ranked leaderboard of all indexed agents. Free, cached 1h. Supports ?network= and ?ecosystem= filters.",
      "discoverable": true,
      "pricing": { "freeRead": true },
      "tags": ["leaderboard", "discovery", "ranking"]
    },
    {
      "method": "GET",
      "path": "/api/agent/audit/{address}",
      "url": "https://avisradar-production.up.railway.app/api/agent/audit/{address}",
      "description": "Premium deep audit of a Base wallet. Returns score + all 18+ identity proofs (Virtuals / Farcaster / CB1 / Basename / Clawd / Aerodrome / Morpho / etc.) + token launch history + trader tier + active-rater status + alive endpoints. Single x402 payment.",
      "discoverable": true,
      "pricing": {
        "scheme": "exact",
        "amount": "250000",
        "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "network": "eip155:8453",
        "humanPrice": "0.25 USDC"
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "address": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }
        },
        "required": ["address"]
      },
      "tags": ["audit", "due-diligence", "deep-scan", "x402"]
    },
    {
      "method": "POST",
      "path": "/api/agent/audit-batch",
      "url": "https://avisradar-production.up.railway.app/api/agent/audit-batch",
      "description": "Bulk audit of up to 10 Base wallets in one call. Cheaper than 10x /audit individual calls. Use case: DAO scoping members, agent marketplace vetting batch of sellers.",
      "discoverable": true,
      "pricing": {
        "scheme": "exact",
        "amount": "1000000",
        "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "network": "eip155:8453",
        "humanPrice": "1.00 USDC"
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "addresses": {
            "type": "array",
            "items": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" },
            "maxItems": 10
          }
        },
        "required": ["addresses"]
      },
      "tags": ["audit", "bulk", "marketplace"]
    },
    {
      "method": "POST",
      "path": "/api/agent/pre-launch-audit",
      "url": "https://avisradar-production.up.railway.app/api/agent/pre-launch-audit",
      "description": "Pre-deploy rug-risk forecast on a planned token. Operator submits planned token spec (creator wallet, initial LP, fee splits, lock duration) — MainStreet returns rug-risk verdict + flags + recommendations BEFORE the deploy goes live. Replaces a $1k+ traditional audit for one Uber price.",
      "discoverable": true,
      "pricing": {
        "scheme": "exact",
        "amount": "2000000",
        "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "network": "eip155:8453",
        "humanPrice": "2.00 USDC"
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "creatorWallet": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" },
          "initialLpUsd": { "type": "number" },
          "lockDurationDays": { "type": "integer" },
          "feeSplit": { "type": "string" },
          "dexTarget": { "type": "string" },
          "tokenSymbol": { "type": "string" }
        },
        "required": ["creatorWallet"]
      },
      "tags": ["pre-launch", "rug-forecast", "token-deployer", "x402"]
    },
    {
      "method": "POST",
      "path": "/api/agent/angel-enrollment",
      "url": "https://avisradar-production.up.railway.app/api/agent/angel-enrollment",
      "description": "Pay to add a wallet to the verified MainStreet allowlist as an angel / builder. Forces green shield across every endpoint, permanent.",
      "discoverable": true,
      "pricing": {
        "scheme": "exact",
        "amount": "25000000",
        "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "network": "eip155:8453",
        "humanPrice": "25.00 USDC"
      },
      "inputSchema": {
        "type": "object",
        "properties": {
          "wallet": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" },
          "label": { "type": "string", "minLength": 3, "maxLength": 60 },
          "reason": { "type": "string" },
          "contact": { "type": "string" }
        },
        "required": ["wallet", "label"]
      },
      "tags": ["enrollment", "allowlist", "verified-builder"]
    }
  ],
  "freeEndpoints": [
    "/api/agent/leaderboard",
    "/api/agent/featured",
    "/api/agent/movers",
    "/api/agent/search",
    "/api/agent/recommend",
    "/api/agent/history/{address}",
    "/api/agent/compare",
    "/api/agent/badges",
    "/api/agent/me",
    "/api/agent/status",
    "/api/agent/health",
    "/api/agent/health-summary",
    "/api/agent/openapi.json",
    "/api/agent/feed.rss",
    "/api/agent/leaderboard.csv",
    "/api/agent/main-holder-check/{wallet}",
    "/api/agent/affiliate/register",
    "/api/agent/affiliate/{refCode}",
    "/api/agent/attestation/{address}"
  ],
  "discoveryHints": {
    "preferredCrawlPath": "/api/agent/openapi.json",
    "machineReadableManifest": "/.well-known/agent-card.json",
    "supportEmail": "philippe@avisradar.app",
    "sourceCode": "https://github.com/philpof102-svg/mainstreet",
    "license": "MIT"
  }
}
