import type { MarketsResponse } from '../../Client'; import type { TTLCache } from '../../utils/TTLCache'; import type { Network, NetworkInfoInternal } from './types'; import { NetworkDescriptor } from './NetworkDescriptor'; import { UtxoNetworkDescriptor } from './UtxoNetworkDescriptor'; import { BchNetworkDescriptor } from './BchNetworkDescriptor'; import { EvmNetworkDescriptor } from './EvmNetworkDescriptor'; import { EvmRpcNetworkDescriptor } from './EvmRpcNetworkDescriptor'; import type { EvmRpcConfig } from './EvmRpcNetworkDescriptor'; /** @internal */ export declare const NETWORKS_INFO: Record; /** * A collection of all supported networks. * * Iterable like an array (via `for...of`, `.forEach`, spread, etc.) * **and** provides named properties for direct access: * * ```ts * const cg = new ChainGate({ apiKey: '...' }); * * // Direct access * cg.explore(cg.networks.bitcoin); * * // Iteration * for (const net of cg.networks) { ... } * ``` */ export interface NetworkCollection extends ReadonlyArray { readonly bitcoin: UtxoNetworkDescriptor; readonly litecoin: UtxoNetworkDescriptor; readonly dogecoin: UtxoNetworkDescriptor; readonly bitcoincash: BchNetworkDescriptor; readonly bitcointestnet: UtxoNetworkDescriptor; readonly ethereum: EvmNetworkDescriptor; /** * Creates a descriptor for a custom EVM network accessible via a direct * JSON-RPC endpoint. * * The returned {@link EvmRpcNetworkDescriptor} can be passed to * `cg.connect()` to obtain an {@link EvmRpcConnector}. * * @example * ```ts * const bsc = cg.networks.evmRpc({ * rpcUrl: 'https://bsc-dataseed.binance.org', * chainId: 56, * name: 'BNB Smart Chain', * symbol: 'BNB', * }); * const conn = cg.connect(bsc, wallet); * ``` */ evmRpc(config: EvmRpcConfig): EvmRpcNetworkDescriptor; } /** @internal Builds the {@link NetworkCollection} for a {@link ChainGate} instance. */ export declare function createNetworkCollection(marketsCache: TTLCache, apiKey: string): NetworkCollection;