import type { TopicValidatorResult } from "@libp2p/gossipsub";
import type { PeerId } from "@libp2p/interface";
import { CustodyIndex, Status } from "@lodestar/types";
import { PeerIdStr } from "../util/peerId.js";
import { StrictEventEmitterSingleArg } from "../util/strictEvents.js";
import { PendingGossipsubMessage } from "./processor/types.js";
import { RequestTypedContainer } from "./reqresp/ReqRespBeaconNode.js";
export declare enum NetworkEvent {
    /** A relevant peer has connected or has been re-STATUS'd */
    peerConnected = "peer-manager.peer-connected",
    /** A peer has been disconnected */
    peerDisconnected = "peer-manager.peer-disconnected",
    reqRespRequest = "req-resp.request",
    /** (Network -> App) A gossip message is ready for validation */
    pendingGossipsubMessage = "gossip.pendingGossipsubMessage",
    /** (App -> Network) A gossip message has been validated */
    gossipMessageValidationResult = "gossip.messageValidationResult"
}
export type NetworkEventData = {
    [NetworkEvent.peerConnected]: {
        peer: PeerIdStr;
        status: Status;
        custodyColumns: CustodyIndex[];
        clientAgent: string;
    };
    [NetworkEvent.peerDisconnected]: {
        peer: PeerIdStr;
    };
    [NetworkEvent.reqRespRequest]: {
        request: RequestTypedContainer;
        peer: PeerId;
        peerClient: string;
    };
    [NetworkEvent.pendingGossipsubMessage]: PendingGossipsubMessage;
    [NetworkEvent.gossipMessageValidationResult]: {
        msgId: string;
        propagationSource: PeerIdStr;
        acceptance: TopicValidatorResult;
    };
};
export declare enum EventDirection {
    workerToMain = 0,
    mainToWorker = 1,
    /** Event not emitted through worker boundary */
    none = 2
}
export declare const networkEventDirection: Record<NetworkEvent, EventDirection>;
export type INetworkEventBus = StrictEventEmitterSingleArg<NetworkEventData>;
declare const NetworkEventBus_base: new () => INetworkEventBus;
export declare class NetworkEventBus extends NetworkEventBus_base {
}
export {};
//# sourceMappingURL=events.d.ts.map