{
  "openapi": "3.1.0",
  "info": {
    "title": "ExactGate x402 Validator",
    "version": "1.0.0",
    "description": "Deterministic Base mainnet receipt, network, and transaction-preflight APIs paid per call with x402 USDC.",
    "license": {
      "name": "Proprietary service; purchased API responses may be used by the purchaser"
    }
  },
  "servers": [
    {
      "url": "https://exactgate-x402.insertnameheree.chatgpt.site"
    }
  ],
  "paths": {
    "/v1/catalog": {
      "get": {
        "operationId": "getExactGateCatalog",
        "summary": "Get ExactGate routes and integration examples",
        "description": "Free ExactGate integration catalog with paid Base diagnostic routes, prices, and request examples.",
        "tags": [
          "Discovery"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.000000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "ExactGate service catalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "x402 payment required. Read PAYMENT-REQUIRED, sign the accepted USDC authorization, and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "schema": {
                  "type": "string"
                },
                "description": "Base64-encoded x402 v2 payment requirements"
              }
            }
          }
        }
      }
    },
    "/v1/base/network-health": {
      "get": {
        "operationId": "getBaseNetworkHealth",
        "summary": "Get Base network health",
        "description": "Current Base chain ID, block height, gas price, block timestamp, and RPC latency.",
        "tags": [
          "Base"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Current Base network health",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "x402 payment required. Read PAYMENT-REQUIRED, sign the accepted USDC authorization, and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "schema": {
                  "type": "string"
                },
                "description": "Base64-encoded x402 v2 payment requirements"
              }
            }
          }
        }
      }
    },
    "/v1/base/receipt": {
      "get": {
        "operationId": "getBaseReceipt",
        "summary": "Inspect a Base transaction receipt",
        "description": "Verified Base transaction and receipt diagnostics with status, gas, block, and confirmations.",
        "tags": [
          "Base"
        ],
        "parameters": [
          {
            "name": "txHash",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{64}$"
            }
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Transaction receipt diagnostics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid transaction hash"
          },
          "402": {
            "description": "x402 payment required. Read PAYMENT-REQUIRED, sign the accepted USDC authorization, and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "schema": {
                  "type": "string"
                },
                "description": "Base64-encoded x402 v2 payment requirements"
              }
            }
          }
        }
      }
    },
    "/v1/base/preflight": {
      "post": {
        "operationId": "preflightBaseTransaction",
        "summary": "Preflight a Base transaction",
        "description": "Simulate a Base contract call, estimate gas, check bytecode and nonce, and surface RPC revert details. Never broadcasts.",
        "tags": [
          "Base"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "to": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  },
                  "from": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  },
                  "data": {
                    "type": "string",
                    "pattern": "^0x(?:[0-9a-fA-F]{2})*$",
                    "maxLength": 8194,
                    "default": "0x"
                  },
                  "value": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]+$",
                    "default": "0x0"
                  }
                },
                "required": [
                  "to"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Preflight diagnostics",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid transaction input"
          },
          "402": {
            "description": "x402 payment required. Read PAYMENT-REQUIRED, sign the accepted USDC authorization, and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "schema": {
                  "type": "string"
                },
                "description": "Base64-encoded x402 v2 payment requirements"
              }
            }
          }
        }
      }
    }
  }
}