import type { PeerId } from '@libp2p/interface-peer-id'; import type { Components } from '@libp2p/interfaces/components'; import type { SendMessage } from '../index.js'; import { HeartbeatConfig, Network, Pinger } from '../../lib/core_network.js'; export default class Heartbeat { protected networkPeers: Network; private libp2pComponents; protected sendMessage: SendMessage; private stopHeartbeatInterval; private protocolHeartbeat; protected config: HeartbeatConfig; protected pinger: Pinger; constructor(networkPeers: Network, // protected for testing libp2pComponents: Components, sendMessage: SendMessage, environmentId: string, config: HeartbeatConfig); private errHandler; start(): Promise; stop(): void; /** * Attempts to ping another peer. * @param destination id of the node to ping * @returns a Promise of a pingResult object with property `lastSeen < 0` if there were a timeout */ pingNode(destination: PeerId): Promise; /** * Starts the periodic check */ private startHeartbeatInterval; } //# sourceMappingURL=heartbeat.d.ts.map