UNPKG

@catalabs/catalyst-sdk

Version:
115 lines 5.79 kB
import type { PermitBatchData, PermitData } from '../evm/permit2/interfaces'; import type { RouteDescription, SwapByRouteParams } from './types/route.types'; import { VaultInformation } from '../math/types/math.types'; import { RouterArguments } from './router.utils'; import { RouterCallArguments } from './types/route.types'; export declare function depositWithGas(vault: string, tokens: string[], minOut: bigint, transferFroms?: [string[], bigint[]]): RouterCallArguments; export declare function depositWithGasViaPermit(vault: string, tokens: string[], minOut: bigint, transferFroms: [string[], bigint[]] | undefined, owner: string, permitBatchData?: PermitBatchData): RouterCallArguments; export declare function withdrawWithGas(vault: string, vaultTokenAmount: bigint, tokens: string[], minOuts: bigint[], gasToken?: string): RouterCallArguments; export declare function withdrawWithGasViaPermit(vault: string, vaultTokenAmount: bigint, tokens: string[], minOuts: bigint[], gasToken?: string, permitData?: PermitData): RouterCallArguments; export declare function swapByRoute(args: RouteDescription): { executionInstructions: { commands: string; inputs: string[]; gas: { estimatedGasUsedOnLocal: bigint; estimatedGasUsedOnRemote: bigint; estimatedGasUsedOnLocalAck: bigint; estimatedRoutingPayment: bigint; estimatedRefundOnAck: bigint; }; }; }; export declare function swapByRouteViaPermit(args: SwapByRouteParams): { executionInstructions: { commands: string; inputs: string[]; gas: { estimatedGasUsedOnLocal: bigint; estimatedGasUsedOnRemote: bigint; estimatedGasUsedOnLocalAck: bigint; estimatedRoutingPayment: bigint; estimatedRefundOnAck: bigint; }; }; }; export declare function depositWithLiquiditySwaps(userDeposits: bigint[][], chains: { channelId: string; chainId: string; }[], vaults: VaultInformation[], vaultAddresses: string[], assetsAddresses: string[][], userAddresses: string[], messageVerifyGasCosts: bigint[][], priceOfDeliveryGas: bigint[][], priceOfAckGas: bigint[], refundGasTo: string, slippage?: bigint): { executionInstructions: { commands: string; inputs: string[]; gas: { estimatedGasUsedOnLocal: bigint; estimatedRefundOnAck: bigint; estimatedGasUsedOnRemote: bigint; estimatedGasUsedOnLocalAck: bigint; estimatedRoutingPayment: bigint; }; }; }[]; export declare function prepareDepositWithLiquiditySwaps(userDeposits: bigint[][], chains: { channelId: string; chainId: string; }[], vaults: VaultInformation[], vaultAddresses: string[], assetsAddresses: string[][], userAddresses: string[], messageVerifyGasCosts: bigint[][], priceOfDeliveryGas: bigint[][], priceOfAckGas: bigint[], refundGasTo: string, slippage?: bigint, wrapGasValues?: bigint[]): { routerArgs: RouterArguments; gasUsage: { estimatedGasUsedOnRemote: bigint; estimatedGasUsedOnLocalAck: bigint; estimatedRoutingPayment: bigint; }; transferDetails: { token: string; amount: bigint; }[]; }[]; export declare function withdrawWithLiquiditySwap(userVaultTokens: bigint[], userWithdrawals: bigint[][], chains: { channelId: string; chainId: string; }[], vaults: VaultInformation[], vaultAddresses: string[], assetsAddresses: string[][], userAddresses: string[], messageVerifyGasCosts: bigint[][], priceOfDeliveryGas: bigint[][], priceOfAckGas: bigint[], refundGasTo: string, routerAddresses: string[] | string, unwrapGas?: boolean[], withdrawRatios?: bigint[][] | undefined): ({ executionInstructions: { commands: string; inputs: string[]; gas: { estimatedGasUsedOnLocal: bigint; estimatedRefundOnAck: bigint; estimatedGasUsedOnRemote: bigint; estimatedGasUsedOnLocalAck: bigint; estimatedRoutingPayment: bigint; }; }; } | { executionInstructions: undefined; })[]; export declare function prepareWithdrawWithLiquiditySwap(userVaultTokens: bigint[], userWithdrawals: bigint[][], chains: { channelId: string; chainId: string; }[], vaults: VaultInformation[], vaultAddresses: string[], assetsAddresses: string[][], userAddresses: string[], messageVerifyGasCosts: bigint[][], priceOfDeliveryGas: bigint[][], priceOfAckGas: bigint[], refundGasTo: string, routerAddresses: string[] | string, unwrapGas?: boolean[], withdrawRatios?: bigint[][] | undefined): { routerArgs: RouterArguments | undefined; gasUsage: { estimatedGasUsedOnRemote: bigint; estimatedGasUsedOnLocalAck: bigint; estimatedRoutingPayment: bigint; }; transferDetails: { token: string; amount: bigint; }; }[]; export declare function prepareWithdrawSamePercentageWithLiquiditySwap(userVaultTokens: bigint[], percentage: bigint, targetVaultIndex: number, targetAssetIndex: number, chains: { channelId: string; chainId: string; }[], vaults: VaultInformation[], vaultAddresses: string[], assetsAddresses: string[][], userAddresses: string[], messageVerifyGasCosts: bigint[][], priceOfDeliveryGas: bigint[][], priceOfAckGas: bigint[], refundGasTo: string, routerAddresses: string[] | string, unwrapGas?: boolean[], withdrawRatios?: bigint[][] | undefined): { routerArgs: RouterArguments | undefined; gasUsage: { estimatedGasUsedOnRemote: bigint; estimatedGasUsedOnLocalAck: bigint; estimatedRoutingPayment: bigint; }; transferDetails: { token: string; amount: bigint; }; }[]; //# sourceMappingURL=router.macro.d.ts.map