UNPKG

eosplayer

Version:

eosplayer is the glue layer of eosjs, which is packaged based on eosjs and provides better usability for the application layer. It can be used on browsers already installed scatter or in Dapp wallets.

42 lines (41 loc) 882 B
/** * Asset - asset type of eos * @author kinghand@foxmail.com */ export default class Asset { protected _val: number; protected _sym: string; protected _decimal: number; constructor(_val: number, _sym: string, _decimal?: number); /** * get value * @return {*} */ readonly val: number; /** * get symbol * @return {*} */ readonly sym: string; /** * get decimal * @return {number|*} */ readonly decimal: number; /** * Get String val without symbol * @return {string | *} */ readonly valStr: string; /** * Get string val with symbol, such as '1.0000 EOS' * @return {string} */ toString(): string; /** * create a asset by asset string * @param {string} assetStr * @return {Asset} */ static parse(assetStr: string): Asset; }