/** * Network scanning module for g1-papi * * Provides functions to discover and monitor Duniter network nodes, * check their health, and calculate consensus. * * @example * ```ts * import { scanNetwork, checkRpcHealth } from 'g1-papi/network' * * // Full network scan with discovery * const result = await scanNetwork('gdev') * console.log(`Best RPC: ${result.bestRpc?.endpoint}`) * * // Individual health check * const node = await checkRpcHealth('wss://gdev.cgeek.fr') * if (node.status === 'healthy') { * console.log(`Latency: ${node.latency}ms`) * } * ``` * * @module g1-papi/network */ export { calculateConsensus, selectBestEndpoint, sortNodesByQuality, } from './consensus'; export { discoverPeers, fetchPeerings, filterEndpoints, normalizeEndpoint, reduceEndpoints, uniqueEndpoints, } from './discovery'; export { checkDatapodHealth, checkRpcHealth, checkSquidHealth, } from './health'; export { findFastestEndpoint, quickScan, scanNetwork, } from './scanner'; export type { ConsensusLevel, ConsensusResult, NetworkNode, NodeStatus, NodeType, Peering, ScanOptions, ScanResult, } from './types';