import EventEmitter from "node:events";
import { PrivateKey } from "@libp2p/interface";
import { StrictEventEmitter } from "strict-event-emitter-types";
import { ENR, ENRData, SignableENR } from "@chainsafe/enr";
import { BeaconConfig } from "@lodestar/config";
import { LoggerNode } from "@lodestar/logger/node";
import { NetworkCoreMetrics } from "../core/metrics.js";
import { Discv5WorkerApi, LodestarDiscv5Opts } from "./types.js";
export type Discv5Opts = {
    privateKey: PrivateKey;
    discv5: LodestarDiscv5Opts;
    logger: LoggerNode;
    config: BeaconConfig;
    genesisTime: number;
    metrics?: NetworkCoreMetrics;
};
export type Discv5Events = {
    discovered: (enr: ENR) => void;
};
declare const Discv5Worker_base: new () => StrictEventEmitter<EventEmitter<[never]>, Discv5Events>;
/**
 * Wrapper class abstracting the details of discv5 worker instantiation and message-passing
 */
export declare class Discv5Worker extends Discv5Worker_base {
    private readonly opts;
    private readonly workerApi;
    private readonly subscription;
    private closed;
    constructor(opts: Discv5Opts, workerApi: Discv5WorkerApi);
    static init(opts: Discv5Opts): Promise<Discv5Worker>;
    close(): Promise<void>;
    onDiscovered(obj: ENRData): void;
    enr(): Promise<SignableENR>;
    setEnrValue(key: string, value: Uint8Array): Promise<void>;
    kadValues(): Promise<ENR[]>;
    discoverKadValues(): Promise<void>;
    findRandomNode(): Promise<ENR[]>;
    scrapeMetrics(): Promise<string>;
    writeProfile(durationMs: number, dirpath: string): Promise<string>;
    writeHeapSnapshot(prefix: string, dirpath: string): Promise<string>;
    private decodeEnrs;
    private decodeEnr;
}
export {};
//# sourceMappingURL=index.d.ts.map