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

AssetValue

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

new AssetValue(__namedParameters): AssetValue

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

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:48


bigIntValue: bigint = 0n

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

BigIntArithmetics.bigIntValue


chain: Chain

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


chainId: ChainId

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


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


isGasAsset: boolean = false

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


isSynthetic: boolean = false

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


isTradeAsset: boolean = false

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


symbol: string

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


optional tax: TokenTax

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


ticker: string

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


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

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

add(…args): AssetValue

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

InitialisationValueType[]

AssetValue

BigIntArithmetics.add


div(…args): AssetValue

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

InitialisationValueType[]

AssetValue

BigIntArithmetics.div


eq(assetValue): boolean

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

AssetValue

boolean


eqAsset(__namedParameters): boolean

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

Chain

string

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): AssetValue

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

InitialisationValueType[]

AssetValue

BigIntArithmetics.mul


set(value): this

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

SKBigIntParams

this

BigIntArithmetics.set


sub(…args): AssetValue

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

InitialisationValueType[]

AssetValue

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


toString(__namedParameters): string

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

Returns a string representation of an object.

boolean

string


toUrl(): string

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

string


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

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

T extends object

T & AssetValueFromParams

ConditionalAssetValueReturn<T>


static fromBigInt(value, decimal?): BigIntArithmetics

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

bigint

number

BigIntArithmetics

BigIntArithmetics.fromBigInt


static fromUrl(urlAsset, value): AssetValue

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

string

NumberPrimitives = 0

AssetValue


static loadStaticAssets(listNames?): Promise<boolean>

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

keyof TokenLists[]

Promise<boolean>


static setStaticAssets(tokenMap): boolean

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

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

boolean


static shiftDecimals(__namedParameters): BigIntArithmetics

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

number

number

SwapKitNumber

BigIntArithmetics

BigIntArithmetics.shiftDecimals