Core Entities
The following entities are the core ones, used in all the other libraries that the SDK
provides
#
BaseCurrencyabstract class BaseCurrency
constructor(chainId: number, decimals: number, symbol?: string, name?: string)
#
Tokenclass Token extends BaseCurrency
constructor(chainId: number, address: string, decimals: number, symbol?: string, name?: string)
Token
base entity used in helpers allowing you to wrap an address as a typed object and is used in other entities like SupportedToken
#
Fractionclass Fraction
constructor(numerator: BigintIsh, denominator: BigintIsh = JSBI.BigInt(1))
Fraction
is usually used in other core entities like CurrencyAmount
#
CurrencyAmountclass CurrencyAmount<T extends Currency> extends Fraction
constructor(currency: T, numerator: BigintIsh, denominator?: BigintIsh)
CurrencyAmount
represents a base entity allowing you to perform various operations on values like fromRawAmount
(casts a number to CurrencyAmount), toFixed
, toExact
and others. The getter
wrapped
returns the CurrencyAmount
object