{
  "components": {
    "schemas": {
      "AbstractTransferPlan": {
        "description": "The system's optimal routing decision",
        "properties": {
          "estimatedOutput": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "estimatedTimeSeconds": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "feeBreakdown": {
            "$ref": "#/components/schemas/FeeSummary"
          },
          "intentId": {
            "type": "string"
          },
          "requiresApproval": {
            "type": "boolean"
          },
          "sourceChain": {
            "type": "string"
          },
          "sourceReason": {
            "type": "string"
          }
        },
        "required": [
          "intentId",
          "sourceChain",
          "sourceReason",
          "estimatedOutput",
          "feeBreakdown",
          "estimatedTimeSeconds",
          "requiresApproval"
        ],
        "type": "object"
      },
      "AbstractTransferRequest": {
        "description": "Abstract transfer — user doesn't specify source chain",
        "properties": {
          "amount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "destChain": {
            "type": "string"
          },
          "maxSlippageBps": {
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "outputToken": {
            "type": "string"
          },
          "recipient": {
            "type": "string"
          },
          "speed": {
            "nullable": true,
            "type": "string"
          },
          "walletAddress": {
            "type": "string"
          }
        },
        "required": [
          "walletAddress",
          "destChain",
          "outputToken",
          "amount",
          "recipient"
        ],
        "type": "object"
      },
      "AcceptedPayment": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "asset": {
            "type": "string"
          },
          "extra": {},
          "maxTimeoutSeconds": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "network": {
            "type": "string"
          },
          "payTo": {
            "type": "string"
          },
          "scheme": {
            "type": "string"
          }
        },
        "required": [
          "scheme",
          "network",
          "asset",
          "amount",
          "payTo"
        ],
        "type": "object"
      },
      "Auction": {
        "description": "Auction state for an intent",
        "properties": {
          "auctionEnd": {
            "format": "int64",
            "type": "integer"
          },
          "auctionStart": {
            "format": "int64",
            "type": "integer"
          },
          "houseQuote": {
            "$ref": "#/components/schemas/FillerQuote"
          },
          "intentId": {
            "type": "string"
          },
          "quotes": {
            "items": {
              "$ref": "#/components/schemas/FillerQuote"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/AuctionStatus"
          },
          "winningQuote": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FillerQuote"
              }
            ],
            "nullable": true
          }
        },
        "required": [
          "intentId",
          "status",
          "quotes",
          "auctionStart",
          "auctionEnd",
          "houseQuote"
        ],
        "type": "object"
      },
      "AuctionStatus": {
        "enum": [
          "OPEN",
          "CLOSED",
          "WON",
          "EXPIRED",
          "CANCELLED"
        ],
        "type": "string"
      },
      "CancelLimitOrderResponse": {
        "properties": {
          "id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "message"
        ],
        "type": "object"
      },
      "ConfirmFillRequest": {
        "properties": {
          "destChain": {
            "type": "string"
          },
          "fillerApiKey": {
            "type": "string"
          },
          "fillerId": {
            "type": "string"
          },
          "outputAmount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "txHash": {
            "type": "string"
          }
        },
        "required": [
          "fillerId",
          "fillerApiKey",
          "txHash",
          "outputAmount",
          "destChain"
        ],
        "type": "object"
      },
      "CreateDcaRequest": {
        "properties": {
          "amountUsdc": {
            "description": "USDC amount per execution (human units, e.g. 10.0)",
            "format": "double",
            "type": "number"
          },
          "frequencyHours": {
            "description": "Interval in hours between executions. Allowed: 1, 4, 8, 24, 168",
            "format": "int32",
            "type": "integer"
          },
          "maxExecutions": {
            "description": "Stop after N executions (None = unlimited)",
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "referrerCode": {
            "description": "Optional referral code",
            "nullable": true,
            "type": "string"
          },
          "sourceChain": {
            "description": "Source chain used to fund the schedule. Defaults to \"SOL\" for direct WaaS funding.",
            "nullable": true,
            "type": "string"
          },
          "tokenOut": {
            "description": "Target token mint address on Solana",
            "type": "string"
          },
          "tokenOutSymbol": {
            "description": "Human-readable symbol (e.g. \"SOL\", \"555\")",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "tokenOut",
          "amountUsdc",
          "frequencyHours"
        ],
        "type": "object"
      },
      "CreateLimitOrderRequest": {
        "properties": {
          "amountUsdc": {
            "description": "USDC amount to spend (human units, e.g. 100.0)",
            "format": "double",
            "type": "number"
          },
          "expiresAt": {
            "description": "Optional expiry time. Expired active orders are marked EXPIRED by the worker.",
            "nullable": true,
            "type": "string"
          },
          "sourceChain": {
            "description": "Source chain used to fund the order. Currently must be \"SOL\" for direct WaaS funding.",
            "nullable": true,
            "type": "string"
          },
          "targetPrice": {
            "description": "Target price in USDC per token (e.g. 150.0 for SOL at $150)",
            "format": "double",
            "type": "number"
          },
          "tokenOut": {
            "description": "Target token mint address on Solana",
            "type": "string"
          },
          "tokenOutSymbol": {
            "description": "Human-readable symbol (e.g. \"SOL\", \"555\")",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "tokenOut",
          "amountUsdc",
          "targetPrice"
        ],
        "type": "object"
      },
      "CrossChainIntent": {
        "description": "ERC-7683 inspired CrossChainIntent",
        "properties": {
          "deadline": {
            "description": "Deadline (Unix timestamp) — intent expires after this",
            "format": "int64",
            "type": "integer"
          },
          "destChain": {
            "description": "Destination chain",
            "type": "string"
          },
          "idempotencyKey": {
            "description": "Idempotency key",
            "nullable": true,
            "type": "string"
          },
          "inputAmount": {
            "description": "Input amount in base units (e.g., 1000000 = 1 USDC)",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "inputToken": {
            "description": "Input token address or symbol (e.g., \"USDC\", \"ETH\", \"native\")",
            "type": "string"
          },
          "maxSlippageBps": {
            "description": "Maximum slippage in BPS (e.g., 50 = 0.5%)",
            "format": "int32",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "mevProtection": {
            "description": "Whether the caller prefers MEV-protected execution on swap legs.\n\nThis is currently a shared request contract and operator signal. The\nexecutor integration itself is still staged separately.",
            "nullable": true,
            "type": "boolean"
          },
          "minOutputAmount": {
            "description": "Minimum acceptable output amount (slippage protection)",
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "outputToken": {
            "description": "Output token address or symbol",
            "type": "string"
          },
          "recipient": {
            "description": "Recipient address on destination chain",
            "type": "string"
          },
          "referrerCode": {
            "description": "Referral tracking code",
            "nullable": true,
            "type": "string"
          },
          "sender": {
            "description": "Sender address on source chain",
            "type": "string"
          },
          "sourceChain": {
            "description": "Source chain (e.g., \"ETH\", \"SOL\") — or \"auto\" for chain abstraction",
            "type": "string"
          },
          "webhookUrl": {
            "description": "Optional webhook URL for status updates",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "sourceChain",
          "destChain",
          "inputToken",
          "outputToken",
          "inputAmount",
          "deadline",
          "recipient",
          "sender"
        ],
        "type": "object"
      },
      "CrossChainOrder": {
        "description": "ERC-7683 CrossChainOrder — the canonical intent format.\n\nThis struct mirrors the on-chain `CrossChainOrder` struct defined in EIP-7683.\nAll cross-chain intent protocols that implement this standard can interoperate\nby exchanging orders in this format.",
        "properties": {
          "fillDeadline": {
            "description": "Timestamp after which the order can no longer be filled",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "initiateDeadline": {
            "description": "Timestamp after which the order can no longer be initiated",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "nonce": {
            "description": "Nonce for replay protection",
            "type": "string"
          },
          "orderData": {
            "description": "Arbitrary implementation-specific data (encoded as hex)",
            "type": "string"
          },
          "originChainId": {
            "description": "Chain ID where the order originates",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "settlementContract": {
            "description": "Address of the settlement contract on the origin chain",
            "type": "string"
          },
          "swapper": {
            "description": "Address of the user placing the order",
            "type": "string"
          }
        },
        "required": [
          "settlementContract",
          "swapper",
          "nonce",
          "originChainId",
          "initiateDeadline",
          "fillDeadline",
          "orderData"
        ],
        "type": "object"
      },
      "DcaExecutionResponse": {
        "properties": {
          "amountUsdc": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "errorMessage": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "scheduleId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "swapTxHash": {
            "nullable": true,
            "type": "string"
          },
          "tokenOutAmount": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "id",
          "scheduleId",
          "amountUsdc",
          "status",
          "createdAt"
        ],
        "type": "object"
      },
      "DcaExecutionsResponse": {
        "properties": {
          "executions": {
            "items": {
              "$ref": "#/components/schemas/DcaExecutionResponse"
            },
            "type": "array"
          }
        },
        "required": [
          "executions"
        ],
        "type": "object"
      },
      "DcaScheduleResponse": {
        "properties": {
          "amountUsdc": {
            "type": "string"
          },
          "availableBalanceUsdc": {
            "description": "Current USDC balance available in the WaaS wallet for this schedule.\nPopulated on GET /v1/dca/schedules; may be None if balance lookup fails.",
            "nullable": true,
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "frequencyHours": {
            "format": "int32",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "maxExecutions": {
            "format": "int32",
            "nullable": true,
            "type": "integer"
          },
          "nextExecutionAt": {
            "type": "string"
          },
          "pauseReason": {
            "description": "Human-readable reason when status = PAUSED (e.g. \"insufficient_balance\")",
            "nullable": true,
            "type": "string"
          },
          "referrerCode": {
            "nullable": true,
            "type": "string"
          },
          "sourceChain": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "tokenOut": {
            "type": "string"
          },
          "tokenOutSymbol": {
            "nullable": true,
            "type": "string"
          },
          "totalExecutions": {
            "format": "int32",
            "type": "integer"
          },
          "updatedAt": {
            "type": "string"
          },
          "walletAddress": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "walletAddress",
          "sourceChain",
          "tokenOut",
          "amountUsdc",
          "frequencyHours",
          "nextExecutionAt",
          "totalExecutions",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "DcaSchedulesResponse": {
        "properties": {
          "schedules": {
            "items": {
              "$ref": "#/components/schemas/DcaScheduleResponse"
            },
            "type": "array"
          }
        },
        "required": [
          "schedules"
        ],
        "type": "object"
      },
      "FeeBreakdown": {
        "description": "Fee breakdown for an intent quote",
        "properties": {
          "bridgeFee": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "gasFee": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "platformFee": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "totalFee": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "platformFee",
          "bridgeFee",
          "gasFee",
          "totalFee"
        ],
        "type": "object"
      },
      "FeeSummary": {
        "properties": {
          "bridgeFee": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "gasFeeUsd": {
            "format": "double",
            "type": "number"
          },
          "platformFee": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "totalFee": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "platformFee",
          "bridgeFee",
          "gasFeeUsd",
          "totalFee"
        ],
        "type": "object"
      },
      "FillInstruction": {
        "description": "Instructions a filler needs to complete the fill on the destination chain.",
        "properties": {
          "destinationChainId": {
            "description": "Destination chain ID",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "destinationSettler": {
            "description": "Settlement contract address on destination chain",
            "type": "string"
          },
          "originData": {
            "description": "Data to pass to the destination settlement contract",
            "type": "string"
          }
        },
        "required": [
          "destinationChainId",
          "destinationSettler",
          "originData"
        ],
        "type": "object"
      },
      "FillerQuote": {
        "description": "A quote submitted by a filler for an intent",
        "properties": {
          "collateralAmount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "estimatedTimeSeconds": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "expiresAt": {
            "format": "int64",
            "type": "integer"
          },
          "fillDeadline": {
            "format": "int64",
            "type": "integer"
          },
          "fillerId": {
            "type": "string"
          },
          "intentId": {
            "type": "string"
          },
          "outputAmount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "quoteId": {
            "type": "string"
          },
          "submittedAt": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "quoteId",
          "intentId",
          "fillerId",
          "outputAmount",
          "fillDeadline",
          "estimatedTimeSeconds",
          "collateralAmount",
          "submittedAt",
          "expiresAt"
        ],
        "type": "object"
      },
      "IntentQuote": {
        "description": "Quote returned when an intent is submitted",
        "properties": {
          "estimatedOutput": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "estimatedTimeSeconds": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "expiresAt": {
            "format": "int64",
            "type": "integer"
          },
          "feeBreakdown": {
            "$ref": "#/components/schemas/FeeBreakdown"
          },
          "intentId": {
            "type": "string"
          },
          "routeDescription": {
            "type": "string"
          }
        },
        "required": [
          "intentId",
          "estimatedOutput",
          "feeBreakdown",
          "estimatedTimeSeconds",
          "routeDescription",
          "expiresAt"
        ],
        "type": "object"
      },
      "IntentState": {
        "description": "Intent lifecycle states",
        "enum": [
          "SUBMITTED",
          "AUCTION_OPEN",
          "QUOTING",
          "QUOTED",
          "FILLING",
          "FILLED",
          "SETTLING",
          "SETTLED",
          "COMPLETED",
          "EXPIRED",
          "FAILED",
          "CANCELLED"
        ],
        "type": "string"
      },
      "IntentStatus": {
        "description": "Full intent status response",
        "properties": {
          "createdAt": {
            "format": "int64",
            "type": "integer"
          },
          "fillTxHash": {
            "nullable": true,
            "type": "string"
          },
          "intentId": {
            "type": "string"
          },
          "outputAmount": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "quote": {
            "allOf": [
              {
                "$ref": "#/components/schemas/IntentQuote"
              }
            ],
            "nullable": true
          },
          "settlementTxHash": {
            "nullable": true,
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/IntentState"
          },
          "updatedAt": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "intentId",
          "state",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "LimitOrderResponse": {
        "properties": {
          "amountUsdc": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "currentPrice": {
            "nullable": true,
            "type": "string"
          },
          "executionTxHash": {
            "nullable": true,
            "type": "string"
          },
          "expiresAt": {
            "nullable": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "sourceChain": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "targetPrice": {
            "type": "string"
          },
          "tokenOut": {
            "type": "string"
          },
          "tokenOutAmount": {
            "nullable": true,
            "type": "string"
          },
          "tokenOutSymbol": {
            "nullable": true,
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "walletAddress": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "walletAddress",
          "sourceChain",
          "tokenOut",
          "amountUsdc",
          "targetPrice",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "LimitOrdersResponse": {
        "properties": {
          "orders": {
            "items": {
              "$ref": "#/components/schemas/LimitOrderResponse"
            },
            "type": "array"
          }
        },
        "required": [
          "orders"
        ],
        "type": "object"
      },
      "LoginRequest": {
        "properties": {
          "chain_type": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "nonce": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "wallet_address": {
            "type": "string"
          }
        },
        "required": [
          "wallet_address",
          "signature",
          "message",
          "chain_type",
          "nonce"
        ],
        "type": "object"
      },
      "LoginResponse": {
        "properties": {
          "session": {
            "$ref": "#/components/schemas/SessionEnvelope"
          },
          "token": {
            "type": "string"
          }
        },
        "required": [
          "token",
          "session"
        ],
        "type": "object"
      },
      "NonceRequest": {
        "properties": {
          "chain_type": {
            "type": "string"
          },
          "wallet_address": {
            "type": "string"
          }
        },
        "required": [
          "wallet_address",
          "chain_type"
        ],
        "type": "object"
      },
      "NonceResponse": {
        "properties": {
          "chain_type": {
            "type": "string"
          },
          "challenge_id": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "nonce": {
            "type": "string"
          },
          "wallet_address": {
            "type": "string"
          }
        },
        "required": [
          "challenge_id",
          "nonce",
          "wallet_address",
          "chain_type",
          "message",
          "expires_at"
        ],
        "type": "object"
      },
      "OrderInput": {
        "description": "A single input leg of the order (token the swapper sends on the origin chain).",
        "properties": {
          "amount": {
            "description": "Amount in base units (string for large numbers / u256 compat)",
            "type": "string"
          },
          "chainId": {
            "description": "Chain ID this input lives on",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "token": {
            "description": "Token address on origin chain",
            "type": "string"
          }
        },
        "required": [
          "token",
          "amount",
          "chainId"
        ],
        "type": "object"
      },
      "OrderOutput": {
        "description": "A single output leg of the order (token the recipient receives on the\ndestination chain).",
        "properties": {
          "amount": {
            "description": "Minimum output amount in base units",
            "type": "string"
          },
          "chainId": {
            "description": "Destination chain ID",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "recipient": {
            "description": "Recipient address on destination chain",
            "type": "string"
          },
          "token": {
            "description": "Token address on destination chain",
            "type": "string"
          }
        },
        "required": [
          "token",
          "amount",
          "chainId",
          "recipient"
        ],
        "type": "object"
      },
      "PayloadEnvelope": {
        "properties": {
          "authorization": {},
          "signature": {
            "nullable": true,
            "type": "string"
          },
          "transaction": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaymentPayload": {
        "properties": {
          "accepted": {
            "$ref": "#/components/schemas/AcceptedPayment"
          },
          "payload": {
            "$ref": "#/components/schemas/PayloadEnvelope"
          },
          "resource": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ResourceInfo"
              }
            ],
            "nullable": true
          },
          "x402Version": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "x402Version",
          "accepted",
          "payload"
        ],
        "type": "object"
      },
      "PaymentRequirements": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "asset": {
            "type": "string"
          },
          "extra": {},
          "maxTimeoutSeconds": {
            "format": "int64",
            "minimum": 0,
            "nullable": true,
            "type": "integer"
          },
          "network": {
            "type": "string"
          },
          "payTo": {
            "type": "string"
          },
          "scheme": {
            "type": "string"
          }
        },
        "required": [
          "scheme",
          "network",
          "asset",
          "amount",
          "payTo"
        ],
        "type": "object"
      },
      "RegisterFillerRequest": {
        "properties": {
          "apiKey": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "supportedChains": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "supportedTokens": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "name",
          "apiKey",
          "supportedChains",
          "supportedTokens"
        ],
        "type": "object"
      },
      "ResolvedCrossChainOrder": {
        "description": "ERC-7683 ResolvedCrossChainOrder — decoded/resolved version with explicit\ninputs, outputs, and fill instructions derived from the opaque `order_data`.",
        "properties": {
          "fillInstructions": {
            "description": "Destination chain fill instructions",
            "items": {
              "$ref": "#/components/schemas/FillInstruction"
            },
            "type": "array"
          },
          "inputs": {
            "description": "Input tokens on origin chain",
            "items": {
              "$ref": "#/components/schemas/OrderInput"
            },
            "type": "array"
          },
          "order": {
            "$ref": "#/components/schemas/CrossChainOrder",
            "description": "The original order"
          },
          "outputs": {
            "description": "Output tokens on destination chain",
            "items": {
              "$ref": "#/components/schemas/OrderOutput"
            },
            "type": "array"
          }
        },
        "required": [
          "order",
          "inputs",
          "outputs",
          "fillInstructions"
        ],
        "type": "object"
      },
      "ResourceInfo": {
        "properties": {
          "description": {
            "nullable": true,
            "type": "string"
          },
          "mimeType": {
            "nullable": true,
            "type": "string"
          },
          "url": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SdkChain": {
        "description": "Supported chains for SDK transfers",
        "enum": [
          "BASE",
          "ETH",
          "ARB",
          "POLYGON",
          "SOLANA",
          "OPTIMISM",
          "AVALANCHE",
          "ZKSYNC",
          "STARKNET"
        ],
        "type": "string"
      },
      "SdkEstimateRequest": {
        "description": "Request for fee estimation",
        "properties": {
          "amount": {
            "description": "Amount in USDC (human readable)",
            "type": "string"
          },
          "from": {
            "$ref": "#/components/schemas/SdkChain",
            "description": "Source chain"
          },
          "speed": {
            "$ref": "#/components/schemas/TransferSpeed",
            "description": "Transfer speed preference"
          },
          "to": {
            "$ref": "#/components/schemas/SdkChain",
            "description": "Destination chain"
          }
        },
        "required": [
          "from",
          "to",
          "amount"
        ],
        "type": "object"
      },
      "SdkEstimateResponse": {
        "description": "Response from fee estimation",
        "properties": {
          "amount": {
            "description": "Original amount",
            "type": "string"
          },
          "approval_kind": {
            "description": "Required approval kind for the selected bridge contract.",
            "nullable": true,
            "type": "string"
          },
          "bridge_contract_version": {
            "description": "Active bridge contract version for EVM source chains.",
            "nullable": true,
            "type": "string"
          },
          "estimated_time_seconds": {
            "description": "Estimated completion time",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "fee": {
            "$ref": "#/components/schemas/SdkFee",
            "description": "Fee breakdown"
          },
          "native_gas_token": {
            "description": "The native gas token symbol when `requires_native_gas` is true.",
            "nullable": true,
            "type": "string"
          },
          "net_receive": {
            "description": "Net amount recipient will receive",
            "type": "string"
          },
          "requires_native_gas": {
            "description": "Whether the end user must hold native gas tokens for the selected route.",
            "type": "boolean"
          },
          "spender": {
            "description": "Contract address the user must sign against.",
            "nullable": true,
            "type": "string"
          },
          "sponsor_model": {
            "description": "The backend sponsorship model used by the selected route.",
            "type": "string"
          },
          "total_charge": {
            "description": "Total amount charged from sender (ADDITIVE model)",
            "type": "string"
          }
        },
        "required": [
          "amount",
          "fee",
          "net_receive",
          "total_charge",
          "estimated_time_seconds",
          "requires_native_gas",
          "sponsor_model"
        ],
        "type": "object"
      },
      "SdkFee": {
        "description": "Fee breakdown",
        "properties": {
          "gas": {
            "description": "Gas/relay fee in USDC",
            "type": "string"
          },
          "platform": {
            "description": "Platform fee in USDC",
            "type": "string"
          },
          "total": {
            "description": "Total fee in USDC",
            "type": "string"
          }
        },
        "required": [
          "platform",
          "gas",
          "total"
        ],
        "type": "object"
      },
      "SdkGaslessValidationResult": {
        "description": "Classification for Solana gas sponsorship validation",
        "enum": [
          "gasless",
          "paid_fallback",
          "blocked"
        ],
        "type": "string"
      },
      "SdkLimits": {
        "description": "Transfer limits",
        "properties": {
          "max_amount": {
            "description": "Maximum transfer amount in USDC",
            "type": "string"
          },
          "min_amount": {
            "description": "Minimum transfer amount in USDC",
            "type": "string"
          }
        },
        "required": [
          "min_amount",
          "max_amount"
        ],
        "type": "object"
      },
      "SdkPermit": {
        "description": "ERC-2612 permit data for gasless EVM transfers",
        "properties": {
          "deadline": {
            "type": "string"
          },
          "nonce": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "r": {
            "type": "string"
          },
          "s": {
            "type": "string"
          },
          "spender": {
            "type": "string"
          },
          "v": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "owner",
          "spender",
          "value",
          "nonce",
          "deadline",
          "v",
          "r",
          "s"
        ],
        "type": "object"
      },
      "SdkPermit2": {
        "properties": {
          "amount": {
            "type": "string"
          },
          "deadline": {
            "type": "string"
          },
          "nonce": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "nonce",
          "deadline",
          "signature"
        ],
        "type": "object"
      },
      "SdkRoutePair": {
        "description": "Supported route pair",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "estimated_time_seconds": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "from": {
            "$ref": "#/components/schemas/SdkSettlementChain"
          },
          "to": {
            "$ref": "#/components/schemas/SdkSettlementChain"
          }
        },
        "required": [
          "from",
          "to",
          "enabled",
          "estimated_time_seconds"
        ],
        "type": "object"
      },
      "SdkSettlementChain": {
        "description": "Settlement graph chains returned by shared SDK discovery and status surfaces.\n\nThis set is intentionally broader than `SdkChain`, which still represents the\nnarrower request validation surface for `sdk/v1` transfer and estimate flows.",
        "enum": [
          "BASE",
          "ETH",
          "ARB",
          "POLYGON",
          "SOLANA",
          "OPTIMISM",
          "AVALANCHE",
          "ZKSYNC",
          "STARKNET",
          "BITCOIN",
          "TRON"
        ],
        "type": "string"
      },
      "SdkSolanaBuildRequest": {
        "description": "Request to build a Solana transaction",
        "properties": {
          "amount": {
            "description": "Amount in USDC (human readable)",
            "type": "string"
          },
          "from_wallet": {
            "description": "Sender's Solana wallet address (base58)",
            "type": "string"
          },
          "idempotency_key": {
            "description": "Idempotency key",
            "nullable": true,
            "type": "string"
          },
          "recipient": {
            "description": "Recipient address on destination chain",
            "type": "string"
          },
          "speed": {
            "$ref": "#/components/schemas/TransferSpeed",
            "description": "Transfer speed preference"
          },
          "to": {
            "$ref": "#/components/schemas/SdkChain",
            "description": "Destination chain (must be EVM)"
          },
          "webhook_url": {
            "description": "Webhook URL for status updates",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "to",
          "amount",
          "from_wallet",
          "recipient"
        ],
        "type": "object"
      },
      "SdkSolanaBuildResponse": {
        "description": "Response from build-tx endpoint",
        "properties": {
          "expires_at": {
            "description": "Transaction expiry timestamp (Unix seconds)",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "fee": {
            "$ref": "#/components/schemas/SdkFee",
            "description": "Fee breakdown"
          },
          "intent_id": {
            "description": "Unique intent ID for tracking",
            "type": "string"
          },
          "message": {
            "description": "Message to display to user",
            "type": "string"
          },
          "transaction": {
            "description": "Base64 encoded transaction (partially signed, awaiting user signature)",
            "type": "string"
          }
        },
        "required": [
          "intent_id",
          "transaction",
          "fee",
          "expires_at",
          "message"
        ],
        "type": "object"
      },
      "SdkSolanaGaslessValidateRequest": {
        "description": "Request to validate the Solana gasless path",
        "properties": {
          "amount": {
            "description": "Amount in USDC (human readable)",
            "type": "string"
          },
          "from_wallet": {
            "description": "Sender's Solana wallet address (base58)",
            "type": "string"
          },
          "recipient": {
            "description": "Recipient address on destination chain",
            "type": "string"
          },
          "simulate_sponsorship_failure": {
            "description": "Force sponsorship to be treated as unavailable and validate the paid fallback path",
            "type": "boolean"
          },
          "to": {
            "$ref": "#/components/schemas/SdkChain",
            "description": "Destination chain (must be EVM)"
          }
        },
        "required": [
          "to",
          "amount",
          "from_wallet",
          "recipient"
        ],
        "type": "object"
      },
      "SdkSolanaGaslessValidateResponse": {
        "description": "Response from gasless validation endpoint",
        "properties": {
          "detail": {
            "description": "Optional detail when the validator had to block",
            "nullable": true,
            "type": "string"
          },
          "fee_payer": {
            "description": "Fee payer selected for the validated path",
            "type": "string"
          },
          "paid_fallback_available": {
            "description": "Whether the user-paid fallback was validated successfully",
            "type": "boolean"
          },
          "reason": {
            "description": "Short machine-readable reason",
            "type": "string"
          },
          "result": {
            "$ref": "#/components/schemas/SdkGaslessValidationResult",
            "description": "Classified outcome"
          },
          "sponsorship_available": {
            "description": "Whether a non-user fee payer is configured and parseable",
            "type": "boolean"
          },
          "validation_surface": {
            "description": "Stable identifier for the validation surface",
            "type": "string"
          }
        },
        "required": [
          "validation_surface",
          "result",
          "sponsorship_available",
          "paid_fallback_available",
          "reason",
          "fee_payer"
        ],
        "type": "object"
      },
      "SdkSolanaSubmitRequest": {
        "description": "Request to submit a signed Solana transaction",
        "properties": {
          "intent_id": {
            "description": "Intent ID from build-tx response",
            "type": "string"
          },
          "signed_transaction": {
            "description": "Base64 encoded signed transaction",
            "type": "string"
          }
        },
        "required": [
          "intent_id",
          "signed_transaction"
        ],
        "type": "object"
      },
      "SdkSolanaSubmitResponse": {
        "description": "Response from submit endpoint",
        "properties": {
          "fee": {
            "$ref": "#/components/schemas/SdkFee",
            "description": "Fee breakdown"
          },
          "intent_id": {
            "description": "Intent ID",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SdkTransferStatus",
            "description": "Current status"
          },
          "tx_signature": {
            "description": "Solana transaction signature",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "intent_id",
          "status",
          "fee"
        ],
        "type": "object"
      },
      "SdkStatusResponse": {
        "description": "Response from status check",
        "properties": {
          "amount": {
            "description": "Amount transferred",
            "type": "string"
          },
          "completed_at": {
            "description": "Completed timestamp (ISO 8601)",
            "nullable": true,
            "type": "string"
          },
          "created_at": {
            "description": "Created timestamp (ISO 8601)",
            "type": "string"
          },
          "destination_chain": {
            "$ref": "#/components/schemas/SdkSettlementChain",
            "description": "Destination chain"
          },
          "destination_tx": {
            "description": "Destination transaction hash",
            "nullable": true,
            "type": "string"
          },
          "intent_id": {
            "description": "Intent ID",
            "type": "string"
          },
          "source_chain": {
            "$ref": "#/components/schemas/SdkSettlementChain",
            "description": "Source chain"
          },
          "source_tx": {
            "description": "Source transaction hash",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SdkTransferStatus",
            "description": "Current status"
          },
          "swap_tx": {
            "description": "Swap transaction hash (if token swap occurred)",
            "nullable": true,
            "type": "string"
          },
          "user_message": {
            "description": "User-friendly status message",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "intent_id",
          "status",
          "source_chain",
          "destination_chain",
          "amount",
          "created_at"
        ],
        "type": "object"
      },
      "SdkTransferRequest": {
        "description": "Request to execute a cross-chain transfer",
        "properties": {
          "amount": {
            "description": "Amount in USDC (human readable, e.g. \"100.00\")",
            "type": "string"
          },
          "from": {
            "$ref": "#/components/schemas/SdkChain",
            "description": "Source chain"
          },
          "idempotency_key": {
            "description": "Idempotency key to prevent duplicate transfers",
            "nullable": true,
            "type": "string"
          },
          "permit": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SdkPermit"
              }
            ],
            "description": "ERC-2612 permit for gasless EVM transfers",
            "nullable": true
          },
          "permit2_data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SdkPermit2"
              }
            ],
            "description": "Permit2 SignatureTransfer payload for V4 EVM transfers",
            "nullable": true
          },
          "recipient": {
            "description": "Recipient wallet address on destination chain",
            "type": "string"
          },
          "speed": {
            "$ref": "#/components/schemas/TransferSpeed",
            "description": "Transfer speed preference"
          },
          "to": {
            "$ref": "#/components/schemas/SdkChain",
            "description": "Destination chain"
          },
          "webhook_url": {
            "description": "Webhook URL for status updates",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "from",
          "to",
          "amount",
          "recipient"
        ],
        "type": "object"
      },
      "SdkTransferResponse": {
        "description": "Response from transfer endpoint",
        "properties": {
          "fee": {
            "$ref": "#/components/schemas/SdkFee",
            "description": "Fee breakdown"
          },
          "intent_id": {
            "description": "Unique intent ID for tracking",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/SdkTransferStatus",
            "description": "Current status"
          },
          "tx_hash": {
            "description": "Source chain transaction hash (if available)",
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "intent_id",
          "status",
          "fee"
        ],
        "type": "object"
      },
      "SdkTransferStatus": {
        "description": "Transfer status",
        "enum": [
          "pending",
          "processing",
          "complete",
          "failed"
        ],
        "type": "string"
      },
      "SessionEnvelope": {
        "properties": {
          "actor_id": {
            "nullable": true,
            "type": "string"
          },
          "actor_type": {
            "nullable": true,
            "type": "string"
          },
          "aud": {
            "type": "string"
          },
          "auth_method": {
            "nullable": true,
            "type": "string"
          },
          "authenticated": {
            "type": "boolean"
          },
          "chain_type": {
            "type": "string"
          },
          "exp": {
            "format": "int64",
            "type": "integer"
          },
          "iat": {
            "format": "int64",
            "type": "integer"
          },
          "iss": {
            "type": "string"
          },
          "jti": {
            "type": "string"
          },
          "policy_id": {
            "nullable": true,
            "type": "string"
          },
          "session_kind": {
            "nullable": true,
            "type": "string"
          },
          "sub": {
            "type": "string"
          },
          "subject_user_id": {
            "nullable": true,
            "type": "string"
          },
          "wallet_address": {
            "type": "string"
          }
        },
        "required": [
          "authenticated",
          "iss",
          "aud",
          "sub",
          "jti",
          "iat",
          "exp",
          "wallet_address",
          "chain_type"
        ],
        "type": "object"
      },
      "SessionResponse": {
        "properties": {
          "authenticated": {
            "type": "boolean"
          },
          "session": {
            "$ref": "#/components/schemas/SessionEnvelope"
          }
        },
        "required": [
          "authenticated",
          "session"
        ],
        "type": "object"
      },
      "SettleResponse": {
        "properties": {
          "error": {
            "nullable": true,
            "type": "string"
          },
          "intent_id": {
            "nullable": true,
            "type": "string"
          },
          "network": {
            "nullable": true,
            "type": "string"
          },
          "payer": {
            "nullable": true,
            "type": "string"
          },
          "success": {
            "type": "boolean"
          },
          "transaction": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "success"
        ],
        "type": "object"
      },
      "SettlementContract": {
        "description": "A settlement contract entry for a specific chain.",
        "properties": {
          "chainCode": {
            "type": "string"
          },
          "chainId": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "contractAddress": {
            "type": "string"
          }
        },
        "required": [
          "chainId",
          "chainCode",
          "contractAddress"
        ],
        "type": "object"
      },
      "SettlementInfo": {
        "description": "Settlement information returned by the discovery endpoint so external\nfillers can find sw4p's settlement contracts and supported chains.",
        "properties": {
          "erc7683Compliant": {
            "description": "ERC-7683 compliance flag",
            "type": "boolean"
          },
          "protocol": {
            "description": "Protocol name",
            "type": "string"
          },
          "settlementContracts": {
            "description": "Settlement contract addresses keyed by chain ID",
            "items": {
              "$ref": "#/components/schemas/SettlementContract"
            },
            "type": "array"
          },
          "supportedChainIds": {
            "description": "Supported chain IDs",
            "items": {
              "format": "int64",
              "minimum": 0,
              "type": "integer"
            },
            "type": "array"
          },
          "version": {
            "description": "Protocol version",
            "type": "string"
          }
        },
        "required": [
          "protocol",
          "version",
          "erc7683Compliant",
          "settlementContracts",
          "supportedChainIds"
        ],
        "type": "object"
      },
      "SubmitQuoteRequest": {
        "properties": {
          "collateralAmount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "estimatedTimeSeconds": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "fillDeadlineSeconds": {
            "format": "int64",
            "nullable": true,
            "type": "integer"
          },
          "fillerApiKey": {
            "type": "string"
          },
          "fillerId": {
            "type": "string"
          },
          "outputAmount": {
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "fillerId",
          "fillerApiKey",
          "outputAmount",
          "estimatedTimeSeconds",
          "collateralAmount"
        ],
        "type": "object"
      },
      "TransferSpeed": {
        "description": "Transfer speed options",
        "enum": [
          "fast",
          "standard"
        ],
        "type": "string"
      },
      "UpdateDcaRequest": {
        "properties": {
          "status": {
            "description": "New status: \"PAUSED\", \"ACTIVE\", or \"CANCELLED\"",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "UpdateLimitOrderRequest": {
        "properties": {
          "amountUsdc": {
            "description": "New USDC amount to spend.",
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "expiresAt": {
            "description": "New expiry time.",
            "nullable": true,
            "type": "string"
          },
          "sourceChain": {
            "description": "New source chain used to fund the order. Currently must be \"SOL\".",
            "nullable": true,
            "type": "string"
          },
          "targetPrice": {
            "description": "New target price in USDC per token.",
            "format": "double",
            "nullable": true,
            "type": "number"
          },
          "tokenOut": {
            "description": "New target token mint address on Solana.",
            "nullable": true,
            "type": "string"
          },
          "tokenOutSymbol": {
            "description": "New human-readable token symbol.",
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "VerifyResponse": {
        "properties": {
          "invalidReason": {
            "nullable": true,
            "type": "string"
          },
          "isValid": {
            "type": "boolean"
          },
          "payer": {
            "nullable": true,
            "type": "string"
          }
        },
        "required": [
          "isValid"
        ],
        "type": "object"
      },
      "X402Request": {
        "properties": {
          "paymentPayload": {
            "$ref": "#/components/schemas/PaymentPayload"
          },
          "paymentRequirements": {
            "$ref": "#/components/schemas/PaymentRequirements"
          }
        },
        "required": [
          "paymentPayload",
          "paymentRequirements"
        ],
        "type": "object"
      }
    }
  },
  "info": {
    "description": "Cross-chain transfer, authentication, and x402 facilitator API",
    "license": {
      "name": ""
    },
    "title": "sw4p API",
    "version": "2.0.0"
  },
  "openapi": "3.0.3",
  "paths": {
    "/sdk/v1/estimate": {
      "post": {
        "operationId": "sdk_estimate_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SdkEstimateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SdkEstimateResponse"
                }
              }
            },
            "description": "Fee estimate"
          },
          "400": {
            "description": "Invalid amount"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Estimate fees for a cross-chain transfer",
        "tags": [
          "SDK v1"
        ]
      }
    },
    "/sdk/v1/limits": {
      "get": {
        "operationId": "sdk_limits_handler",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SdkLimits"
                }
              }
            },
            "description": "Transfer limits"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "summary": "Get transfer amount limits",
        "tags": [
          "SDK v1"
        ]
      }
    },
    "/sdk/v1/pairs": {
      "get": {
        "operationId": "sdk_pairs_handler",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SdkRoutePair"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Supported route pairs"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "summary": "List supported transfer route pairs",
        "tags": [
          "SDK v1"
        ]
      }
    },
    "/sdk/v1/solana/build-tx": {
      "post": {
        "operationId": "sdk_solana_build_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SdkSolanaBuildRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SdkSolanaBuildResponse"
                }
              }
            },
            "description": "Transaction built"
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Build a Solana transaction for SOL-to-EVM transfer",
        "tags": [
          "SDK v1"
        ]
      }
    },
    "/sdk/v1/solana/gasless/validate": {
      "post": {
        "operationId": "sdk_solana_gasless_validate_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SdkSolanaGaslessValidateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SdkSolanaGaslessValidateResponse"
                }
              }
            },
            "description": "Validation result"
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Validate mandatory Solana gasless sponsorship",
        "tags": [
          "SDK v1"
        ]
      }
    },
    "/sdk/v1/solana/submit": {
      "post": {
        "operationId": "sdk_solana_submit_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SdkSolanaSubmitRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SdkSolanaSubmitResponse"
                }
              }
            },
            "description": "Transaction submitted"
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "404": {
            "description": "Intent not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Submit a signed Solana transaction",
        "tags": [
          "SDK v1"
        ]
      }
    },
    "/sdk/v1/status/{intent_id}": {
      "get": {
        "operationId": "sdk_status_handler",
        "parameters": [
          {
            "description": "Intent or transaction ID",
            "in": "path",
            "name": "intent_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SdkStatusResponse"
                }
              }
            },
            "description": "Transfer status"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "404": {
            "description": "Intent not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Get transfer status by intent ID",
        "tags": [
          "SDK v1"
        ]
      }
    },
    "/sdk/v1/transfer": {
      "post": {
        "operationId": "sdk_transfer_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SdkTransferRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SdkTransferResponse"
                }
              }
            },
            "description": "Transfer initiated"
          },
          "400": {
            "description": "Invalid request (bad amount, same chain, etc.)"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Execute a cross-chain USDC transfer",
        "tags": [
          "SDK v1"
        ]
      }
    },
    "/sdk/v2/abstract-transfer": {
      "post": {
        "description": "Chain-abstracted transfer. The system auto-selects the optimal source chain\nbased on the user's cross-chain balances and creates an intent via the\nexisting intent module.",
        "operationId": "abstract_transfer_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AbstractTransferRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AbstractTransferPlan"
                }
              }
            },
            "description": "Transfer plan created"
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Chain-abstracted transfer (auto-selects source chain)",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/auction/{intent_id}": {
      "get": {
        "description": "View auction state and current quotes.",
        "operationId": "get_auction_handler",
        "parameters": [
          {
            "description": "Intent ID",
            "in": "path",
            "name": "intent_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Auction"
                }
              }
            },
            "description": "Auction details"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "404": {
            "description": "Auction not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Solver auction not enabled"
          }
        },
        "summary": "Get auction state and quotes",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/auction/{intent_id}/confirm-fill": {
      "post": {
        "description": "Filler confirms they've completed the fill with tx proof.\nOnly the winning filler can confirm.",
        "operationId": "confirm_fill_handler",
        "parameters": [
          {
            "description": "Intent ID",
            "in": "path",
            "name": "intent_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmFillRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Fill confirmed"
          },
          "400": {
            "description": "Invalid fill confirmation"
          },
          "401": {
            "description": "Invalid filler credentials"
          },
          "404": {
            "description": "Auction not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Solver auction not enabled"
          }
        },
        "summary": "Confirm fill completion with transaction proof",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/auction/{intent_id}/quote": {
      "post": {
        "description": "Filler submits a competing quote for an open auction.\nQuote must beat the house quote on output_amount.",
        "operationId": "submit_quote_handler",
        "parameters": [
          {
            "description": "Intent ID to bid on",
            "in": "path",
            "name": "intent_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitQuoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Quote submitted"
          },
          "400": {
            "description": "Invalid quote or auction closed"
          },
          "401": {
            "description": "Invalid filler credentials"
          },
          "404": {
            "description": "Auction not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Solver auction not enabled"
          }
        },
        "summary": "Submit a competing quote for an auction",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/auctions/open": {
      "get": {
        "description": "List all open auctions (for fillers to discover intents to bid on).",
        "operationId": "list_open_auctions_handler",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Auction"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Open auctions"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Solver auction not enabled"
          }
        },
        "summary": "List all open auctions",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/dca/schedule": {
      "post": {
        "operationId": "sdk_create_dca_schedule_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDcaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DcaScheduleResponse"
                }
              }
            },
            "description": "DCA schedule created"
          },
          "400": {
            "description": "Invalid DCA request"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Create a DCA schedule",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/dca/schedule/{id}": {
      "patch": {
        "operationId": "sdk_update_dca_schedule_handler",
        "parameters": [
          {
            "description": "DCA schedule ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDcaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DcaScheduleResponse"
                }
              }
            },
            "description": "DCA schedule updated"
          },
          "400": {
            "description": "Invalid DCA update"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "404": {
            "description": "DCA schedule not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Update a DCA schedule",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/dca/schedule/{id}/history": {
      "get": {
        "operationId": "sdk_dca_execution_history_handler",
        "parameters": [
          {
            "description": "DCA schedule ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DcaExecutionsResponse"
                }
              }
            },
            "description": "DCA execution history"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "404": {
            "description": "DCA schedule not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "List DCA execution history",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/dca/schedules": {
      "get": {
        "operationId": "sdk_list_dca_schedules_handler",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DcaSchedulesResponse"
                }
              }
            },
            "description": "DCA schedules for the API key owner"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "List DCA schedules",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/filler/register": {
      "post": {
        "description": "Register as a filler. Returns filler_id and confirmation.",
        "operationId": "register_filler_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterFillerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Filler registered"
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "503": {
            "description": "Solver auction not enabled"
          }
        },
        "summary": "Register as a solver/filler",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/intent": {
      "post": {
        "description": "Submit a cross-chain intent. The house filler immediately generates a quote\nusing `multi_hop::plan_route` + `fees::calculate_buy_fee`, persists the\nintent to the DB, and returns the quote.",
        "operationId": "submit_intent_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrossChainIntent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentQuote"
                }
              }
            },
            "description": "Intent submitted with quote"
          },
          "400": {
            "description": "Invalid intent (expired deadline, zero amount, etc.)"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Submit a cross-chain intent",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/intent/{intent_id}": {
      "get": {
        "description": "Retrieve the current status of an intent.",
        "operationId": "get_intent_status_handler",
        "parameters": [
          {
            "description": "Intent ID",
            "in": "path",
            "name": "intent_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentStatus"
                }
              }
            },
            "description": "Intent status"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "404": {
            "description": "Intent not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Get intent status",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/intent/{intent_id}/cancel": {
      "post": {
        "description": "Cancel an intent if it has not yet started filling.",
        "operationId": "cancel_intent_handler",
        "parameters": [
          {
            "description": "Intent ID to cancel",
            "in": "path",
            "name": "intent_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Intent cancelled"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "404": {
            "description": "Intent not found"
          },
          "409": {
            "description": "Intent cannot be cancelled (already filling or terminal)"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Cancel an intent",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/order/erc7683": {
      "post": {
        "description": "Accept a standard ERC-7683 order from external sources (Across fillers,\nUniswapX). Resolves the order, converts to a sw4p intent, and processes\nit through the existing intent submission pipeline.",
        "operationId": "submit_erc7683_order_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrossChainOrder"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntentQuote"
                }
              }
            },
            "description": "Order accepted and intent created"
          },
          "400": {
            "description": "Invalid order or expired deadline"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Submit an ERC-7683 cross-chain order",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/order/resolve": {
      "post": {
        "description": "Takes a `CrossChainOrder` and returns the resolved version with explicit\ninputs, outputs, and fill instructions. External fillers call this to\nunderstand what a sw4p order requires before deciding to fill it.",
        "operationId": "resolve_order_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrossChainOrder"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolvedCrossChainOrder"
                }
              }
            },
            "description": "Resolved order"
          },
          "400": {
            "description": "Invalid order data"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "summary": "Resolve an ERC-7683 order into inputs/outputs/fill instructions",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/orders/limit": {
      "get": {
        "operationId": "sdk_list_limit_orders_handler",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LimitOrdersResponse"
                }
              }
            },
            "description": "Limit orders for the API key owner"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "List limit orders",
        "tags": [
          "SDK v2"
        ]
      },
      "post": {
        "operationId": "sdk_create_limit_order_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLimitOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LimitOrderResponse"
                }
              }
            },
            "description": "Limit order created"
          },
          "400": {
            "description": "Invalid order request"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Create a limit order",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/orders/limit/{id}": {
      "delete": {
        "operationId": "sdk_cancel_limit_order_handler",
        "parameters": [
          {
            "description": "Limit order ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelLimitOrderResponse"
                }
              }
            },
            "description": "Limit order cancelled"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "404": {
            "description": "Active order not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Cancel an active limit order",
        "tags": [
          "SDK v2"
        ]
      },
      "patch": {
        "operationId": "sdk_update_limit_order_handler",
        "parameters": [
          {
            "description": "Limit order ID",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLimitOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LimitOrderResponse"
                }
              }
            },
            "description": "Limit order updated"
          },
          "400": {
            "description": "Invalid order update"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "404": {
            "description": "Active order not found"
          },
          "429": {
            "description": "Rate limit exceeded"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Update an active limit order",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/sdk/v2/settlement/info": {
      "get": {
        "description": "Returns sw4p's settlement contract addresses and supported chain IDs.\nExternal fillers use this discovery endpoint to learn how to interact\nwith sw4p's settlement layer.",
        "operationId": "get_settlement_info_handler",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettlementInfo"
                }
              }
            },
            "description": "Settlement info"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        },
        "summary": "Get settlement contract info and supported chains",
        "tags": [
          "SDK v2"
        ]
      }
    },
    "/v1/auth/login": {
      "post": {
        "operationId": "login_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            },
            "description": "Wallet session created"
          },
          "400": {
            "description": "Invalid request or wallet signature"
          },
          "401": {
            "description": "Invalid or expired nonce"
          },
          "429": {
            "description": "Too many login attempts"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Exchange a signed wallet nonce for a session JWT",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/v1/auth/nonce": {
      "post": {
        "description": "Rate limited to 3 nonces per minute per wallet.",
        "operationId": "issue_nonce_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NonceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NonceResponse"
                }
              }
            },
            "description": "Nonce issued"
          },
          "400": {
            "description": "Invalid wallet address or chain type"
          },
          "429": {
            "description": "Too many nonce requests"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "summary": "Issue a wallet-login nonce",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/v1/auth/session": {
      "get": {
        "operationId": "session_handler",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            },
            "description": "Authenticated session"
          },
          "401": {
            "description": "Missing, invalid, or expired wallet JWT"
          }
        },
        "summary": "Return the current wallet session",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/x402/settle": {
      "post": {
        "operationId": "settle_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/X402Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SettleResponse"
                }
              }
            },
            "description": "Settlement result"
          },
          "400": {
            "description": "Invalid payment payload"
          },
          "409": {
            "description": "Replay or duplicate settlement rejected"
          },
          "503": {
            "description": "x402 pilot disabled for this deployment"
          }
        },
        "summary": "Settle an accepted x402 payment payload",
        "tags": [
          "x402"
        ]
      }
    },
    "/x402/verify": {
      "post": {
        "operationId": "verify_handler",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/X402Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyResponse"
                }
              }
            },
            "description": "Verification result"
          },
          "503": {
            "description": "x402 pilot disabled for this deployment"
          }
        },
        "summary": "Verify a signed x402 payment payload",
        "tags": [
          "x402"
        ]
      }
    }
  },
  "tags": [
    {
      "description": "Wallet session authentication",
      "name": "Authentication"
    },
    {
      "description": "Direct cross-chain USDC transfers",
      "name": "SDK v1"
    },
    {
      "description": "Intent-based transfers with auction and ERC-7683 support",
      "name": "SDK v2"
    },
    {
      "description": "x402 payment verification and settlement",
      "name": "x402"
    }
  ]
}
