import Asset from './model/asset'; import ChainHelper from './helpers/chain'; import KhHelper from './helpers/kh'; import EosProvider from './model/eosProvider'; import EventHandler from './utils/eventHandler'; /** * Player */ export declare class Player extends EosProvider { protected _events: EventHandler; constructor(); readonly events: EventHandler; readonly chain: ChainHelper; readonly kh: KhHelper; /** * get account info of any user, if the account name not given, account info of current identity will return * @param account_name * @return {Promise<{AccountInfo}>} */ getAccountInfo(account_name?: string): Promise; /** * get balance of specific account * @param code - Account of the currency contract. The default code is "eosio.token", which is the currency code of eos * @param account_name - user's account name, name of cur identity by default * @param symbolName - the token's symbol name * @return {Promise} asset format '1.0000 EOS' */ getBalance(account_name?: string, code?: string, symbolName?: string): Promise; /** * get balances list of specific account * @param code - Account of the currency contract. The default code is "eosio.token" * @param account_name - user's account name, name of cur identity by default * @return {Promise>} asset format '1.0000 EOS' */ getBalances(account_name?: string, code?: string): Promise; /** * get balance value of specific account * @param code - Account of the currency contract. The default code is "eosio.token", which is the currency code of eos * @param account_name - user's account name, name of cur identity by default * @return {Promise} */ getBalanceAsset(account_name?: string, code?: string): Promise; /** * transfer * @param {string} target - eos account, can be user or contract * @param {string} quantity - eos asset format, e.p. "1.0000 EOS" * @param {string} memo - memo * @param {string} tokenAccount - name of token account contract, default is 'eosio.token' * @return {Promise} transactionData */ transfer(target: string, quantity: string, memo?: string, tokenAccount?: string): Promise; /** * call kh contract with transfer (match eoskit) * @param {string} target - eos account, can be user or contract * @param {string} quantity - eos asset format, e.p. "1.0000 EOS" * @param {string} func - function name * @param {Array} args * @return {Promise} transactionData */ transcal(target: string, quantity: string, func: string, ...args: string[]): Promise; /** * send action to a contract * @param {string} code - account of contract * @param {string} func - function name * @param {*} jsonData - data * @return {Promise<*>} - transaction */ call(code: string, func: string, jsonData: any): Promise; /** * create a account with public key * @param name * @param activeKey * @param ownerKey * @return {Promise} */ newAccount(name: string, activeKey: string, ownerKey: string): Promise; /** * get version */ version(): string; /** * get help info */ help(): string; }