{
  "openapi": "3.1.0",
  "info": {
    "title": "SI_Gemini Cerberus x402 Security API",
    "version": "1.3.0",
    "description": "Autonomous pay-per-call Web3 & AI supply-chain security edge API settled in Base (8453) & Arbitrum (42161) USDC ($0.03–$0.15 USDC) via EIP-3009 TransferWithAuthorization and PayAI x402 v1 Facilitator. Bound exclusively to Wallet 1 :: SI_Gemini.",
    "license": {
      "name": "MIT"
    }
  },
  "externalDocs": {
    "description": "Official MCP client for autonomous AI agents (Boxxji/cerberus-x402-mcp)",
    "url": "https://github.com/Boxxji/cerberus-x402-mcp"
  },
  "servers": [
    {
      "url": "https://x402-cerberus-worker.boxxon.workers.dev",
      "description": "SI_Gemini Cerberus x402 Cloudflare Worker Edge API"
    }
  ],
  "tags": [
    {
      "name": "Discovery",
      "description": "Free health, x402 manifest, and schema discovery routes."
    },
    {
      "name": "Paid Security Endpoints (x402)",
      "description": "Pay-per-call endpoints gated by EIP-3009 USDC x402 v1 payment verification & on-chain settlement."
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Service health, wallet verification, and x402 network status",
        "tags": [
          "Discovery"
        ],
        "responses": {
          "200": {
            "description": "Service status, exclusive Wallet 1 :: SI_Gemini payout addresses, and accepted Base/Arbitrum USDC domains.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/x402.json": {
      "get": {
        "operationId": "getX402DiscoveryManifest",
        "summary": "Machine-readable x402 v1 Bazaar & agent discovery manifest",
        "tags": [
          "Discovery"
        ],
        "responses": {
          "200": {
            "description": "x402 v1 manifest enumerating payment methods, USDC domains, and all 4 paid endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402DiscoveryManifest"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cerberus/scan-repo": {
      "post": {
        "operationId": "cerberus-scan-repo",
        "summary": "cerberus-scan-repo ($0.05 USDC)",
        "description": "7-layer Cerberus anti-honeypot, prompt-injection, suspicious binary (encryptly), postinstall shell-hook, obfuscation, drainer, and DLP secret scan for GitHub repositories, files, or issue text.",
        "tags": [
          "Paid Security Endpoints (x402)"
        ],
        "x-x402": {
          "version": 1,
          "scheme": "exact",
          "currency": "USDC",
          "priceUsd": "0.05",
          "maxAmountRequired": "50000",
          "payTo": "0x51E24000948150400166b40d486dB7b3C5b2C5A1",
          "networks": [
            "base",
            "arbitrum"
          ],
          "facilitatorUrl": "https://facilitator.payai.network"
        },
        "security": [
          {
            "XPaymentAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/XPaymentHeader"
          },
          {
            "$ref": "#/components/parameters/PaymentSignatureHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "repoUrl": {
                    "type": "string",
                    "description": "Public GitHub repository URL or owner/repo slug"
                  },
                  "files": {
                    "description": "Map of path -> content or array of { path, content }",
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "path",
                            "content"
                          ],
                          "properties": {
                            "path": {
                              "type": "string"
                            },
                            "content": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    ]
                  },
                  "issueText": {
                    "type": "string",
                    "description": "Optional GitHub issue, PR, or bounty description text"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cryptographic EIP-3009 verification and on-chain settlement succeeded; security report returned.",
            "headers": {
              "X-PAYMENT-RESPONSE": {
                "description": "Base64-encoded JSON settlement receipt including on-chain transaction / txHash.",
                "schema": {
                  "type": "string"
                }
              },
              "PAYMENT-RESPONSE": {
                "description": "Alias for X-PAYMENT-RESPONSE (x402 v2 header compatibility).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "payment",
                    "report"
                  ],
                  "properties": {
                    "payment": {
                      "$ref": "#/components/schemas/PaymentMetadata"
                    },
                    "report": {
                      "type": "object",
                      "required": [
                        "verdict",
                        "riskScore",
                        "layers",
                        "findings"
                      ],
                      "properties": {
                        "verdict": {
                          "type": "string",
                          "enum": [
                            "ALLOW",
                            "WARN",
                            "BLOCK"
                          ]
                        },
                        "riskScore": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "layers": {
                          "type": "array"
                        },
                        "findings": {
                          "type": "array"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or missing required request body fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — missing/invalid X-PAYMENT signature, insufficient USDC amount, or failed on-chain settlement.",
            "headers": {
              "X-PAYMENT-REQUIRED": {
                "description": "Base64-encoded JSON x402 v1 challenge with Base & Arbitrum USDC accept options.",
                "schema": {
                  "type": "string"
                }
              },
              "X-X402-ERROR-CODE": {
                "description": "Machine-readable verification or settlement error code.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402Challenge"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden address policy violation (Cerberus Wallet 1 :: SI_Gemini invariant).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "EIP-3009 authorization nonce has already been consumed (NONCE_REPLAYED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402Challenge"
                }
              }
            }
          }
        }
      }
    },
    "/v1/onchain/token-risk": {
      "post": {
        "operationId": "onchain-token-risk",
        "summary": "onchain-token-risk ($0.03 USDC)",
        "description": "Read-only on-chain EVM smart contract risk analyzer using eth_getCode, EIP-1967 proxy implementation slot inspection, EVM opcode disassembly (SELFDESTRUCT/DELEGATECALL), and 4-byte selector detection (mint/blacklist/pause/setFee).",
        "tags": [
          "Paid Security Endpoints (x402)"
        ],
        "x-x402": {
          "version": 1,
          "scheme": "exact",
          "currency": "USDC",
          "priceUsd": "0.03",
          "maxAmountRequired": "30000",
          "payTo": "0x51E24000948150400166b40d486dB7b3C5b2C5A1",
          "networks": [
            "base",
            "arbitrum"
          ],
          "facilitatorUrl": "https://facilitator.payai.network"
        },
        "security": [
          {
            "XPaymentAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/XPaymentHeader"
          },
          {
            "$ref": "#/components/parameters/PaymentSignatureHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "chain",
                  "address"
                ],
                "properties": {
                  "chain": {
                    "type": "string",
                    "enum": [
                      "arbitrum",
                      "base",
                      "ethereum",
                      "optimism",
                      "polygon"
                    ]
                  },
                  "address": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cryptographic EIP-3009 verification and on-chain settlement succeeded; security report returned.",
            "headers": {
              "X-PAYMENT-RESPONSE": {
                "description": "Base64-encoded JSON settlement receipt including on-chain transaction / txHash.",
                "schema": {
                  "type": "string"
                }
              },
              "PAYMENT-RESPONSE": {
                "description": "Alias for X-PAYMENT-RESPONSE (x402 v2 header compatibility).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "payment",
                    "report"
                  ],
                  "properties": {
                    "payment": {
                      "$ref": "#/components/schemas/PaymentMetadata"
                    },
                    "report": {
                      "type": "object",
                      "required": [
                        "chain",
                        "address",
                        "isContract",
                        "isProxy",
                        "opcodes",
                        "detectedSelectors",
                        "riskScore",
                        "riskLevel"
                      ],
                      "properties": {
                        "chain": {
                          "type": "string"
                        },
                        "address": {
                          "type": "string"
                        },
                        "isContract": {
                          "type": "boolean"
                        },
                        "isProxy": {
                          "type": "boolean"
                        },
                        "eip1967Implementation": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "riskScore": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "riskLevel": {
                          "type": "string",
                          "enum": [
                            "LOW",
                            "MEDIUM",
                            "HIGH",
                            "CRITICAL"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or missing required request body fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — missing/invalid X-PAYMENT signature, insufficient USDC amount, or failed on-chain settlement.",
            "headers": {
              "X-PAYMENT-REQUIRED": {
                "description": "Base64-encoded JSON x402 v1 challenge with Base & Arbitrum USDC accept options.",
                "schema": {
                  "type": "string"
                }
              },
              "X-X402-ERROR-CODE": {
                "description": "Machine-readable verification or settlement error code.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402Challenge"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden address policy violation (Cerberus Wallet 1 :: SI_Gemini invariant).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "EIP-3009 authorization nonce has already been consumed (NONCE_REPLAYED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402Challenge"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sbom/audit": {
      "post": {
        "operationId": "sbom-audit",
        "summary": "sbom-audit ($0.10 USDC)",
        "description": "Dependency manifest security auditor & CycloneDX 1.5 JSON SBOM generator supporting package.json, requirements.txt, and Cargo.toml (typosquatting, wildcard/unpinned versions, lifecycle hooks, license risk).",
        "tags": [
          "Paid Security Endpoints (x402)"
        ],
        "x-x402": {
          "version": 1,
          "scheme": "exact",
          "currency": "USDC",
          "priceUsd": "0.10",
          "maxAmountRequired": "100000",
          "payTo": "0x51E24000948150400166b40d486dB7b3C5b2C5A1",
          "networks": [
            "base",
            "arbitrum"
          ],
          "facilitatorUrl": "https://facilitator.payai.network"
        },
        "security": [
          {
            "XPaymentAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/XPaymentHeader"
          },
          {
            "$ref": "#/components/parameters/PaymentSignatureHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "format",
                  "content"
                ],
                "properties": {
                  "format": {
                    "type": "string",
                    "enum": [
                      "package.json",
                      "requirements.txt",
                      "Cargo.toml"
                    ]
                  },
                  "content": {
                    "type": "string"
                  },
                  "projectName": {
                    "type": "string"
                  },
                  "projectVersion": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cryptographic EIP-3009 verification and on-chain settlement succeeded; security report returned.",
            "headers": {
              "X-PAYMENT-RESPONSE": {
                "description": "Base64-encoded JSON settlement receipt including on-chain transaction / txHash.",
                "schema": {
                  "type": "string"
                }
              },
              "PAYMENT-RESPONSE": {
                "description": "Alias for X-PAYMENT-RESPONSE (x402 v2 header compatibility).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "payment",
                    "report"
                  ],
                  "properties": {
                    "payment": {
                      "$ref": "#/components/schemas/PaymentMetadata"
                    },
                    "report": {
                      "type": "object",
                      "required": [
                        "verdict",
                        "riskScore",
                        "summary",
                        "findings",
                        "sbom"
                      ],
                      "properties": {
                        "verdict": {
                          "type": "string",
                          "enum": [
                            "PASS",
                            "WARN",
                            "FAIL"
                          ]
                        },
                        "riskScore": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "summary": {
                          "type": "object"
                        },
                        "findings": {
                          "type": "array"
                        },
                        "sbom": {
                          "type": "object",
                          "description": "Valid CycloneDX 1.5 JSON SBOM"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or missing required request body fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — missing/invalid X-PAYMENT signature, insufficient USDC amount, or failed on-chain settlement.",
            "headers": {
              "X-PAYMENT-REQUIRED": {
                "description": "Base64-encoded JSON x402 v1 challenge with Base & Arbitrum USDC accept options.",
                "schema": {
                  "type": "string"
                }
              },
              "X-X402-ERROR-CODE": {
                "description": "Machine-readable verification or settlement error code.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402Challenge"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden address policy violation (Cerberus Wallet 1 :: SI_Gemini invariant).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "EIP-3009 authorization nonce has already been consumed (NONCE_REPLAYED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402Challenge"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cerberus/audit-solidity": {
      "post": {
        "operationId": "cerberus-audit-solidity",
        "summary": "cerberus-audit-solidity ($0.15 USDC)",
        "description": "10-detector Solidity static & invariant contest auditor (ERC-4626 inflation, Chainlink/L2 sequencer staleness, unchecked ERC-20 return, reentrancy CEI, signature replay, tx.origin, arbitrary delegatecall, division-before-multiplication, unprotected initializer/selfdestruct, fee-on-transfer accounting) with CWE/SWC tags and auto-generated Foundry forge-std/Test.sol scaffolds for HIGH/CRITICAL findings.",
        "tags": [
          "Paid Security Endpoints (x402)"
        ],
        "x-x402": {
          "version": 1,
          "scheme": "exact",
          "currency": "USDC",
          "priceUsd": "0.15",
          "maxAmountRequired": "150000",
          "payTo": "0x51E24000948150400166b40d486dB7b3C5b2C5A1",
          "networks": [
            "base",
            "arbitrum"
          ],
          "facilitatorUrl": "https://facilitator.payai.network"
        },
        "security": [
          {
            "XPaymentAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/XPaymentHeader"
          },
          {
            "$ref": "#/components/parameters/PaymentSignatureHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string",
                    "description": "Optional Solidity filename when supplying single \"source\""
                  },
                  "source": {
                    "type": "string",
                    "description": "Single Solidity contract source code string"
                  },
                  "files": {
                    "description": "Map of path -> Solidity source or array of { path, content }",
                    "oneOf": [
                      {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "path",
                            "content"
                          ],
                          "properties": {
                            "path": {
                              "type": "string"
                            },
                            "content": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cryptographic EIP-3009 verification and on-chain settlement succeeded; security report returned.",
            "headers": {
              "X-PAYMENT-RESPONSE": {
                "description": "Base64-encoded JSON settlement receipt including on-chain transaction / txHash.",
                "schema": {
                  "type": "string"
                }
              },
              "PAYMENT-RESPONSE": {
                "description": "Alias for X-PAYMENT-RESPONSE (x402 v2 header compatibility).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "payment",
                    "report"
                  ],
                  "properties": {
                    "payment": {
                      "$ref": "#/components/schemas/PaymentMetadata"
                    },
                    "report": {
                      "type": "object",
                      "required": [
                        "scanner",
                        "filesScanned",
                        "linesScanned",
                        "verdict",
                        "riskScore",
                        "severityCounts",
                        "findingsCount",
                        "findings"
                      ],
                      "properties": {
                        "scanner": {
                          "type": "string"
                        },
                        "filesScanned": {
                          "type": "number"
                        },
                        "linesScanned": {
                          "type": "number"
                        },
                        "verdict": {
                          "type": "string",
                          "enum": [
                            "PASS",
                            "MEDIUM_RISK",
                            "HIGH_RISK",
                            "CRITICAL_RISK"
                          ]
                        },
                        "riskScore": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "severityCounts": {
                          "type": "object"
                        },
                        "findingsCount": {
                          "type": "number"
                        },
                        "findings": {
                          "type": "array"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid JSON or missing required request body fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — missing/invalid X-PAYMENT signature, insufficient USDC amount, or failed on-chain settlement.",
            "headers": {
              "X-PAYMENT-REQUIRED": {
                "description": "Base64-encoded JSON x402 v1 challenge with Base & Arbitrum USDC accept options.",
                "schema": {
                  "type": "string"
                }
              },
              "X-X402-ERROR-CODE": {
                "description": "Machine-readable verification or settlement error code.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402Challenge"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden address policy violation (Cerberus Wallet 1 :: SI_Gemini invariant).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "EIP-3009 authorization nonce has already been consumed (NONCE_REPLAYED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402Challenge"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "XPaymentAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-PAYMENT",
        "description": "Base64-encoded JSON x402 v1 payment payload containing an EIP-712 signed EIP-3009 TransferWithAuthorization for Base (8453) or Arbitrum (42161) USDC payable exclusively to Wallet 1 :: SI_Gemini (0x51E24000948150400166b40d486dB7b3C5b2C5A1). `PAYMENT-SIGNATURE` is also accepted as an alias."
      }
    },
    "parameters": {
      "XPaymentHeader": {
        "name": "X-PAYMENT",
        "in": "header",
        "required": true,
        "description": "Base64-encoded JSON x402 v1 EIP-3009 TransferWithAuthorization payload (`{ x402Version: 1, scheme: \"exact\", network: \"base\" | \"arbitrum\", payload: { signature, authorization } }`).",
        "schema": {
          "type": "string",
          "contentEncoding": "base64"
        }
      },
      "PaymentSignatureHeader": {
        "name": "PAYMENT-SIGNATURE",
        "in": "header",
        "required": false,
        "description": "Optional x402 v2 compatible alias for the `X-PAYMENT` header.",
        "schema": {
          "type": "string",
          "contentEncoding": "base64"
        }
      }
    },
    "schemas": {
      "X402PaymentPayload": {
        "type": "object",
        "required": [
          "x402Version",
          "scheme",
          "network",
          "payload"
        ],
        "properties": {
          "x402Version": {
            "type": "integer",
            "const": 1
          },
          "scheme": {
            "type": "string",
            "const": "exact"
          },
          "network": {
            "type": "string",
            "enum": [
              "base",
              "arbitrum"
            ]
          },
          "payload": {
            "type": "object",
            "required": [
              "signature",
              "authorization"
            ],
            "properties": {
              "signature": {
                "type": "string",
                "pattern": "^0x[0-9a-fA-F]{130,}$"
              },
              "authorization": {
                "type": "object",
                "required": [
                  "from",
                  "to",
                  "value",
                  "validAfter",
                  "validBefore",
                  "nonce"
                ],
                "properties": {
                  "from": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  },
                  "to": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$",
                    "description": "Must match Wallet 1 :: SI_Gemini (0x51E24000948150400166b40d486dB7b3C5b2C5A1)"
                  },
                  "value": {
                    "type": "string",
                    "description": "Amount in microUSDC (6 decimals)"
                  },
                  "validAfter": {
                    "type": "string",
                    "description": "Unix timestamp (seconds)"
                  },
                  "validBefore": {
                    "type": "string",
                    "description": "Unix timestamp (seconds)"
                  },
                  "nonce": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{64}$"
                  }
                }
              }
            }
          }
        }
      },
      "X402AcceptOption": {
        "type": "object",
        "required": [
          "scheme",
          "network",
          "maxAmountRequired",
          "resource",
          "description",
          "mimeType",
          "payTo",
          "maxTimeoutSeconds",
          "asset",
          "extra"
        ],
        "properties": {
          "scheme": {
            "type": "string",
            "const": "exact"
          },
          "network": {
            "type": "string",
            "enum": [
              "base",
              "arbitrum"
            ]
          },
          "chainId": {
            "type": "integer",
            "enum": [
              8453,
              42161
            ]
          },
          "caip2": {
            "type": "string",
            "enum": [
              "eip155:8453",
              "eip155:42161"
            ]
          },
          "maxAmountRequired": {
            "type": "string"
          },
          "resource": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "payTo": {
            "type": "string"
          },
          "maxTimeoutSeconds": {
            "type": "integer"
          },
          "asset": {
            "type": "string"
          },
          "extra": {
            "type": "object",
            "required": [
              "name",
              "version"
            ],
            "properties": {
              "name": {
                "type": "string",
                "const": "USD Coin"
              },
              "version": {
                "type": "string",
                "const": "2"
              }
            }
          }
        }
      },
      "X402Challenge": {
        "type": "object",
        "required": [
          "x402Version",
          "error",
          "accepts"
        ],
        "properties": {
          "x402Version": {
            "type": "integer",
            "const": 1
          },
          "error": {
            "type": "string"
          },
          "accepts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/X402AcceptOption"
            }
          }
        }
      },
      "PaymentMetadata": {
        "type": "object",
        "required": [
          "verified",
          "network",
          "chainId",
          "asset",
          "payer",
          "payTo",
          "valueMicroUsdc",
          "nonce",
          "settled",
          "txHash"
        ],
        "properties": {
          "verified": {
            "type": "boolean"
          },
          "network": {
            "type": "string",
            "enum": [
              "base",
              "arbitrum"
            ]
          },
          "chainId": {
            "type": "integer",
            "enum": [
              8453,
              42161
            ]
          },
          "asset": {
            "type": "string"
          },
          "payer": {
            "type": "string"
          },
          "payTo": {
            "type": "string"
          },
          "valueMicroUsdc": {
            "type": "string"
          },
          "nonce": {
            "type": "string"
          },
          "settled": {
            "type": "boolean"
          },
          "txHash": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "HealthResponse": {
        "type": "object",
        "required": [
          "status",
          "service",
          "version",
          "timestamp",
          "nonceStoreBackend",
          "facilitatorConfigured",
          "wallet",
          "x402"
        ],
        "properties": {
          "status": {
            "type": "string",
            "const": "ok"
          },
          "service": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "nonceStoreBackend": {
            "type": "string"
          },
          "facilitatorConfigured": {
            "type": "boolean"
          },
          "facilitatorUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "requireSettlement": {
            "type": "boolean"
          },
          "mcpEndpoint": {
            "type": "string",
            "format": "uri"
          },
          "wallet": {
            "type": "object",
            "required": [
              "alias",
              "exclusive",
              "evmPayoutAddress",
              "evmPayoutAddressChecksum",
              "solanaPayoutAddress"
            ],
            "properties": {
              "alias": {
                "type": "string"
              },
              "exclusive": {
                "type": "boolean"
              },
              "evmPayoutAddress": {
                "type": "string"
              },
              "evmPayoutAddressChecksum": {
                "type": "string"
              },
              "solanaPayoutAddress": {
                "type": "string"
              }
            }
          },
          "x402": {
            "type": "object",
            "required": [
              "version",
              "acceptedNetworks",
              "discoveryManifest"
            ],
            "properties": {
              "version": {
                "type": "integer",
                "const": 1
              },
              "acceptedNetworks": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              },
              "discoveryManifest": {
                "type": "string",
                "format": "uri"
              },
              "openApiSchema": {
                "type": "string",
                "format": "uri"
              },
              "llmsTxt": {
                "type": "string",
                "format": "uri"
              },
              "mcpEndpoint": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      },
      "X402DiscoveryManifest": {
        "type": "object",
        "required": [
          "x402Version",
          "name",
          "version",
          "description",
          "wallet",
          "paymentMethods",
          "endpoints"
        ],
        "properties": {
          "x402Version": {
            "type": "integer",
            "const": 1
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "wallet": {
            "type": "object"
          },
          "paymentMethods": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}