import { EventEmitter } from "node:events"; import type { Authenticator } from "./auth.js"; import { GossipMessage } from "./gossip.js"; export interface GossipUDPConfig { /** The local address to bind to. */ address: string; /** The local port to bind to. */ port: number; } /** * Handles sending and receiving of gossip messages over UDP. * It's essentially the low-level network driver for the gossip protocol. */ export declare class GossipUDP extends EventEmitter { private socket; private readonly config; private readonly auth?; private readonly log; private readonly warnedUnauthorizedPeers; constructor(config: GossipUDPConfig & { auth?: Authenticator; }); /** * Binds the UDP socket and starts listening for messages. */ start(): Promise; /** * Stops the UDP socket. */ stop(): Promise; /** * Sends a gossip message to a target address. * @param message The GossipMessage to send. * @param targetAddress The target IP address. * @param targetPort The target port. */ send(message: GossipMessage, targetAddress: string, targetPort: number): Promise; } //# sourceMappingURL=gossip_udp.d.ts.map