Skip to main content

TokenList

The TokenList represents a list of tokens for a given chain

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new TokenList(chainId, tokens)

Parameters

NameType
chainIdChainId
tokensToken[]

Defined in

socket-v2-sdk/src/tokenList.ts:12

Properties

chainId

chainId: ChainId

Defined in

socket-v2-sdk/src/tokenList.ts:10


tokens

tokens: Token[]

Defined in

socket-v2-sdk/src/tokenList.ts:9

Accessors

nativeToken

get nativeToken(): Token

The native token of the chain

Returns

Token

Defined in

socket-v2-sdk/src/tokenList.ts:20

Methods

tokenByAddress

tokenByAddress(address): undefined | Token

Retrieve token by its address

Parameters

NameTypeDescription
addressstringtoken address

Returns

undefined | Token

token object

Defined in

socket-v2-sdk/src/tokenList.ts:31


tokenBySymbol

tokenBySymbol(symbol): undefined | Token

Retrieve token by its symbol

Parameters

NameTypeDescription
symbolstringsymbol. Example: USDC

Returns

undefined | Token

token object

Defined in

socket-v2-sdk/src/tokenList.ts:40