UNPKG

@signumjs/util

Version:

Useful utilities and tools for building Signum Network applications

42 lines (41 loc) 1.31 kB
import BigNumber from 'bignumber.js'; export interface AmountFormat { prefix: string; decimalSeparator: string; groupSeparator: string; groupSize: number; secondaryGroupSize: number; fractionGroupSeparator: string; fractionGroupSize: number; suffix: string; } export declare const FormatDotDecimal: AmountFormat; export declare const FormatCommaDecimal: AmountFormat; export declare const AmountFormats: { DotDecimal: AmountFormat; CommaDecimal: AmountFormat; }; export declare class Amount { private readonly _value; private constructor(); static CurrencySymbol(): string; static Zero(): Amount; static fromPlanck(planck: number | string): Amount; static fromSigna(signa: number | string): Amount; getRaw(): BigNumber; getPlanck(): string; setPlanck(p: string): Amount; getSigna(): string; setSigna(b: string): Amount; equals(amount: Amount): boolean; lessOrEqual(amount: Amount): boolean; less(amount: Amount): boolean; greaterOrEqual(amount: Amount): boolean; greater(amount: Amount): boolean; add(amount: Amount): Amount; subtract(amount: Amount): Amount; multiply(value: number): Amount; divide(value: number): Amount; toString(format?: AmountFormat): string; clone(): Amount; }