/**
 * This file was auto-generated by openapi-typescript.
 * Do not make direct changes to the file.
 */

export interface paths {
    "/v1/health": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /**
         * GET /v1/health - Health check endpoint.
         * @description Returns the current health status of the service.
         */
        get: operations["health"];
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/v1/info": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        /** GET /v1/info - Return static metadata about this Fynd instance. */
        get: operations["info"];
        put?: never;
        post?: never;
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
    "/v1/quote": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        get?: never;
        put?: never;
        /**
         * POST /v1/quote - Request a quote.
         * @description Accepts a `QuoteRequest` and returns a `Quote` with the best routes found, or an error
         *     if the request could not be filled.
         *
         *     # Errors
         *
         *     - 400 Bad Request: Invalid request format
         *     - 422 Unprocessable Entity: No routes found
         *     - 503 Service Unavailable: Queue full or service overloaded
         *     - 503 Service Unavailable: Queue full, service overloaded, or quote timeout
         */
        post: operations["quote"];
        delete?: never;
        options?: never;
        head?: never;
        patch?: never;
        trace?: never;
    };
}
export type webhooks = Record<string, never>;
export interface components {
    schemas: {
        /**
         * @description Block information at which a quote was computed.
         *
         *     Quotes are only valid for the block at which they were computed. Market
         *     conditions may change in subsequent blocks.
         */
        BlockInfo: {
            /**
             * @description Block hash as a hex string.
             * @example 0xabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcd
             */
            hash: string;
            /**
             * Format: int64
             * @description Block number.
             * @example 21000000
             */
            number: number;
            /**
             * Format: int64
             * @description Block timestamp in Unix seconds.
             * @example 1730000000
             */
            timestamp: number;
        };
        /**
         * @description Client fee configuration for the Tycho Router.
         *
         *     When provided, the router charges a client fee on the swap output. The `signature`
         *     must be an EIP-712 signature by the `receiver` over the `ClientFee` typed data.
         */
        ClientFeeParams: {
            /**
             * Format: int32
             * @description Fee in basis points (0–10,000). 100 = 1%.
             * @example 100
             */
            bps: number;
            /**
             * Format: int64
             * @description Unix timestamp after which the signature is invalid.
             * @example 1893456000
             */
            deadline: number;
            /**
             * @description Maximum subsidy from the client's vault balance.
             * @example 0
             */
            max_contribution: string;
            /**
             * @description Address that receives the fee (also the required EIP-712 signer).
             * @example 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
             */
            receiver: string;
            /**
             * @description 65-byte EIP-712 ECDSA signature by `receiver` (hex-encoded).
             * @example 0xabcd...
             */
            signature: string;
        };
        /** @description Options to customize the encoding behavior. */
        EncodingOptions: {
            client_fee_params?: null | components["schemas"]["ClientFeeParams"];
            permit?: null | components["schemas"]["PermitSingle"];
            /**
             * @description Permit2 signature (65 bytes, hex-encoded). Required when `permit` is set.
             * @example 0xabcd...
             */
            permit2_signature?: string | null;
            /**
             * Format: double
             * @example 0.001
             */
            slippage: number;
            /** @description Token transfer method. Defaults to `transfer_from`. */
            transfer_type?: components["schemas"]["UserTransferType"];
        };
        /** @description Error response body. */
        ErrorResponse: {
            /** @example BAD_REQUEST */
            code: string;
            details?: unknown;
            /** @example bad request: no orders provided */
            error: string;
        };
        /**
         * @description Breakdown of fees applied to the swap output by the on-chain FeeCalculator.
         *
         *     All amounts are absolute values in output token units.
         */
        FeeBreakdown: {
            /**
             * @description Client's portion of the fee (after the router takes its share).
             * @example 2800000
             */
            client_fee: string;
            /**
             * @description Maximum slippage: (amount_out - router_fee - client_fee) * slippage.
             * @example 3496850
             */
            max_slippage: string;
            /**
             * @description Minimum amount the user receives on-chain.
             *     Equal to amount_out - router_fee - client_fee - max_slippage.
             * @example 3493353150
             */
            min_amount_received: string;
            /**
             * @description Router protocol fee (fee on output + router's share of client fee).
             * @example 350000
             */
            router_fee: string;
        };
        /** @description Health check response. */
        HealthStatus: {
            /**
             * @description Whether derived data has been computed at least once.
             *
             *     This indicates overall readiness, not per-block freshness. Some algorithms
             *     require fresh derived data for each block — they are ready to receive orders
             *     but will wait for recomputation before solving.
             * @example true
             */
            derived_data_ready?: boolean;
            /**
             * Format: int64
             * @description Time since last gas price update in milliseconds, if available.
             * @example 12000
             */
            gas_price_age_ms?: number | null;
            /**
             * @description Whether the service is healthy.
             * @example true
             */
            healthy: boolean;
            /**
             * Format: int64
             * @description Time since last market update in milliseconds.
             * @example 1250
             */
            last_update_ms: number;
            /**
             * @description Number of active solver pools.
             * @example 2
             */
            num_solver_pools: number;
        };
        /** @description Static metadata about this Fynd instance, returned by `GET /v1/info`. */
        InstanceInfo: {
            /**
             * Format: int64
             * @description EIP-155 chain ID (e.g. 1 for Ethereum mainnet).
             * @example 1
             */
            chain_id: number;
            /**
             * @description Address of the canonical Permit2 contract (same on all EVM chains).
             * @example 0x000000000022D473030F116dDEE9F6B43aC78BA3
             */
            permit2_address: string;
            /**
             * @description Address of the Tycho Router contract on this chain.
             * @example 0xfD0b31d2E955fA55e3fa641Fe90e08b677188d35
             */
            router_address: string;
        };
        /**
         * @description A single swap order to be solved.
         *
         *     An order specifies an intent to swap one token for another.
         */
        Order: {
            /**
             * @description Amount to swap, interpreted according to `side` (in token units, as decimal string).
             * @example 1000000000000000000
             */
            amount: string;
            /**
             * @description Address that will receive the output tokens.
             *
             *     Defaults to `sender` if not specified.
             * @example 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
             */
            receiver?: string | null;
            /**
             * @description Address that will send the input tokens.
             * @example 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
             */
            sender: string;
            /** @description Whether this is a sell (exact input) or buy (exact output) order. */
            side: components["schemas"]["OrderSide"];
            /**
             * @description Input token address (the token being sold).
             * @example 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
             */
            token_in: string;
            /**
             * @description Output token address (the token being bought).
             * @example 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
             */
            token_out: string;
        };
        /**
         * @description Quote for a single [`Order`].
         *
         *     Contains the route to execute (if found), along with expected amounts,
         *     gas estimates, and status information.
         */
        OrderQuote: {
            /**
             * @description Amount of input token (in token units, as decimal string).
             * @example 1000000000000000000
             */
            amount_in: string;
            /**
             * @description Amount of output token (in token units, as decimal string).
             * @example 3500000000
             */
            amount_out: string;
            /**
             * @description Amount out minus gas cost in output token terms.
             *     Used by WorkerPoolRouter to compare solutions from different solvers.
             * @example 3498000000
             */
            amount_out_net_gas: string;
            /** @description Block at which this quote was computed. */
            block: components["schemas"]["BlockInfo"];
            fee_breakdown?: null | components["schemas"]["FeeBreakdown"];
            /**
             * @description Estimated gas cost for executing this route (as decimal string).
             * @example 150000
             */
            gas_estimate: string;
            /**
             * @description Effective gas price (in wei) at the time the route was computed.
             * @example 20000000000
             */
            gas_price?: string | null;
            /**
             * @description ID of the order this solution corresponds to.
             * @example f47ac10b-58cc-4372-a567-0e02b2c3d479
             */
            order_id: string;
            /**
             * Format: int32
             * @description Price impact in basis points (1 bip = 0.01%).
             */
            price_impact_bps?: number | null;
            route?: null | components["schemas"]["Route"];
            /** @description Status indicating whether a route was found. */
            status: components["schemas"]["QuoteStatus"];
            transaction?: null | components["schemas"]["Transaction"];
        };
        /**
         * @description Specifies the side of an order: sell (exact input) or buy (exact output).
         *
         *     Currently only `Sell` is supported. `Buy` will be added in a future version.
         * @enum {string}
         */
        OrderSide: "sell";
        /** @description Details for a permit2 single-token permit. */
        PermitDetails: {
            /**
             * @description Amount of tokens approved.
             * @example 1000000000000000000
             */
            amount: string;
            /**
             * @description Expiration timestamp for the permit.
             * @example 1893456000
             */
            expiration: string;
            /**
             * @description Nonce to prevent replay attacks.
             * @example 0
             */
            nonce: string;
            /**
             * @description Token address for which the permit is granted.
             * @example 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
             */
            token: string;
        };
        /** @description A single permit for permit2 token transfer authorization. */
        PermitSingle: {
            /** @description The permit details (token, amount, expiration, nonce). */
            details: components["schemas"]["PermitDetails"];
            /**
             * @description Deadline timestamp for the permit signature.
             * @example 1893456000
             */
            sig_deadline: string;
            /**
             * @description Address authorized to spend the tokens (typically the router).
             * @example 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
             */
            spender: string;
        };
        /**
         * @description Per-request overrides for price guard validation.
         *
         *     All fields are optional. When `None`, the server's configured defaults are used.
         */
        PriceGuardConfig: {
            /** @description Whether to let solutions pass when no provider can return a price. */
            allow_on_provider_error?: boolean | null;
            /** @description Whether to let solutions pass when no provider returns price for token pair. */
            allow_on_token_price_not_found?: boolean | null;
            /** @description Whether price guard validation is enabled. */
            enabled?: boolean | null;
            /**
             * Format: int32
             * @description Maximum allowed deviation when `amount_out < expected`, in basis points.
             * @example 300
             */
            lower_tolerance_bps?: number | null;
            /**
             * Format: int32
             * @description Maximum allowed deviation when `amount_out >= expected`, in basis points.
             * @example 10000
             */
            upper_tolerance_bps?: number | null;
        };
        /**
         * @description Complete solution for a [`QuoteRequest`].
         *
         *     Contains a solution for each order in the request, along with aggregate
         *     gas estimates and timing information.
         */
        Quote: {
            /** @description Quotes for each order, in the same order as the request. */
            orders: components["schemas"]["OrderQuote"][];
            /**
             * Format: int64
             * @description Time taken to compute this solution, in milliseconds.
             * @example 12
             */
            solve_time_ms: number;
            /**
             * @description Total estimated gas for executing all swaps (as decimal string).
             * @example 150000
             */
            total_gas_estimate: string;
        };
        /** @description Options to customize the solving behavior. */
        QuoteOptions: {
            encoding_options?: null | components["schemas"]["EncodingOptions"];
            /**
             * @description Maximum gas cost allowed for a solution. Quotes exceeding this are filtered out.
             * @example 500000
             */
            max_gas?: string | null;
            /**
             * @description Minimum number of solver responses to wait for before returning.
             *     If `None` or `0`, waits for all solvers to respond (or timeout).
             *
             *     Use the `/health` endpoint to check `num_solver_pools` before setting this value.
             *     Values exceeding the number of active solver pools are clamped internally.
             */
            min_responses?: number | null;
            price_guard?: null | components["schemas"]["PriceGuardConfig"];
            /**
             * Format: int64
             * @description Timeout in milliseconds. If `None`, uses server default.
             * @example 2000
             */
            timeout_ms?: number | null;
        };
        /** @description Request to solve one or more swap orders. */
        QuoteRequest: {
            /** @description Optional solving parameters that apply to all orders. */
            options?: components["schemas"]["QuoteOptions"];
            /** @description Orders to solve. */
            orders: components["schemas"]["Order"][];
        };
        /**
         * @description Status of an order quote.
         * @enum {string}
         */
        QuoteStatus: "success" | "no_route_found" | "insufficient_liquidity" | "timeout" | "not_ready" | "price_check_failed";
        /**
         * @description A route consisting of one or more sequential swaps.
         *
         *     A route describes the path through liquidity pools to execute a swap.
         *     For multi-hop swaps, the output of each swap becomes the input of the next.
         */
        Route: {
            /** @description Ordered sequence of swaps to execute. */
            swaps: components["schemas"]["Swap"][];
        };
        /**
         * @description A single swap within a route.
         *
         *     Represents an atomic swap on a specific liquidity pool (component).
         */
        Swap: {
            /**
             * @description Amount of input token (in token units, as decimal string).
             * @example 1000000000000000000
             */
            amount_in: string;
            /**
             * @description Amount of output token (in token units, as decimal string).
             * @example 3500000000
             */
            amount_out: string;
            /**
             * @description Identifier of the liquidity pool component.
             * @example 0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc
             */
            component_id: string;
            /**
             * @description Estimated gas cost for this swap (as decimal string).
             * @example 150000
             */
            gas_estimate: string;
            /**
             * @description Protocol system identifier (e.g., "uniswap_v2", "uniswap_v3", "vm:balancer").
             * @example uniswap_v2
             */
            protocol: string;
            /**
             * Format: double
             * @description Decimal of the amount to be swapped in this operation (for example, 0.5 means 50%)
             * @example 0.0
             */
            split: number;
            /**
             * @description Input token address.
             * @example 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
             */
            token_in: string;
            /**
             * @description Output token address.
             * @example 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
             */
            token_out: string;
        };
        /** @description An encoded EVM transaction ready to be submitted on-chain. */
        Transaction: {
            /**
             * @description ABI-encoded calldata as hex string.
             * @example 0x1234567890abcdef
             */
            data: string;
            /**
             * @description Contract address to call.
             * @example 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
             */
            to: string;
            /**
             * @description Native token value to send with the transaction (as decimal string).
             * @example 0
             */
            value: string;
        };
        /**
         * @description Token transfer method for moving funds into Tycho execution.
         * @enum {string}
         */
        UserTransferType: "transfer_from_permit2" | "transfer_from" | "use_vaults_funds";
    };
    responses: never;
    parameters: never;
    requestBodies: never;
    headers: never;
    pathItems: never;
}
export type $defs = Record<string, never>;
export interface operations {
    health: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Service healthy */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["HealthStatus"];
                };
            };
            /** @description Data stale */
            503: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["HealthStatus"];
                };
            };
        };
    };
    info: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Instance info */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["InstanceInfo"];
                };
            };
        };
    };
    quote: {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": components["schemas"]["QuoteRequest"];
            };
        };
        responses: {
            /** @description Quote completed */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["Quote"];
                };
            };
            /** @description Invalid request */
            400: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["ErrorResponse"];
                };
            };
            /** @description No route found */
            422: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["ErrorResponse"];
                };
            };
            /** @description Queue full, overloaded, stale data, or timeout */
            503: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": components["schemas"]["ErrorResponse"];
                };
            };
        };
    };
}
