/** * Enumeration of supported blockchain families. */ export declare const ChainFamily: { readonly EVM: "EVM"; readonly Solana: "SVM"; readonly Aptos: "APTOS"; readonly Sui: "SUI"; readonly TON: "TON"; readonly Canton: "CANTON"; readonly Unknown: "UNKNOWN"; }; /** Type representing one of the supported chain families. */ export type ChainFamily = (typeof ChainFamily)[keyof typeof ChainFamily]; /** * Enumeration of network types (mainnet vs testnet). */ export declare const NetworkType: { readonly Mainnet: "MAINNET"; readonly Testnet: "TESTNET"; }; /** Type representing the network environment type. */ export type NetworkType = (typeof NetworkType)[keyof typeof NetworkType]; /** Helper type that maps chain family to its chain ID format. */ type ChainFamilyWithId = F extends typeof ChainFamily.EVM | typeof ChainFamily.TON ? { readonly family: F; readonly chainId: number; } : F extends typeof ChainFamily.Solana | typeof ChainFamily.Canton ? { readonly family: F; readonly chainId: string; } : F extends typeof ChainFamily.Aptos | typeof ChainFamily.Sui ? { readonly family: F; readonly chainId: `${Lowercase}:${number}`; } : never; /** * Network information including chain selector and metadata. * * @example * ```typescript * const info: NetworkInfo = { * chainSelector: 16015286601757825753n, * name: 'ethereum-testnet-sepolia', * networkType: 'TESTNET', * family: 'EVM', * chainId: 11155111, * } * ``` */ export type NetworkInfo = { /** Unique chain selector used by CCIP. */ readonly chainSelector: bigint; /** Human-readable network name. */ readonly name: string; /** Network environment type. */ readonly networkType: NetworkType; } & ChainFamilyWithId; /** * Converts a chain selector, chain ID, or chain name to complete network information * * @param selectorOrIdOrName - Can be: * - Chain selector as bigint or numeric string * - Chain ID as number, bigint or string (EVM: "1", Aptos: "aptos:1", Solana: genesisHash) * - Chain name as string ("ethereum-mainnet") * @returns Complete NetworkInfo object * @throws {@link CCIPChainNotFoundError} if chain is not found * * @example * ```typescript * import { networkInfo } from '@chainlink/ccip-sdk' * * // By chain name * const sepolia = networkInfo('ethereum-testnet-sepolia') * console.log('Selector:', sepolia.chainSelector) * * // By chain selector * const fuji = networkInfo(14767482510784806043n) * console.log('Name:', fuji.name) // 'avalanche-testnet-fuji' * * // By chain ID * const mainnet = networkInfo(1) * console.log('Family:', mainnet.family) // 'EVM' * ``` */ export declare const networkInfo: import("micro-memoize").Memoized<(selectorOrIdOrName: bigint | number | string) => NetworkInfo, {}>; export {}; //# sourceMappingURL=networks.d.ts.map