{
  "openapi": "3.1.0",
  "info": {
    "title": "Wallet Sanctions Exposure by Agentropolis",
    "version": "0.1.1",
    "summary": "Direct + 1-hop OFAC SDN exposure screen for EVM wallets (Base, Ethereum). A screen, not a certificate.",
    "description": "$0.03 USDC per call via x402 on Base. $0.03 USDC per call on Base mainnet.",
    "contact": {
      "email": "hello@agentropolis.io"
    },
    "x-guidance": "POST /api/sanctions with {address}. Branch on status: fail = address itself is SDN-listed; warn = direct counterparty exposure or partial coverage; pass = no match in data scanned (not a clearance)."
  },
  "servers": [
    {
      "url": "https://seenly-pay-guard.vercel.app"
    }
  ],
  "paths": {
    "/api/sanctions": {
      "post": {
        "operationId": "screenWalletSanctions",
        "summary": "Screen a wallet and its direct counterparties against OFAC SDN",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.03"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "rails": [
            {
              "protocol": "x402",
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "networkName": "Base mainnet",
              "asset": "USDC",
              "assetAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "amount": "30000",
              "priceUsd": "0.03",
              "payTo": "0xeE6239F3E17bEBe5e89F21F29D74D68CAa0d78CE",
              "facilitator": "Coinbase CDP (gas sponsored; payer needs no ETH)",
              "header": "PAYMENT-SIGNATURE"
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SanctionsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Screen result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SanctionsResult"
                }
              }
            }
          },
          "402": {
            "description": "x402 payment required"
          },
          "422": {
            "description": "Invalid request (not charged)"
          },
          "503": {
            "description": "Counterparty data unavailable (not charged)"
          }
        }
      },
      "get": {
        "operationId": "screenWalletSanctionsGet",
        "summary": "Same screen via query string",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.03"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "rails": [
            {
              "protocol": "x402",
              "version": 2,
              "scheme": "exact",
              "network": "eip155:8453",
              "networkName": "Base mainnet",
              "asset": "USDC",
              "assetAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
              "amount": "30000",
              "priceUsd": "0.03",
              "payTo": "0xeE6239F3E17bEBe5e89F21F29D74D68CAa0d78CE",
              "facilitator": "Coinbase CDP (gas sponsored; payer needs no ETH)",
              "header": "PAYMENT-SIGNATURE"
            }
          ]
        },
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "chains",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "example": "ethereum"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Screen result"
          },
          "402": {
            "description": "x402 payment required"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SanctionsRequest": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "chains": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "base",
                "ethereum"
              ]
            }
          },
          "requestKey": {
            "type": "string",
            "maxLength": 128
          }
        },
        "required": [
          "address"
        ]
      },
      "SanctionsResult": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pass",
              "warn",
              "fail"
            ]
          },
          "verdict": {
            "type": "string",
            "enum": [
              "direct_match",
              "counterparty_exposure",
              "no_match_found",
              "insufficient_coverage"
            ]
          },
          "direct": {
            "type": "object"
          },
          "exposure": {
            "type": "object"
          },
          "coverage": {
            "type": "array"
          },
          "list": {
            "type": "object"
          },
          "advice": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "verdict",
          "direct",
          "exposure",
          "coverage"
        ]
      }
    }
  }
}