Class for finding wrapped tokens on various chains

Constructors

Methods

  • Finds the wrapped token address for a given source chain on a target chain

    Parameters

    • sourceChain: BaseChain

      The chain whose token we want to find (e.g., BITCOIN, SOLANA)

    • targetChain: BaseChain

      The chain where we want to find the wrapped token

    Returns Promise<string | false>

    The wrapped token address or false if not found

  • Gets the native token address for any supported chain

    Parameters

    • chain:
          | "ethereum_testnet"
          | "ethereum_mainnet"
          | "bsc_testnet"
          | "bsc_mainnet"
          | "arbitrum_testnet"
          | "arbitrum_mainnet"
          | "optimism_testnet"
          | "optimism_mainnet"
          | "solana_testnet"
          | "solana_mainnet"
          | "multiversx_testnet"
          | "multiversx_mainnet"
          | "xrp_testnet"
          | "xrp_mainnet"
          | "bitcoin_testnet"
          | "bitcoin_mainnet"
          | "ton_testnet"
          | "ton_mainnet"

      The supported chain to find the native address for (e.g., "ethereum_mainnet")

    • targetChainId: number = 1

      The chain ID to find the native address for (e.g., 1 for Ethereum mainnet)

    Returns string

    The native token address for the given chain ID

    If chain ID doesn't match the chain or if chain is unsupported