Exports
Functions
getTokens(chainId, cache?)
Fetch all available tokens for a specific chain.
Returns:
TokensResponse
Throws:
TokenFetchError if API fails and no cache available.
Example:
getBridgeableTokens(chainId, toChainId?, cache?)
Get tokens that can be bridged from a specific chain to HyperEVM.
Example:
getDestinationTokens()
Get tokens available on HyperEVM destination.getTokenByAddress(chainId, tokenAddress, cache?)
Get a specific token by its address.
Example:
invalidateTokenCache(chainId?, cache?)
Manually invalidate the token cache.
Example:
createTokenCache()
Factory function to create a new cache instance.Types
TokensResponse
Token
TokenFetchError
Constants
NATIVE_TOKEN_ADDRESS
Address used to represent native tokens (ETH, MATIC, etc.).HYPEREVM_USDC
Pre-defined USDC token on HyperEVM.HYPEREVM_HYPE
Pre-defined HYPE native token on HyperEVM.TokenCache Class
TheTokenCache class manages caching for token data with a 30-minute TTL.
