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
Name | Type |
---|---|
chainId | ChainId |
tokens | Token [] |
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
Defined in
socket-v2-sdk/src/tokenList.ts:20
Methods
tokenByAddress
▸ tokenByAddress(address
): undefined
| Token
Retrieve token by its address
Parameters
Name | Type | Description |
---|---|---|
address | string | token 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
Name | Type | Description |
---|---|---|
symbol | string | symbol. Example: USDC |
Returns
undefined
| Token
token object