Skip to content
SwapKit is a powerful suite of tools for building blockchain applications.

SwapKitNumber

Defined in: packages/helpers/src/modules/swapKitNumber.ts:5

new SwapKitNumber(params): SwapKitNumber

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:84

SKBigIntParams

SwapKitNumber

BigIntArithmetics.constructor

bigIntValue: bigint = 0n

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:59

BigIntArithmetics.bigIntValue


optional decimal: number

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:60

BigIntArithmetics.decimal


decimalMultiplier: bigint

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:58

BigIntArithmetics.decimalMultiplier

add(…args): SwapKitNumber

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:106

InitialisationValueType[]

SwapKitNumber

BigIntArithmetics.add


div(…args): SwapKitNumber

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:115

InitialisationValueType[]

SwapKitNumber

BigIntArithmetics.div


eq(value): boolean

Defined in: packages/helpers/src/modules/swapKitNumber.ts:6

SwapKitValueType

boolean


eqValue(value): boolean

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:130

InitialisationValueType

boolean

BigIntArithmetics.eqValue


formatBigIntToSafeValue(value, decimal?): string

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:267

bigint

number

string

BigIntArithmetics.formatBigIntToSafeValue


getBaseValue<T>(type, decimal?): NumberPrimitivesType[T]

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:153

T extends AllowedNumberTypes

T

number

NumberPrimitivesType[T]

BigIntArithmetics.getBaseValue


getBigIntValue(value, decimal?): bigint

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:170

InitialisationValueType

number

bigint

BigIntArithmetics.getBigIntValue


getValue<T>(type, decimal?): NumberPrimitivesType[T]

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:134

T extends AllowedNumberTypes

T

number

NumberPrimitivesType[T]

BigIntArithmetics.getValue


gt(value): boolean

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:118

InitialisationValueType

boolean

BigIntArithmetics.gt


gte(value): boolean

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:121

InitialisationValueType

boolean

BigIntArithmetics.gte


lt(value): boolean

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:124

InitialisationValueType

boolean

BigIntArithmetics.lt


lte(value): boolean

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:127

InitialisationValueType

boolean

BigIntArithmetics.lte


mul(…args): SwapKitNumber

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:112

InitialisationValueType[]

SwapKitNumber

BigIntArithmetics.mul


set(value): this

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:97

SKBigIntParams

this

BigIntArithmetics.set


sub(…args): SwapKitNumber

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:109

InitialisationValueType[]

SwapKitNumber

BigIntArithmetics.sub


toAbbreviation(digits): string

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:228

number = 2

string

BigIntArithmetics.toAbbreviation


toCurrency(currency, __namedParameters): string

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:242

string = "$"

string = "start"

number = 2

string = "."

string = ","

string

BigIntArithmetics.toCurrency


toFixed(fixedDigits): string

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:210

number = 6

string

BigIntArithmetics.toFixed


toSignificant(significantDigits): string

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:180

number = 6

string

BigIntArithmetics.toSignificant


static fromBigInt(value, decimal?): SwapKitNumber

Defined in: packages/helpers/src/modules/swapKitNumber.ts:10

bigint

number

SwapKitNumber

BigIntArithmetics.fromBigInt


static shiftDecimals(__namedParameters): BigIntArithmetics

Defined in: packages/helpers/src/modules/bigIntArithmetics.ts:69

number

number

SwapKitNumber

BigIntArithmetics

BigIntArithmetics.shiftDecimals