import { Environment, SameChainSwapParams, SameChainInstructionParams } from './api'; import { BridgeId, ConnectionProviders, NetworkId, TransactionSigners } from '../utils/types'; import { ExecuteSameChainInstructionParams } from './api/sameChain/types'; import { CrossChainSwapParams, ExecuteCrossChainClaimParams, ExecuteCrossChainSwapParams, ExecuteCrossChainTransferParams, GetCrossChainClaimParams, RedeemParams } from './api/crossChain/types'; import { Provider } from 'ethers'; import { JsonRpcProvider } from '@mysten/sui.js'; import { Aptos } from '@aptos-labs/ts-sdk'; export declare class SwapAggregator { environment: Environment; providers?: ConnectionProviders; signer?: TransactionSigners; /** * * @param environment API endpoint environment * @param options swap options */ constructor(environment: Environment, options?: { providers?: ConnectionProviders; signers?: TransactionSigners; }); /** * Get swap quote for same chain swaps * @param params * @returns */ swapQuotes: (params: SameChainSwapParams) => Promise<{ data: import("./api/sameChain/types").CommonRouteInterface[]; message: string; }>; /** * Get swap instructions to execute same chain swap * @param params The parameters for the same chain swap instruction * @returns The swap instructions for executing the same chain swap */ swapInstruction: (params: SameChainInstructionParams) => Promise<{ data: any; message: string; }>; /** * Executes a swap instruction based on the provided parameters. * * @param params - The parameters for executing the swap instruction. * @returns A promise that resolves to the result of executing the swap instruction. * @throws An error if the network ID is invalid or if the required connection provider or signer is not provided. */ executeSwapInstruction: (params: ExecuteSameChainInstructionParams) => Promise; /** * Retrieves a cross-chain quote for a given set of parameters. * * @param params - The parameters for the cross-chain swap. * @returns A promise that resolves to the cross-chain quote. */ crossChainQuote: (params: CrossChainSwapParams) => Promise<{ data: import("./api/crossChain/types").CrossChainQuote[]; message: string; }>; /** * Retrieves the cross-chain swap instruction for executing a cross-chain swap. * * @param params - The parameters for executing the cross-chain swap. * @returns A promise that resolves to the cross-chain swap instruction. */ getCrossChainSwapInstruction: (params: ExecuteCrossChainSwapParams) => Promise<{ data: any; message: string; }>; /** * Executes a cross-chain transfer based on the provided parameters. * * @param params - The parameters for the cross-chain transfer. * @returns A promise that resolves to the result of the cross-chain transfer. * @throws An error if the transfer hash is not found or if an invalid bridge is specified. */ executeTransfer: (params: ExecuteCrossChainTransferParams) => Promise<{ success: boolean; txHash: string; }>; /** * Executes a cross-chain claim based on the provided parameters. * * @param params - The parameters for executing the cross-chain claim. * @returns A promise that resolves to the result of the cross-chain claim execution. */ executeClaim: (params: ExecuteCrossChainClaimParams) => Promise; private getAttestation; /** * Retrieves the claim instruction for a cross-chain claim . * * @param params - The parameters for the claim instruction. * @returns serialised instruction to claim */ getClaimIx: (params: GetCrossChainClaimParams) => Promise<{ data: any; message: string; }>; getRedeemFeeEVM: (targetChain: NetworkId, targetProvider: Provider | Aptos | JsonRpcProvider, bridge: BridgeId) => Promise; /** * Redeems a failed cross-chain transfer * * @param params - The parameters for the redemption. * @returns The hash of the redemption transaction. * @throws Error if the redemption fails or if the bridge is unsupported. */ redeem: (params: RedeemParams) => Promise; private getProvider; }