import { ITransactionOption } from "../interfaces"; import { Web3SideChainClient } from "../utils"; import { POSToken } from "./pos_token"; import { TYPE_AMOUNT } from "../types"; import { IAllowanceTransactionOption, IApproveTransactionOption, IExitTransactionOption, IPOSClientConfig, IPOSContracts } from "../interfaces"; export declare class ERC20 extends POSToken { constructor(tokenAddress: string, isParent: boolean, client: Web3SideChainClient, getContracts: () => IPOSContracts); getBalance(userAddress: string, option?: ITransactionOption): Promise; /** * get allowance of user * * @param {string} userAddress * @param {ITransactionOption} [option] * @returns * @memberof ERC20 */ getAllowance(userAddress: string, option?: IAllowanceTransactionOption): Promise; approve(amount: TYPE_AMOUNT, option?: IApproveTransactionOption): Promise; approveMax(option?: IApproveTransactionOption): Promise; /** * Deposit given amount of token for user * * @param {TYPE_AMOUNT} amount * @param {string} userAddress * @param {ITransactionOption} [option] * @returns * @memberof ERC20 */ deposit(amount: TYPE_AMOUNT, userAddress: string, option?: ITransactionOption): Promise; private depositEther_; /** * initiate withdraw by burning provided amount * * @param {TYPE_AMOUNT} amount * @param {ITransactionOption} [option] * @returns * @memberof ERC20 */ withdrawStart(amount: TYPE_AMOUNT, option?: ITransactionOption): Promise; private withdrawExit_; /** * complete withdraw process after checkpoint has been submitted for the block containing burn tx. * * @param {string} burnTransactionHash * @param {ITransactionOption} [option] * @returns * @memberof ERC20 */ withdrawExit(burnTransactionHash: string, option?: IExitTransactionOption): Promise; /** * complete withdraw process after checkpoint has been submitted for the block containing burn tx. * * Note:- It create the proof in api call for fast exit. * * @param {string} burnTransactionHash * @param {ITransactionOption} [option] * @returns * @memberof ERC20 */ withdrawExitFaster(burnTransactionHash: string, option?: IExitTransactionOption): Promise; /** * check if exit has been completed for a transaction hash * * @param {string} burnTxHash * @returns * @memberof ERC20 */ isWithdrawExited(burnTxHash: string): Promise; /** * transfer amount to another user * * @param {TYPE_AMOUNT} amount * @param {string} to * @param {ITransactionOption} [option] * @returns * @memberof ERC20 */ transfer(amount: TYPE_AMOUNT, to: string, option?: ITransactionOption): Promise; }