UNPKG

@accret/bridge-sdk

Version:
160 lines 4.28 kB
import type { InterfaceAbi } from "ethers"; import { AccretSupportedChain } from ".."; export declare const erc20Abi: InterfaceAbi; export interface deBridgeCrossChainTxnInput { srcChainId: string; srcChainTokenIn: string; srcChainTokenInAmount: string; dstChainId: string; dstChainTokenOut: string; dstChainTokenOutRecipient?: string; account?: string; dstChainTokenOutAmount?: string; slippage?: number; additionalTakerRewardBps?: number; srcIntermediaryTokenAddress?: string; dstIntermediaryTokenAddress?: string; dstIntermediaryTokenSpenderAddress?: string; intermediaryTokenUSDPrice?: number; srcAllowedCancelBeneficiary?: string; referralCode?: number; affiliateFeePercent?: number; srcChainOrderAuthorityAddress?: string; srcChainRefundAddress?: string; dstChainOrderAuthorityAddress?: string; prependOperatingExpenses?: boolean; deBridgeApp?: string; } export interface deBridgeSingleChainTxnInput { chainId: string; tokenIn: string; tokenInAmount: string; tokenOut: string; tokenOutRecipient?: string; slippage?: number; affiliateFeePercent?: number; affiliateFeeRecipient?: string; } export interface deBridgeSingleChainOrderResponse { tokenIn: { address: string; name: string; symbol: string; decimals: number; amount: string; }; tokenOut: { address: string; name: string; symbol: string; decimals: number; minAmount: string; amount: string; }; slippage: number; recommendedSlippage: number; tx: { data: string; value: string; to: string; }; } export interface deBridgeCrossChainOrderResponse { tx: { data: string; to: string; value: string; }; estimation: { srcChainTokenIn: { amount: string; tokenAddress: string; decimals: number; symbol: string; }; dstChainTokenOut: { amount: string; tokenAddress: string; decimals: number; symbol: string; }; fees: { srcChainTokenIn: string; dstChainTokenOut: string; }; }; } export interface ExecuteCrossChainSwapParams { privateKey: string; srcNetwork: string; srcTokenAddress: string; srcTokenDecimals: number; amountToSwap: string; dstTokenAddress: string; dstNetwork: string; recipientAddress?: string; srcChainRpcUrl: string; slippage?: number; referralCode?: string; srcChainOrderAuthorityAddress?: string; dstChainOrderAuthorityAddress?: string; dstChainTokenOutAmount?: string; enableLogging?: boolean; } export interface ExecuteSingleChainSwapParams { privateKey: string; network: string; srcTokenAddress: string; srcTokenDecimals: number; amountToSwap: string; dstTokenAddress: string; recipientAddress?: string; srcChainRpcUrl: string; affiliateFeePercent?: number; affiliateFeeRecipient?: string; slippage?: number; referralCode?: string; srcChainOrderAuthorityAddress?: string; dstChainOrderAuthorityAddress?: string; dstChainTokenOutAmount?: string; enableLogging?: boolean; } export interface CrossChainSwapResult { success: boolean; bridgeTxHash?: string; approvalTxHash?: string; estimatedOutput?: { amount: string; symbol: string; decimals: number; }; fees?: { srcChainTokenIn: string; dstChainTokenOut: string; }; error?: string; } export interface SingleChainSwapResult { success: boolean; bridgeTxHash?: string; approvalTxHash?: string; estimatedOutput?: { amount: string; symbol: string; decimals: number; }; fees?: { srcChainTokenIn: string; dstChainTokenOut: string; }; error?: string; } export interface getQuoteParams { srcChain: AccretSupportedChain; srcChainTokenIn: string; srcChainTokenInAmount: string; srcTokenDecimals: number; dstChain: AccretSupportedChain; dstChainTokenOut: string; } //# sourceMappingURL=buildTransaction.d.ts.map