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

BigIntArithmetics

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

new BigIntArithmetics(params): BigIntArithmetics

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

SKBigIntParams

BigIntArithmetics

bigIntValue: bigint = 0n

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


optional decimal: number

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


decimalMultiplier: bigint

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

add(…args): BigIntArithmetics

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

InitialisationValueType[]

BigIntArithmetics


div(…args): BigIntArithmetics

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

InitialisationValueType[]

BigIntArithmetics


eqValue(value): boolean

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

InitialisationValueType

boolean


formatBigIntToSafeValue(value, decimal?): string

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

bigint

number

string


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

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

T extends AllowedNumberTypes

T

number

NumberPrimitivesType[T]


getBigIntValue(value, decimal?): bigint

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

InitialisationValueType

number

bigint


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

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

T extends AllowedNumberTypes

T

number

NumberPrimitivesType[T]


gt(value): boolean

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

InitialisationValueType

boolean


gte(value): boolean

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

InitialisationValueType

boolean


lt(value): boolean

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

InitialisationValueType

boolean


lte(value): boolean

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

InitialisationValueType

boolean


mul(…args): BigIntArithmetics

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

InitialisationValueType[]

BigIntArithmetics


set(value): this

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

SKBigIntParams

this


sub(…args): BigIntArithmetics

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

InitialisationValueType[]

BigIntArithmetics


toAbbreviation(digits): string

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

number = 2

string


toCurrency(currency, __namedParameters): string

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

string = "$"

string = "start"

number = 2

string = "."

string = ","

string


toFixed(fixedDigits): string

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

number = 6

string


toSignificant(significantDigits): string

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

number = 6

string


static fromBigInt(value, decimal?): BigIntArithmetics

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

bigint

number

BigIntArithmetics


static shiftDecimals(__namedParameters): BigIntArithmetics

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

number

number

SwapKitNumber

BigIntArithmetics