UNPKG

@ethereum-tag-service/contracts

Version:

Composable content tagging service for Web3

28 lines (25 loc) 1.47 kB
import { SupportedChainId, SupportedChain } from './multiChainConfig.js'; import 'viem/chains'; declare const getChainById: (chainId: SupportedChainId) => SupportedChain; /** * Generates a URL to the block explorer for a given chain, transaction, address, or token. * @param chainId - The ID of the chain. * @param type - The type of URL to generate (e.g., "tx" for transaction, "address", or "token"). * @param hash - Optional hash or identifier for the transaction, address, or token. * @returns A string representing the full URL to the block explorer. */ declare const getExplorerUrl: (chainId: SupportedChainId, type?: "tx" | "nft" | "address" | "token", hash?: string) => string; /** * Generates the base Alchemy RPC URL for a given chain name. * @param chainName - The name of the chain (e.g., "arbitrumSepolia" or "baseSepolia"). * @returns A string representing the Alchemy RPC URL for the specified chain. */ declare const getAlchemyRpcUrl: (chainId: string) => string; /** * Retrieves the Alchemy RPC URL for a specific chain by its ID. * @param chainId - The ID of the chain (e.g., "421614" for Arbitrum Sepolia). * @param alchemyKey - The Alchemy API key to be appended to the URL. * @returns A string representing the Alchemy RPC URL for the specified chain. */ declare function getAlchemyRpcUrlById(chainId: SupportedChainId, alchemyKey: string): string; export { getAlchemyRpcUrl, getAlchemyRpcUrlById, getChainById, getExplorerUrl };