@kaiachain/kss-bridges-celer
Version:
TypeScript client and use-cases for cBridge
12 lines (11 loc) • 1.48 kB
TypeScript
import { BigNumber, ethers } from "ethers";
import { ITransferConfigs, ITransferObject } from "../constants/type";
import { Token } from "../constants/type";
export declare const getBridgeContractAddress: (transferConfigs: ITransferConfigs, chainId: number) => string | undefined;
export declare const getTransferId: (address: string, tokenAddress?: string, value?: BigNumber, toChainId?: number, nonce?: number, fromChainId?: number) => string;
export declare const transactor: (tx: any, rpcURL: string, privateKey: string) => Promise<ethers.ContractTransaction>;
export declare const getTransferObject: (transferConfigs: ITransferConfigs, srcChainId: number, dstChainId: number, tokenSymbol: string, transferValue: string) => ITransferObject;
export declare const getPegConfig: (transferConfigs: ITransferConfigs, srcChainId: number, dstChainId: number, tokenSymbol: string) => import("../constants/type").PeggedPairConfig | undefined;
export declare const getAllowance: (walletAddress: string, spenderAddress: string, originalAddress: string, fromChainId: number | undefined, tokenSymbol: string | undefined, rpcURL: string, peggedPairs?: Array<any> | undefined) => Promise<any>;
export declare const checkApprove: (allowance: BigNumber, amount: string, token?: Token, isNative?: boolean) => boolean;
export declare const approve: (spenderAddress: string, rpcURL: string, privateKey: string, token?: Token, amount?: string) => Promise<ethers.ContractTransaction | undefined>;