import { BestRouteResponse, BirdeyePriceData, BlockhashWithExpiry, ExecuteRouteParams, GetJupiterPriceParams, GetJupiterPriceResponse, QuoteParams, RouteOrQuoteParams, RouteOutput, RouteParams, RouterContext, RoutesResponse, SwapType } from './swap_api_utils'; import { SwapSimulationResult } from './utils'; import { RouterType } from './consts'; import BN from 'bn.js'; import { QuoteGetRequest, QuoteResponse, SwapInstructionsResponse, SwapRequest, SwapResponse } from '@jup-ag/api'; import { Logger, LogLevel } from './utils/Logger'; import { type BeforeRequestCallback, type OnRequestErrorCallback, ResponseLogConfig } from './utils/axiosUtils'; import { Address, Instruction, Rpc, RpcSubscriptions, Signature, SolanaRpcApi, SolanaRpcSubscriptionsApi, TransactionSigner } from '@solana/kit'; export type LoggerConfig = { logger?: Logger; requestLogLevel?: LogLevel; responseLogConfig?: ResponseLogConfig; beforeRequest?: BeforeRequestCallback; onRequestError?: OnRequestErrorCallback; }; export type RoutesStreamHandle = { close: () => void; }; export declare class KswapSdk { readonly apiBaseUrl: string; readonly connection: Rpc; readonly subscription: RpcSubscriptions; private readonly _apiClient; private readonly _defaultHeaders; private readonly limoClient; private routers; private readonly logger; readonly allRouterTypes: RouterType[]; constructor(apiBaseUrl: string, connection: Rpc, subscription: RpcSubscriptions, apiKey?: string, { logger, requestLogLevel, responseLogConfig, beforeRequest, onRequestError, }?: LoggerConfig); streamRoutes(params: RouteParams, onRoute: (route: RouteOutput) => void, onError?: (error: Error) => void, options?: { keepAlive?: boolean; }): RoutesStreamHandle; refreshRoutes(params: Pick, routes: RouteOutput[]): Promise; prepareRoutesList(routes: RouteOutput[], swapType: SwapType): RouteOutput[]; private static isValidRouteOutput; private static shouldExcludeJupiterZRoute; getAllRoutesOrQuotes(params: RouteOrQuoteParams, ctx: RouterContext): Promise; getAllRoutes(params: RouteParams, ctx: RouterContext): Promise; getAllQuotes(params: QuoteParams): Promise; getBestRoute(params: RouteParams): Promise; getBatchTokenPrices(tokenMints: Address[]): Promise>; getAllAggregatorsFromApi(): Promise>; getLedgerIxs(userWallet: TransactionSigner, inTokenAccount: Address, outTokenAccount: Address, maxInputAmountChange: BN, minOutputAmountChange: BN): Promise<{ preIx: Instruction; postIx: Instruction; }>; getJupiterPriceWithFallback(getJupiterPriceParams: GetJupiterPriceParams): Promise; getJupiterQuoteWithFallback(getJupiterQuoteParams: QuoteGetRequest): Promise; getJupiterSwapInstructionsPostWithFallback(swapPostParams: SwapRequest): Promise; getJupiterSwapPostWithFallback(swapPostParams: SwapRequest): Promise; private getExecutePerRoute; private getExecuteKrfqRoute; simulateRouteAndGetNewSimulatedValuesRouteOutput(params: { routeOutput: RouteOutput; executor: Address; tokenIn: Address; tokenOut: Address; swapType: SwapType; bh: BlockhashWithExpiry; }): Promise<{ routeOutput: RouteOutput; simulationResult: SwapSimulationResult; }>; executeRoute(params: ExecuteRouteParams): Promise; private getClientSideRouteOutputSimulationAndPriceImpact; private addOrReplaceLimoLogsInstructionWithNextBest; private executePerRoute; private executeJupiterZRoute; private executeKrfqRoute; private getClientSideRouteOutputPromises; private getClientSideQuoteRouteOutputPromises; private processClientSideRouteOutput; private processClientSideQuoteRouteOutput; private filterRouterTypes; private addHttpLogInterceptors; } //# sourceMappingURL=KswapSdk.d.ts.map