import type { OpenApiService } from '@rabby-wallet/rabby-api'; import type { BridgeAggregatorId } from './consts.js'; export interface BridgeQuoteListParams { userAddress: string; fromChainId: string; fromTokenId: string; fromTokenRawAmount: string; toChainId: string; toTokenId: string; slippage?: string; feeRate?: number; } export interface BridgeBuildTxParams extends BridgeQuoteListParams { bridgeId: string; quoteKey?: string | Record; } export type BridgeApi = Pick; export type BridgeQuote = Awaited>; export type BridgeTx = Awaited> | NonNullable; export type BridgeQuoteListItem = Awaited>[number]; export declare class InvalidBridgeContractError extends Error { readonly kind: 'spender' | 'router'; readonly aggregatorId: BridgeAggregatorId; readonly chainId: string; readonly expected: string; readonly received: string; readonly bridgeId?: string | undefined; constructor(kind: 'spender' | 'router', aggregatorId: BridgeAggregatorId, chainId: string, expected: string, received: string, bridgeId?: string | undefined); } export declare const validateBridgeQuote: (aggregatorId: BridgeAggregatorId, fromChainId: string, quote: BridgeQuoteListItem) => boolean; export declare const validateBridgeTx: (aggregatorId: BridgeAggregatorId, fromChainId: string, bridgeId: string, tx: BridgeTx) => boolean; export declare const getQuote: (aggregatorId: string, params: BridgeQuoteListParams, api: BridgeApi) => Promise; export declare const buildTx: (aggregatorId: string, params: BridgeBuildTxParams, api: BridgeApi) => Promise; export declare const getQuoteListWithTx: (aggregatorId: string, params: BridgeQuoteListParams, api: BridgeApi) => Promise>; export declare const getQuoteList: (aggregatorId: string, params: BridgeQuoteListParams, api: BridgeApi) => Promise; export declare const buildBridgeQuoteTx: (aggregatorId: string, params: BridgeBuildTxParams, api: BridgeApi) => Promise;