{
  "$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.app/mainstreet.html",
    "operator": "0xAC3ca7c5d3cDD7702fd08F9C4C28dAA22296aDa9",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "openapi": "https://avisradar.app/api/agent/openapi.json",
    "agentCard": "https://avisradar.app/.well-known/agent-card.json"
  },
  "endpoints": [
    {
      "method": "GET",
      "path": "/api/agent/score/{address}",
      "url": "https://avisradar.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.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.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"]
    }
  ],
  "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"
  ],
  "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"
  }
}
