• Factory to create base amounts (e.g. tor)

    Parameters

    • value: undefined | Value

      The base amount, If the value is undefined, BaseAmount with value 0 will be returned.

    • decimal: number = ASSET_DECIMAL

      The decimal places of its associated AssetAmount. (optional)

    Returns {
        amount: (() => BigNumber);
        decimal: number;
        div: ((value, decimal?) => { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; });
        eq: ((value) => boolean);
        gt: ((value) => boolean);
        gte: ((value) => boolean);
        lt: ((value) => boolean);
        lte: ((value) => boolean);
        minus: ((value, decimal?) => { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; });
        plus: ((value, decimal?) => { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; });
        times: ((value, decimal?) => { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; });
        type: Base;
    }

    The base amount from the given value and decimal.

    • amount: (() => BigNumber)
        • (): BigNumber
        • Returns BigNumber

    • decimal: number
    • div: ((value, decimal?) => { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; })
        • (value, decimal?): { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; }
        • Parameters

          • value: Value | ({ type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; })
          • Optional decimal: number

          Returns { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; }

    • eq: ((value) => boolean)
        • (value): boolean
        • Parameters

          • value: Value | ({ type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; })

          Returns boolean

    • gt: ((value) => boolean)
        • (value): boolean
        • Parameters

          • value: Value | ({ type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; })

          Returns boolean

    • gte: ((value) => boolean)
        • (value): boolean
        • Parameters

          • value: Value | ({ type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; })

          Returns boolean

    • lt: ((value) => boolean)
        • (value): boolean
        • Parameters

          • value: Value | ({ type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; })

          Returns boolean

    • lte: ((value) => boolean)
        • (value): boolean
        • Parameters

          • value: Value | ({ type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; })

          Returns boolean

    • minus: ((value, decimal?) => { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; })
        • (value, decimal?): { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; }
        • Parameters

          • value: Value | ({ type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; })
          • Optional decimal: number

          Returns { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; }

    • plus: ((value, decimal?) => { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; })
        • (value, decimal?): { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; }
        • Parameters

          • value: Value | ({ type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; })
          • Optional decimal: number

          Returns { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; }

    • times: ((value, decimal?) => { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; })
        • (value, decimal?): { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; }
        • Parameters

          • value: Value | ({ type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; })
          • Optional decimal: number

          Returns { type: Denomination.Base; amount: () => BigNumber; plus: (value: Value | ..., decimal?: number | undefined) => ...; minus: (value: Value | ..., decimal?: number | undefined) => ...; ... 7 more ...; decimal: number; }

    • type: Base

Generated using TypeDoc