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

AssetValue

Defined in: packages/helpers/src/modules/assetValue.ts:49

new AssetValue(__namedParameters): AssetValue

Defined in: packages/helpers/src/modules/assetValue.ts:61

object & { chain: Chain; identifier?: undefined; symbol: string; } | { chain?: undefined; identifier: string; symbol?: undefined; }

AssetValue

BigIntArithmetics.constructor

optional address: string

Defined in: packages/helpers/src/modules/assetValue.ts:50


bigIntValue: bigint = 0n

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

BigIntArithmetics.bigIntValue


chain: Chain

Defined in: packages/helpers/src/modules/assetValue.ts:51


chainId: ChainId

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


optional decimal: number

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

BigIntArithmetics.decimal


decimalMultiplier: bigint

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

BigIntArithmetics.decimalMultiplier


isGasAsset: boolean = false

Defined in: packages/helpers/src/modules/assetValue.ts:52


isSynthetic: boolean = false

Defined in: packages/helpers/src/modules/assetValue.ts:53


isTradeAsset: boolean = false

Defined in: packages/helpers/src/modules/assetValue.ts:54


symbol: string

Defined in: packages/helpers/src/modules/assetValue.ts:55


optional tax: TokenTax

Defined in: packages/helpers/src/modules/assetValue.ts:56


ticker: string

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


type: Chain | "Synth" | "Trade" | "Native"

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

add(…args): AssetValue

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

InitialisationValueType[]

AssetValue

BigIntArithmetics.add


div(…args): AssetValue

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

InitialisationValueType[]

AssetValue

BigIntArithmetics.div


eq(assetValue): boolean

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

AssetValue

boolean


eqAsset(__namedParameters): boolean

Defined in: packages/helpers/src/modules/assetValue.ts:102

Chain

string

boolean


eqValue(value): boolean

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

InitialisationValueType

boolean

BigIntArithmetics.eqValue


formatBigIntToSafeValue(value, decimal?): string

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

bigint

number

string

BigIntArithmetics.formatBigIntToSafeValue


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

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

T extends AllowedNumberTypes

T

number

NumberPrimitivesType[T]

BigIntArithmetics.getBaseValue


getBigIntValue(value, decimal?): bigint

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

InitialisationValueType

number

bigint

BigIntArithmetics.getBigIntValue


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

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

T extends AllowedNumberTypes

T

number

NumberPrimitivesType[T]

BigIntArithmetics.getValue


gt(value): boolean

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

InitialisationValueType

boolean

BigIntArithmetics.gt


gte(value): boolean

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

InitialisationValueType

boolean

BigIntArithmetics.gte


lt(value): boolean

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

InitialisationValueType

boolean

BigIntArithmetics.lt


lte(value): boolean

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

InitialisationValueType

boolean

BigIntArithmetics.lte


mul(…args): AssetValue

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

InitialisationValueType[]

AssetValue

BigIntArithmetics.mul


set(value): this

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

SKBigIntParams

this

BigIntArithmetics.set


sub(…args): AssetValue

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

InitialisationValueType[]

AssetValue

BigIntArithmetics.sub


toAbbreviation(digits): string

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

number = 2

string

BigIntArithmetics.toAbbreviation


toCurrency(currency, __namedParameters): string

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

string = "$"

string = "start"

number = 2

string = "."

string = ","

string

BigIntArithmetics.toCurrency


toFixed(fixedDigits): string

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

number = 6

string

BigIntArithmetics.toFixed


toSignificant(significantDigits): string

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

number = 6

string

BigIntArithmetics.toSignificant


toString(__namedParameters): string

Defined in: packages/helpers/src/modules/assetValue.ts:88

Returns a string representation of an object.

boolean

string


toUrl(): string

Defined in: packages/helpers/src/modules/assetValue.ts:94

string


static from<T>(__namedParameters): ConditionalAssetValueReturn<T>

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

T extends object

T & AssetValueFromParams

ConditionalAssetValueReturn<T>


static fromBigInt(value, decimal?): BigIntArithmetics

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

bigint

number

BigIntArithmetics

BigIntArithmetics.fromBigInt


static fromUrl(urlAsset, value): AssetValue

Defined in: packages/helpers/src/modules/assetValue.ts:113

string

NumberPrimitives = 0

AssetValue


static loadStaticAssets(listNames?): Promise<boolean>

Defined in: packages/helpers/src/modules/assetValue.ts:177

keyof TokenLists[]

Promise<boolean>


static setStaticAssets(tokenMap): boolean

Defined in: packages/helpers/src/modules/assetValue.ts:194

Map<string, object & { decimal: number; } | { decimals: number; }>

boolean


static shiftDecimals(__namedParameters): BigIntArithmetics

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

number

number

SwapKitNumber

BigIntArithmetics

BigIntArithmetics.shiftDecimals