{
  "openapi": "3.0.3",
  "info": {
    "title": "AzurSafe x402 API",
    "version": "1.1.0",
    "description": "AzurSafe x402 screens wallets, counterparties, x402 sellers, and blockchain addresses before autonomous onchain actions. It can also be used to verify whether any x402 seller or wallet address is secure before buying from, paying, or interacting with them. It returns machine-readable risk results that agents, payment bots, treasury systems, wallets, and exchanges can enforce in policy decisions.",
    "contact": {
      "name": "AzurSafe",
      "url": "https://ai.azursafe.com",
      "email": "contact@azursafe.com"
    }
  },
  "servers": [
    {
      "url": "https://ai.azursafe.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "System",
      "description": "Operational endpoints."
    },
    {
      "name": "Screening",
      "description": "Paid x402 screening endpoints."
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "tags": [
          "System"
        ],
        "operationId": "getHealth",
        "summary": "Health check",
        "description": "Returns the health status of the API.",
        "responses": {
          "200": {
            "description": "Service is healthy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "tags": [
          "System"
        ],
        "operationId": "getOpenApiJson",
        "summary": "OpenAPI specification",
        "description": "Returns the canonical OpenAPI 3.0.3 specification for the AzurSafe x402 API.",
        "responses": {
          "200": {
            "description": "OpenAPI specification.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          }
        }
      }
    },
    "/docs/openapi.json": {
      "get": {
        "tags": [
          "System"
        ],
        "operationId": "getOpenApiJsonAlias",
        "summary": "OpenAPI specification alias",
        "description": "Returns the same OpenAPI specification as /openapi.json.",
        "responses": {
          "200": {
            "description": "OpenAPI specification.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "tags": [
          "System"
        ],
        "operationId": "getLlmsTxt",
        "summary": "LLM-facing documentation index",
        "description": "Returns the LLM-facing documentation index for the AzurSafe x402 API.",
        "responses": {
          "200": {
            "description": "LLM-facing documentation index.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          }
        }
      }
    },
    "/agent/screen-id": {
      "get": {
        "tags": [
          "Screening"
        ],
        "operationId": "screenIdentifier",
        "summary": "Screen a wallet, counterparty, or x402 seller",
        "description": "Screens a wallet address, counterparty identifier, or x402 seller before an autonomous onchain action. This endpoint can be used to verify whether any x402 seller is secure before buying from, paying, or interacting with them. This endpoint is protected by the x402 payment flow. Accepted identifier types include wallet addresses, domains, emails, phone numbers, and usernames.",
        "security": [
          {
            "PaymentSignature": []
          },
          {
            "XPayment": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "query",
            "required": true,
            "description": "Counterparty, wallet, or x402 seller identifier to risk-screen before an agent sends, receives, swaps, bridges, pays, or verifies whether an x402 seller is secure. Supports wallet addresses across 30+ major blockchains and additional identifiers such as domains, emails, phone numbers, and usernames.",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "examples": {
              "evm": {
                "summary": "EVM wallet",
                "value": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B"
              },
              "tron": {
                "summary": "Tron wallet",
                "value": "TE3mCcPULjPUE7ykX7RArDPAhyahoy3d2j"
              },
              "bitcoin": {
                "summary": "Bitcoin wallet",
                "value": "1PMycacnJaSqwwJqjawXBErnLsZ7RkXUAs"
              },
              "domain": {
                "summary": "Domain",
                "value": "example.org"
              },
              "email": {
                "summary": "Email",
                "value": "ops@example.org"
              },
              "phone": {
                "summary": "Phone number",
                "value": "+14155550123"
              },
              "username": {
                "summary": "Username",
                "value": "treasury_bot"
              },
              "solana": {
                "summary": "Solana wallet",
                "value": "8fjkQpV7L6Wm2nZrYt3aBcD4EfGhJkLmNoPqRsTuVwX"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful screening response.",
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Base64-encoded x402 payment settlement response returned after successful verification and settlement.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScreenSuccessResponse"
                },
                "examples": {
                  "legit": {
                    "summary": "Legit result",
                    "value": {
                      "ok": true,
                      "endpoint": "screen-id",
                      "identifier": "0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B",
                      "data": {
                        "name": "Vb_4e62be",
                        "legitimacyStatus": "legit",
                        "category": "Foundation/Developer",
                        "source": "Public and Online Data",
                        "findings": 4
                      }
                    }
                  },
                  "fraud": {
                    "summary": "Fraud result",
                    "value": {
                      "ok": true,
                      "endpoint": "screen-id",
                      "identifier": "TE3mCcPULjPUE7ykX7RArDPAhyahoy3d2j",
                      "data": {
                        "name": "OFAC_Sanctioned_2b477d",
                        "legitimacyStatus": "fraud",
                        "category": "Phishing/Fraud",
                        "source": "Online and Public Data",
                        "findings": 2
                      }
                    }
                  },
                  "unknown": {
                    "summary": "Unknown result",
                    "value": {
                      "ok": true,
                      "endpoint": "screen-id",
                      "identifier": "1PMycacnJaSqwwJqjawXBErnLsZ7RkXUAs",
                      "data": {
                        "name": null,
                        "legitimacyStatus": "unknown",
                        "category": null,
                        "source": null,
                        "findings": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitExceeded"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        }
      }
    },
    "/agent/screen-kyt": {
      "get": {
        "tags": [
          "Screening"
        ],
        "operationId": "screenKytAddress",
        "summary": "Screen a blockchain wallet or x402 seller with KYT",
        "description": "Screens a blockchain wallet address, counterparty wallet, or x402 seller address before an autonomous onchain action. This endpoint can be used to verify whether a known-chain wallet or x402 seller address is secure before buying from, paying, receiving from, swapping with, bridging to, or interacting with it. The client provides the blockchain and wallet address as query parameters. After x402 payment verification, AzurSafe returns machine-readable KYT risk intelligence that agents, payment bots, treasury systems, wallets, and exchanges can enforce in policy decisions.",
        "security": [
          {
            "PaymentSignature": []
          },
          {
            "XPayment": []
          }
        ],
        "parameters": [
          {
            "name": "blockchain",
            "in": "query",
            "required": true,
            "description": "Blockchain network identifier for the address being screened. Accepted values are: ethereum, bsc, polygon, avalanche, arbitrum, optimism, fantom, linea, base, bitcoin, bitcoincash, bitcoinsv, dash, zcash, dogecoin, litecoin, ecash, solana, xrp, cardano, stellar.",
            "schema": {
              "$ref": "#/components/schemas/SupportedKytBlockchain"
            },
            "examples": {
              "ethereum": {
                "summary": "Ethereum",
                "value": "ethereum"
              },
              "bsc": {
                "summary": "BNB Smart Chain",
                "value": "bsc"
              },
              "polygon": {
                "summary": "Polygon",
                "value": "polygon"
              },
              "avalanche": {
                "summary": "Avalanche",
                "value": "avalanche"
              },
              "arbitrum": {
                "summary": "Arbitrum",
                "value": "arbitrum"
              },
              "optimism": {
                "summary": "Optimism",
                "value": "optimism"
              },
              "fantom": {
                "summary": "Fantom",
                "value": "fantom"
              },
              "linea": {
                "summary": "Linea",
                "value": "linea"
              },
              "base": {
                "summary": "Base",
                "value": "base"
              },
              "bitcoin": {
                "summary": "Bitcoin",
                "value": "bitcoin"
              },
              "bitcoincash": {
                "summary": "Bitcoin Cash",
                "value": "bitcoincash"
              },
              "bitcoinsv": {
                "summary": "Bitcoin SV",
                "value": "bitcoinsv"
              },
              "dash": {
                "summary": "Dash",
                "value": "dash"
              },
              "zcash": {
                "summary": "Zcash",
                "value": "zcash"
              },
              "dogecoin": {
                "summary": "Dogecoin",
                "value": "dogecoin"
              },
              "litecoin": {
                "summary": "Litecoin",
                "value": "litecoin"
              },
              "ecash": {
                "summary": "eCash",
                "value": "ecash"
              },
              "solana": {
                "summary": "Solana",
                "value": "solana"
              },
              "xrp": {
                "summary": "XRP Ledger",
                "value": "xrp"
              },
              "cardano": {
                "summary": "Cardano",
                "value": "cardano"
              },
              "stellar": {
                "summary": "Stellar",
                "value": "stellar"
              }
            }
          },
          {
            "name": "address",
            "in": "query",
            "required": true,
            "description": "Blockchain wallet address, counterparty address, or x402 seller address to risk-screen before an agent sends, receives, swaps, bridges, pays, buys from, or otherwise interacts with it.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "examples": {
              "ethereumHighRisk": {
                "summary": "Ethereum high-risk wallet",
                "value": "0xffef4634155a477a8877deef8eaff293a373d5de"
              },
              "bitcoinLowRisk": {
                "summary": "Bitcoin low-risk wallet",
                "value": "1PMycacnJaSqwwJqjawXBErnLsZ7RkXUAs"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful KYT screening response.",
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Base64-encoded x402 payment settlement response returned after successful verification and settlement.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScreenKytSuccessResponse"
                },
                "examples": {
                  "highRisk": {
                    "summary": "High-risk KYT result",
                    "value": {
                      "ok": true,
                      "endpoint": "screen-kyt",
                      "version": "1.0",
                      "pricingTier": "kyt-lite",
                      "address": "0xffef4634155a477a8877deef8eaff293a373d5de",
                      "blockchain": "ethereum",
                      "auditId": "92c5b798-8539-4c98-9960-16b35d3984dd",
                      "checkedAt": "2026-05-01T22:25:59.301Z",
                      "data": {
                        "result": {
                          "decision": "no_go",
                          "safeToProceed": false,
                          "recommendedAction": "block",
                          "riskScore": 100,
                          "riskLevel": "critical",
                          "confidence": 0.72
                        },
                        "summary": {
                          "short": "Critical risk. Block payment.",
                          "text": "Wallet 0xffef...d5de engaged in 5 transactions (2 incoming, 3 outgoing) with 5 counterparties and handled 3 different tokens. Funds primarily received through intermediary wallets, suggesting potential layering activity. Key risk factors: interaction with 2 fraudulent addresses (Bybit_Hackers_1f47d6, Bybit_Hackers_1f38a3). Overall risk assessment: VERY HIGH (100/100) - COMPLIANCE ACTION RECOMMENDED."
                        },
                        "riskTriggers": [
                          {
                            "name": "Fraud Wallet Detected",
                            "severity": "critical",
                            "wallet": "0xffef4634155a477a8877deef8eaff293a373d5de",
                            "transactionHash": "0x19c9fc8adcbdad18869c72da2fceaba37aef2d67643da0fdeed320a34724dde1",
                            "description": "Direct transaction with known fraud wallet detected"
                          },
                          {
                            "name": "Fraud Wallet Detected",
                            "severity": "critical",
                            "wallet": "0x56d2ff9760ee2e973fcb85d57d906d2f79a3d650",
                            "transactionHash": null,
                            "description": "Fraud wallet detected (walletType, legitimacyStatus, tagCategory): 0x56d2ff9760ee2e973fcb85d57d906d2f79a3d650"
                          },
                          {
                            "name": "Fraud Wallet Detected",
                            "severity": "critical",
                            "wallet": "0x809197cb7e6bc8b3c672f914bf1644dade8106d9",
                            "transactionHash": "0x1059dee902fc6d55c8f40f7b2af193232035d1dca4c3a5705710a7dd9283e151",
                            "description": "Direct transaction with known fraud wallet detected"
                          },
                          {
                            "name": "Full Withdrawal (Single Transaction)",
                            "severity": "medium",
                            "wallet": "0xffef4634155a477a8877deef8eaff293a373d5de",
                            "transactionHash": "0x1059dee902fc6d55c8f40f7b2af193232035d1dca4c3a5705710a7dd9283e151",
                            "description": "Wallet withdrew 100% of its balance in a single transaction"
                          },
                          {
                            "name": "Full Withdrawal (Single Transaction)",
                            "severity": "medium",
                            "wallet": "0xffef4634155a477a8877deef8eaff293a373d5de",
                            "transactionHash": "0x28e25a6c38b5375c833caaebf6c2e319f07d815e68f09031247c2c7fdc1b847c",
                            "description": "Wallet withdrew 100% of its balance in a single transaction"
                          }
                        ],
                        "walletProfile": {
                          "totalTransactions": 5,
                          "detectedWallets": 5,
                          "auditedWallets": 1,
                          "tokensDetected": 3,
                          "firstSeen": 1740572759,
                          "firstSeenAt": "2025-02-26T12:25:59.000Z",
                          "lastSeen": 1774858667,
                          "lastSeenAt": "2026-03-30T08:17:47.000Z",
                          "transactionVelocity": 0.0126,
                          "incomingOutgoingRatio": 0.67
                        },
                        "counterpartySummary": {
                          "totalCounterparties": 5,
                          "receivedFrom": 2,
                          "sentTo": 3,
                          "types": {
                            "known": 0,
                            "intermediary": 3,
                            "fraud": 2,
                            "unknown": 0,
                            "bridge": 0,
                            "publicContract": 0,
                            "unknownContract": 0
                          }
                        },
                        "topCounterparties": [
                          {
                            "address": "0x56d2ff9760ee2e973fcb85d57d906d2f79a3d650",
                            "walletType": "fraud",
                            "riskLevel": "critical",
                            "depth": 1,
                            "transactionCount": 1,
                            "identity": {
                              "tag": "Bybit_Hackers_1f47d6",
                              "entity": null,
                              "category": "Phishing/Fraud",
                              "source": "Online and Public Data"
                            }
                          },
                          {
                            "address": "0x6357d3843d715496257e338a878ab0b72040a918",
                            "walletType": "intermediary",
                            "riskLevel": "low",
                            "depth": 1,
                            "transactionCount": 1
                          },
                          {
                            "address": "0x809197cb7e6bc8b3c672f914bf1644dade8106d9",
                            "walletType": "fraud",
                            "riskLevel": "critical",
                            "depth": 1,
                            "transactionCount": 1,
                            "identity": {
                              "tag": "Bybit_Hackers_1f38a3",
                              "entity": null,
                              "category": "Phishing/Fraud",
                              "source": "Online and Public Data"
                            }
                          }
                        ]
                      }
                    }
                  },
                  "lowRisk": {
                    "summary": "Low-risk KYT result",
                    "value": {
                      "ok": true,
                      "endpoint": "screen-kyt",
                      "version": "1.0",
                      "pricingTier": "kyt-lite",
                      "address": "1PMycacnJaSqwwJqjawXBErnLsZ7RkXUAs",
                      "blockchain": "bitcoin",
                      "auditId": "a497dfa8-8e25-4127-9f04-937acc509d52",
                      "checkedAt": "2026-05-01T22:24:29.033Z",
                      "data": {
                        "result": {
                          "decision": "go",
                          "safeToProceed": true,
                          "recommendedAction": "allow",
                          "riskScore": 8,
                          "riskLevel": "low",
                          "confidence": 0.72
                        },
                        "summary": {
                          "short": "Low risk. Allow payment.",
                          "text": "Wallet 1PMyca...XUAs engaged in 8 transactions (4 incoming, 4 outgoing) with 8 counterparties and handled 1 different tokens. Funds primarily received through intermediary wallets, suggesting potential layering activity. Overall risk assessment: LOW (8/100)."
                        },
                        "riskTriggers": [
                          {
                            "name": "Full Withdrawal (Single Transaction)",
                            "severity": "medium",
                            "wallet": "1PMycacnJaSqwwJqjawXBErnLsZ7RkXUAs",
                            "transactionHash": "6ad41173066e80bea9f31e8d96e19103e3b3fdf84a024e00b8d8c19bbd090659",
                            "description": "Wallet withdrew 100% of its balance in a single transaction"
                          }
                        ],
                        "walletProfile": {
                          "totalTransactions": 8,
                          "detectedWallets": 8,
                          "auditedWallets": 1,
                          "tokensDetected": 1,
                          "firstSeen": 1413679755,
                          "firstSeenAt": "2014-10-19T00:49:15.000Z",
                          "lastSeen": 1754056650,
                          "lastSeenAt": "2025-08-01T13:57:30.000Z",
                          "transactionVelocity": 0.002,
                          "incomingOutgoingRatio": 1
                        },
                        "counterpartySummary": {
                          "totalCounterparties": 8,
                          "receivedFrom": 4,
                          "sentTo": 4,
                          "types": {
                            "known": 0,
                            "intermediary": 8,
                            "fraud": 0,
                            "unknown": 0,
                            "bridge": 0,
                            "publicContract": 0,
                            "unknownContract": 0
                          }
                        },
                        "topCounterparties": [
                          {
                            "address": "bc1q9dyr2a49xtnw3qq6sfdyxa74a9fr8p5kkew4dh",
                            "walletType": "intermediary",
                            "riskLevel": "low",
                            "depth": 1,
                            "transactionCount": 1
                          },
                          {
                            "address": "bc1qsn3f956aaps0yht6pfqd8wxr69hevy07269y5k",
                            "walletType": "intermediary",
                            "riskLevel": "low",
                            "depth": 1,
                            "transactionCount": 1
                          },
                          {
                            "address": "1BdrNSpGQHapLpu4HUXBHE9cmpjUPtbZW7",
                            "walletType": "intermediary",
                            "riskLevel": "low",
                            "depth": 1,
                            "transactionCount": 1
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequest"
          },
          "402": {
            "$ref": "#/components/responses/PaymentRequired"
          },
          "405": {
            "$ref": "#/components/responses/MethodNotAllowed"
          },
          "414": {
            "$ref": "#/components/responses/UriTooLong"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitExceeded"
          },
          "502": {
            "$ref": "#/components/responses/BadGateway"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "PaymentSignature": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 payment proof header used on the paid retry request."
      },
      "XPayment": {
        "type": "apiKey",
        "in": "header",
        "name": "X-PAYMENT",
        "description": "Legacy x402 payment proof header. Prefer PAYMENT-SIGNATURE. Keep this only if the server accepts legacy x402 clients.",
        "x-deprecated": true
      }
    },
    "responses": {
      "InvalidRequest": {
        "description": "Invalid request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "invalidRequest": {
                "value": {
                  "error": "INVALID_REQUEST",
                  "message": "The request is invalid."
                }
              }
            }
          }
        }
      },
      "PaymentRequired": {
        "description": "Payment required. Complete the x402 payment flow and retry the request.",
        "headers": {
          "PAYMENT-REQUIRED": {
            "description": "Base64-encoded x402 payment challenge returned by the server.",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "MethodNotAllowed": {
        "description": "Method not allowed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": "METHOD_NOT_ALLOWED",
              "message": "Method not allowed"
            }
          }
        }
      },
      "UriTooLong": {
        "description": "Request URI or query parameter is too long.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": "INVALID_REQUEST",
              "message": "The address value is too long."
            }
          }
        }
      },
      "RateLimitExceeded": {
        "description": "Rate limit exceeded.",
        "headers": {
          "X-RateLimit-Limit": {
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Remaining": {
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Reset": {
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": "RATE_LIMIT_EXCEEDED",
              "message": "Too many requests. Please try again later.",
              "retryAfterSeconds": 42
            }
          }
        }
      },
      "BadGateway": {
        "description": "Upstream or payment flow failure.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "requestFailed": {
                "value": {
                  "error": "REQUEST_FAILED",
                  "message": "Unable to process the request at this time."
                }
              },
              "paymentFlowFailed": {
                "value": {
                  "error": "PAYMENT_FLOW_FAILED",
                  "message": "Unable to process the payment flow."
                }
              },
              "paymentSettlementFailed": {
                "value": {
                  "error": "PAYMENT_SETTLEMENT_FAILED",
                  "message": "Unable to finalize the paid response."
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "HealthResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ok": {
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ]
      },
      "ScreenResultData": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "legitimacyStatus": {
            "type": "string",
            "enum": [
              "legit",
              "fraud",
              "unknown"
            ]
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "findings": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "name",
          "legitimacyStatus",
          "category",
          "source",
          "findings"
        ]
      },
      "ScreenSuccessResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "endpoint": {
            "type": "string",
            "enum": [
              "screen-id"
            ]
          },
          "identifier": {
            "type": "string"
          },
          "data": {
            "$ref": "#/components/schemas/ScreenResultData"
          }
        },
        "required": [
          "ok",
          "endpoint",
          "identifier",
          "data"
        ]
      },
      "SupportedKytBlockchain": {
        "type": "string",
        "description": "Accepted blockchain or network identifier for KYT screening.",
        "enum": [
          "ethereum",
          "bsc",
          "polygon",
          "avalanche",
          "arbitrum",
          "optimism",
          "fantom",
          "linea",
          "base",
          "bitcoin",
          "bitcoincash",
          "bitcoinsv",
          "dash",
          "zcash",
          "dogecoin",
          "litecoin",
          "ecash",
          "solana",
          "xrp",
          "cardano",
          "stellar"
        ],
        "example": "ethereum"
      },
      "ScreenKytSuccessResponse": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "endpoint": {
            "type": "string",
            "enum": [
              "screen-kyt"
            ]
          },
          "version": {
            "type": "string",
            "example": "1.0"
          },
          "pricingTier": {
            "type": "string",
            "example": "kyt-lite"
          },
          "address": {
            "type": "string"
          },
          "blockchain": {
            "$ref": "#/components/schemas/SupportedKytBlockchain"
          },
          "auditId": {
            "type": "string",
            "nullable": true
          },
          "checkedAt": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "$ref": "#/components/schemas/ScreenKytData"
          }
        },
        "required": [
          "ok",
          "endpoint",
          "version",
          "pricingTier",
          "address",
          "blockchain",
          "auditId",
          "checkedAt",
          "data"
        ]
      },
      "ScreenKytData": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "result": {
            "$ref": "#/components/schemas/ScreenKytDecision"
          },
          "summary": {
            "$ref": "#/components/schemas/ScreenKytSummary"
          },
          "riskTriggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScreenKytRiskTrigger"
            }
          },
          "walletProfile": {
            "$ref": "#/components/schemas/ScreenKytWalletProfile"
          },
          "counterpartySummary": {
            "$ref": "#/components/schemas/ScreenKytCounterpartySummary"
          },
          "topCounterparties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScreenKytCounterparty"
            }
          }
        },
        "required": [
          "result",
          "summary",
          "riskTriggers",
          "walletProfile",
          "counterpartySummary",
          "topCounterparties"
        ]
      },
      "ScreenKytDecision": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "go",
              "caution",
              "review",
              "no_go"
            ]
          },
          "safeToProceed": {
            "type": "boolean"
          },
          "recommendedAction": {
            "type": "string",
            "enum": [
              "allow",
              "allow_with_caution",
              "manual_review",
              "block"
            ]
          },
          "riskScore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "nullable": true
          },
          "riskLevel": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical",
              "unknown"
            ]
          },
          "confidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": [
          "decision",
          "safeToProceed",
          "recommendedAction",
          "riskScore",
          "riskLevel",
          "confidence"
        ]
      },
      "ScreenKytSummary": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "short": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "short",
          "text"
        ]
      },
      "ScreenKytRiskTrigger": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "severity": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "wallet": {
            "type": "string",
            "nullable": true
          },
          "transactionHash": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "name",
          "severity",
          "wallet",
          "transactionHash",
          "description"
        ]
      },
      "ScreenKytWalletProfile": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "totalTransactions": {
            "type": "number"
          },
          "detectedWallets": {
            "type": "number"
          },
          "auditedWallets": {
            "type": "number"
          },
          "tokensDetected": {
            "type": "integer",
            "minimum": 0
          },
          "firstSeen": {
            "type": "number",
            "nullable": true
          },
          "firstSeenAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastSeen": {
            "type": "number",
            "nullable": true
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "transactionVelocity": {
            "type": "number",
            "nullable": true
          },
          "incomingOutgoingRatio": {
            "type": "number",
            "nullable": true
          }
        },
        "required": [
          "totalTransactions",
          "detectedWallets",
          "auditedWallets",
          "tokensDetected",
          "firstSeen",
          "firstSeenAt",
          "lastSeen",
          "lastSeenAt",
          "transactionVelocity",
          "incomingOutgoingRatio"
        ]
      },
      "ScreenKytCounterpartySummary": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "totalCounterparties": {
            "type": "integer",
            "minimum": 0
          },
          "receivedFrom": {
            "type": "number"
          },
          "sentTo": {
            "type": "number"
          },
          "types": {
            "$ref": "#/components/schemas/ScreenKytCounterpartyTypes"
          }
        },
        "required": [
          "totalCounterparties",
          "receivedFrom",
          "sentTo",
          "types"
        ]
      },
      "ScreenKytCounterpartyTypes": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "known": {
            "type": "number"
          },
          "intermediary": {
            "type": "number"
          },
          "fraud": {
            "type": "number"
          },
          "unknown": {
            "type": "number"
          },
          "bridge": {
            "type": "number"
          },
          "publicContract": {
            "type": "number"
          },
          "unknownContract": {
            "type": "number"
          }
        },
        "required": [
          "known",
          "intermediary",
          "fraud",
          "unknown",
          "bridge",
          "publicContract",
          "unknownContract"
        ]
      },
      "ScreenKytCounterparty": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "address": {
            "type": "string",
            "nullable": true
          },
          "walletType": {
            "type": "string"
          },
          "riskLevel": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical",
              "unknown"
            ]
          },
          "depth": {
            "type": "number"
          },
          "transactionCount": {
            "type": "integer",
            "minimum": 0
          },
          "identity": {
            "$ref": "#/components/schemas/ScreenKytCounterpartyIdentity"
          }
        },
        "required": [
          "address",
          "walletType",
          "riskLevel",
          "depth",
          "transactionCount"
        ]
      },
      "ScreenKytCounterpartyIdentity": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tag": {
            "type": "string",
            "nullable": true
          },
          "entity": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "retryAfterSeconds": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "error",
          "message"
        ],
        "additionalProperties": true
      }
    }
  }
}