import { BigNumber, ethers } from 'ethers'; import { Bridger } from './bridger'; import { TokenAddressMap } from './types'; /** * Represents a token within a blockchain network that can be used in bridging operations. */ export declare class BridgeToken { readonly tokenAddresses: TokenAddressMap; readonly address: string; bridgers: Bridger[]; readonly chainId: number; /** * Creates an instance of the `BridgeToken` class, which represents a specific token within a blockchain network. * * @param tokenAddresses - A `TokenAddressMap` object representing the token addresses associated with different chain IDs. * @param chainId . */ constructor(tokenAddresses: TokenAddressMap, chainId: number); /** * Retrieves the balance of a specified address for a given network. * * This method checks the balance of either native or an ERC20 token for the specified address * on the configured network. If the token address corresponds to the native (i.e., `AddressZero`), * it fetches the native balance. Otherwise, it fetches the balance of the specified ERC20 token. * * @param {ethers.Signer | ethers.providers.Provider | string} provider - A signer, provider, or RPC URL for connecting to the Ethereum network. * @param {string} address - The address for which to retrieve the balance. * @returns {Promise} A promise that resolves to the balance of the native or ERC20 token. * * @throws {Error} If the token address is not found for the specified network. */ getBalance(provider: ethers.Signer | ethers.providers.Provider | string, address: string): Promise; /** * Retrieves the symbol of the token for display purposes. * * @param provider - An `ethers.Signer`, `ethers.providers.Provider`, or a string representing the RPC URL. * If a string is provided, a new `JsonRpcProvider` will be created using the RPC URL. * @returns A promise that resolves to a string representing the token symbol. * @throws An error if the token address is not found for the specified network. */ getSymbol(provider: ethers.Signer | ethers.providers.Provider | string): Promise; /** * Retrieves the number of decimals used by the token. * * @param provider - An `ethers.Signer`, `ethers.providers.Provider`, or a string representing the RPC URL. * If a string is provided, a new `JsonRpcProvider` will be created using the RPC URL. * @returns A promise that resolves to a number representing the token's decimals. * @throws Error if the token address is not found for the specified network. */ getDecimals(provider: ethers.Signer | ethers.providers.Provider | string): Promise; /** * Retrieves a list of `Bridger` instances that can be used to bridge the token across different networks. * * @param chainIds - (Optional) An array of chain IDs to filter the bridgers by specific networks. * If not provided, all available bridgers for the token will be returned. * @returns An array of `Bridger` instances representing the available bridging options for this token. */ getBridgers(chainIds?: number[]): Bridger[]; }