{
  "openapi": "3.1.0",
  "info": {
    "title": "NoJunk Address Check",
    "version": "1.0.0",
    "description": "Wallet and contract safety check before you send funds, approve a spender or interact. Send an EVM address (Base, Ethereum, BNB Chain, Arbitrum, Polygon, Optimism, Avalanche); get a verdict (DANGER, SUSPICIOUS, NO KNOWN ISSUES), flags from security databases (phishing, theft, scam-token creator, sanctions, mixer, money laundering) and, for contracts, verification, proxy/upgradeability, age, owner privileges and reported malicious behavior.",
    "x-guidance": "Before sending funds to an address, approving a token spender or interacting with a contract, POST /check with JSON {\"address\": \"0x...\", \"chain\": \"base\"|\"ethereum\"|\"bsc\"|\"arbitrum\"|\"polygon\"|\"optimism\"|\"avalanche\"} (chain optional, defaults to base) or GET /check?address=...&chain=.... Returns a verdict (DANGER, SUSPICIOUS, NO KNOWN ISSUES), red/green flags and contract details. $0.01 USDC on Base per check via x402. Invalid input is rejected before payment is settled."
  },
  "servers": [
    {
      "url": "https://nojunk-address-check.mick8511.workers.dev"
    }
  ],
  "paths": {
    "/sample": {
      "get": {
        "operationId": "sampleAddressCheck",
        "summary": "Free cached example report (Uniswap Universal Router); no payment. See also /sample/flagged",
        "tags": [
          "Crypto",
          "Security"
        ],
        "responses": {
          "200": {
            "description": "Example request and report"
          }
        }
      }
    },
    "/check": {
      "post": {
        "operationId": "checkAddress",
        "summary": "Wallet & contract safety check (phishing, theft, scam creator, sanctions, contract risks)",
        "tags": [
          "Crypto",
          "Security"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string",
                    "minLength": 42,
                    "maxLength": 42,
                    "description": "Wallet or contract address (0x...)"
                  },
                  "chain": {
                    "type": "string",
                    "enum": [
                      "base",
                      "ethereum",
                      "bsc",
                      "arbitrum",
                      "polygon",
                      "optimism",
                      "avalanche"
                    ],
                    "description": "Optional; defaults to base"
                  }
                },
                "required": [
                  "address"
                ]
              },
              "example": {
                "address": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
                "chain": "ethereum"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Safety report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "address": {
                      "type": "string"
                    },
                    "chain": {
                      "type": "string"
                    },
                    "is_contract": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "verdict": {
                      "type": "string",
                      "enum": [
                        "DANGER",
                        "SUSPICIOUS",
                        "NO KNOWN ISSUES"
                      ]
                    },
                    "summary": {
                      "type": "string"
                    },
                    "red_flags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "severity": {
                            "type": "string"
                          },
                          "flag": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "green_flags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "contract": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "disclaimer": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "verdict",
                    "red_flags"
                  ]
                },
                "example": {
                  "address": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
                  "chain": "ethereum",
                  "is_contract": true,
                  "verdict": "NO KNOWN ISSUES",
                  "summary": "Contract UniversalRouter: no known issues in the databases checked.",
                  "red_flags": [],
                  "green_flags": [
                    "Contract source code is verified.",
                    "Contract has existed for over 3 year(s).",
                    "No reports in the address security databases checked."
                  ],
                  "contract": {
                    "name": "UniversalRouter",
                    "verified": true,
                    "upgradeable_proxy": false,
                    "deployed_at": "2023-04-28T09:45:11.000Z"
                  },
                  "disclaimer": "Automated screen against third-party security databases. A clean result means no known reports, not proof of safety; flags are reports, not legal findings. Not financial or legal advice."
                }
              }
            }
          },
          "402": {
            "description": "Payment Required (x402 v2 challenge in the PAYMENT-REQUIRED header)"
          }
        }
      },
      "get": {
        "operationId": "checkAddressGet",
        "summary": "Wallet & contract safety check (phishing, theft, scam creator, sanctions, contract risks)",
        "tags": [
          "Crypto",
          "Security"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Wallet or contract address (0x...)"
          },
          {
            "name": "chain",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "base",
                "ethereum",
                "bsc",
                "arbitrum",
                "polygon",
                "optimism",
                "avalanche"
              ]
            },
            "description": "Optional; defaults to base"
          }
        ],
        "responses": {
          "200": {
            "description": "Safety report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "address": {
                      "type": "string"
                    },
                    "chain": {
                      "type": "string"
                    },
                    "is_contract": {
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "verdict": {
                      "type": "string",
                      "enum": [
                        "DANGER",
                        "SUSPICIOUS",
                        "NO KNOWN ISSUES"
                      ]
                    },
                    "summary": {
                      "type": "string"
                    },
                    "red_flags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "severity": {
                            "type": "string"
                          },
                          "flag": {
                            "type": "string"
                          },
                          "detail": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "green_flags": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "contract": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "disclaimer": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "verdict",
                    "red_flags"
                  ]
                },
                "example": {
                  "address": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
                  "chain": "ethereum",
                  "is_contract": true,
                  "verdict": "NO KNOWN ISSUES",
                  "summary": "Contract UniversalRouter: no known issues in the databases checked.",
                  "red_flags": [],
                  "green_flags": [
                    "Contract source code is verified.",
                    "Contract has existed for over 3 year(s).",
                    "No reports in the address security databases checked."
                  ],
                  "contract": {
                    "name": "UniversalRouter",
                    "verified": true,
                    "upgradeable_proxy": false,
                    "deployed_at": "2023-04-28T09:45:11.000Z"
                  },
                  "disclaimer": "Automated screen against third-party security databases. A clean result means no known reports, not proof of safety; flags are reports, not legal findings. Not financial or legal advice."
                }
              }
            }
          },
          "402": {
            "description": "Payment Required (x402 v2 challenge in the PAYMENT-REQUIRED header)"
          }
        }
      }
    }
  }
}