import { type TablelandNetworkConfig } from "@tableland/evm/network.js"; import { type PollingController } from "./await.js"; /** * The set of supported chain names as used by the Tableland network. */ export type ChainName = keyof TablelandNetworkConfig; /** * Chain information used to determine defaults for the set of supported chains. * @property chainName The name of the chain as defined in {@link ChainName}. * @property chainId The chain ID. * @property contractAddress The registry contract address for the chain. * @property baseUrl The validator base URL for the chain. * @property pollingTimeout The validator polling timeout for the chain. * @property pollingInterval The validator polling interval for the chain. * @property [key: string] Any additional properties. */ export interface ChainInfo { chainName: ChainName; chainId: number; contractAddress: string; baseUrl: string; pollingTimeout: number; pollingInterval: number; [key: string]: ChainInfo[keyof ChainInfo]; } /** * The set of chains and their information as supported by the Tableland network. */ export declare const supportedChains: Record; /** * Get the default chain information for a given chain name. * @param chainNameOrId The requested chain name or ID. * @returns An object containing the default chainId, contractAddress, chainName, and baseUrl for the given chain. */ export declare function getChainInfo(chainNameOrId: ChainName | number): ChainInfo; /** * Get whether or not a chain is a testnet. * @param chainNameOrId The requested chain name or ID. * @returns An boolean to indicate the testnet classification of the given chain. */ export declare function isTestnet(chainNameOrId: ChainName | number): boolean; /** * Get the default contract address for a given chain name. * @param chainNameOrId The requested chain name or ID. * @returns A hex string representing the default address for the Tableland registry contract. */ export declare function getContractAddress(chainNameOrId: ChainName | number): string; /** * Get the default chain ID for a given chain name. * @param chainNameOrId The requested chain name or ID. * @returns A number representing the default chain ID of the requested chain. */ export declare function getChainId(chainNameOrId: ChainName | number): number; /** * Get the default host uri for a given chain name. * @param chainNameOrId The requested chain name. * @returns A string representing the default host uri for a given chain. */ export declare function getBaseUrl(chainNameOrId: ChainName | number): string; /** * Create a polling controller with chain-specific timeout & interval. * @param chainNameOrId The requested chain name. * @returns A {@link PollingController} with standard timeout & interval per-chain. */ export declare function getChainPollingController(chainNameOrId: ChainName | number): PollingController; /** * Override the internal list of registry addresses and validator urls that will be used for Contract calls and read queries * @param chainNameOrId Either the chain name or chainId. For a list of chain names see the evm-tableland networks file * @param values The values you would like to use to override the defaults. * Example: {contractAddress: "0x000deadbeef", baseUrl: "https://my.validator.mydomain.tld"} * @returns void */ export declare function overrideDefaults(chainNameOrId: ChainName | number, values: Record): void; //# sourceMappingURL=chains.d.ts.map