UNPKG

butterjs-sdk

Version:
25 lines (24 loc) 1.24 kB
import { ButterTransactionResponse } from '../../types/responseTypes'; import { ButterCoreParam, TransactionOptions } from '../../types'; import { ButterContractType, ButterProviderType } from '../../types/paramTypes'; /** * EVM Omnichain Chain Service smart contracts abstraction */ export declare class ButterRouter { contract: ButterContractType; provider: ButterProviderType; constructor(contractAddress: string, abi: any, signerOrProvider: ButterProviderType); /** * transfer out token(not native coin) from source chain to designated token on target chain * @param fromAddress * @param coreParam * @param targetSwapData * @param amount amount in minimal unit * @param toChain * @param targetToAddress * @param isNative * @param options */ entrance(fromAddress: string, coreParam: ButterCoreParam, targetSwapData: string, amount: string, toChain: string, targetToAddress: string, isNative: boolean, options: TransactionOptions): Promise<ButterTransactionResponse>; gasEstimateEntrance(fromAddress: string, coreParam: ButterCoreParam, targetSwapData: string, amount: string, toChain: string, targetToAddress: string, isNative: boolean): Promise<string>; }