UNPKG

@accret/bridge-sdk

Version:
30 lines 2.11 kB
import type { ExecuteCrossChainSwapParams, CrossChainSwapResult, ExecuteSingleChainSwapParams } from "../../types/deBridge/buildTransaction"; /** * @description Executes a cross-chain token swap using deBridge. * @param params - Swap parameters including tokens, amounts, and chain details * @param params.privateKey - Private key of the wallet initiating the swap * @param params.srcNetwork - Source network chain ID * @param params.srcTokenAddress - Address of the token being swapped on the source chain * @param params.srcTokenDecimals - Decimals of the source token * @param params.amountToSwap - Amount of the source token to swap * @param params.dstNetwork - Destination network chain ID * @param params.dstTokenAddress - Address of the token being received on the destination chain * @param params.dstTokenOutAmount - Amount of the token being received on the destination chain * @param params.recipientAddress - Address to receive the output token (optional, defaults to sender address) * @param params.srcChainOrderAuthorityAddress - Authority address for the source chain order * @param params.dstChainOrderAuthorityAddress - Authority address for the destination chain order * @param params.referralCode - Referral code for the swap (optional) * @param params.enableLogging - Whether to enable logging (default is false) * @returns Promise<CrossChainSwapResult> - Result of the swap operation */ export declare function executeCrossChainSwap(params: ExecuteCrossChainSwapParams): Promise<CrossChainSwapResult>; /** * @description Executes a single-chain swap using deBridge API. * @param params - Parameters for executing a single-chain swap * @param params.privateKey - Private key of the wallet initiating the swap * @param params.srcChainRpcUrl - RPC URL of the source chain * @param params.network - Chain ID of the source network * @returns Promise<CrossChainSwapResult> - The result of the swap execution */ export declare function executeSingleChainSwap(params: ExecuteSingleChainSwapParams): Promise<CrossChainSwapResult>; //# sourceMappingURL=buildTransaction.d.ts.map