import Moac from "./moac"; import SmartContract from "./smartContract"; /** * toolkit of moac fingate * * @class Fingate */ declare class Fingate extends SmartContract { /** * Creates an instance of Fingate * @memberof Fingate */ constructor(); /** * init instance of moac contract * * @param {string} fingateAddress contract address of moac fingate * @param {Moac} moac instance * @memberof Fingate */ init(fingateAddress: string, moac: Moac): void; /** * close chain3 & destroy instance of contract * * @memberof Fingate */ destroy(): void; /** * request deposit state * * @param {string} address moac address * @param {string} [contractAddress="0x0000000000000000000000000000000000000000"] contract address of token * @returns {(Promise<(BigNumber | string)[]>)} * @memberof Fingate */ depositState(address: string, contractAddress?: string): Promise<(BigNumber | string)[]>; /** * validate deposit state is pending or not * * @param {(BigNumber | string)[]} state * @returns {boolean} return true if the state is pending * @memberof Fingate */ isPending(state: (BigNumber | string)[]): boolean; /** * deposit moac * * @param {string} jtAddress jingtum address * @param {string} amount amount of deposit * @param {string} moacSecret moac secret * @param {ITransactionOption} options specify gasPrice, nonce, gasLimit etc. * @returns {Promise} resolve hash if successful * @memberof Fingate */ deposit(jtAddress: string, amount: string, moacSecret: string, options?: ITransactionOption): Promise; /** * deposit erc20 token * * @param {string} jtAddress jingtum address * @param {string} tokenAddress erc20 contract address * @param {number} decimals token decimals * @param {string} amount amount of deposit * @param {string} hash generated by `transfer` api of ERC20 * @param {string} moacSecret moac secret * @param {ITransactionOption} options specify gasPrice, nonce, gasLimit etc. * @returns {Promise} reslove hash of transaction if successful * @memberof Fingate */ depositToken(jtAddress: string, tokenAddress: string, decimals: number, amount: string, hash: string, moacSecret: string, options?: ITransactionOption): Promise; } export default Fingate;