import { EventEmitter } from "node:events";
export { NetworkEvent };
var NetworkEvent;
(function (NetworkEvent) {
    /** A relevant peer has connected or has been re-STATUS'd */
    NetworkEvent["peerConnected"] = "peer-manager.peer-connected";
    /** A peer has been disconnected */
    NetworkEvent["peerDisconnected"] = "peer-manager.peer-disconnected";
    NetworkEvent["reqRespRequest"] = "req-resp.request";
    // Network processor events
    /** (Network -> App) A gossip message is ready for validation */
    NetworkEvent["pendingGossipsubMessage"] = "gossip.pendingGossipsubMessage";
    /** (App -> Network) A gossip message has been validated */
    NetworkEvent["gossipMessageValidationResult"] = "gossip.messageValidationResult";
})(NetworkEvent || (NetworkEvent = {}));
export { EventDirection };
var EventDirection;
(function (EventDirection) {
    EventDirection[EventDirection["workerToMain"] = 0] = "workerToMain";
    EventDirection[EventDirection["mainToWorker"] = 1] = "mainToWorker";
    /** Event not emitted through worker boundary */
    EventDirection[EventDirection["none"] = 2] = "none";
})(EventDirection || (EventDirection = {}));
export const networkEventDirection = {
    [NetworkEvent.peerConnected]: EventDirection.workerToMain,
    [NetworkEvent.peerDisconnected]: EventDirection.workerToMain,
    [NetworkEvent.reqRespRequest]: EventDirection.none, // Only used internally in NetworkCore
    [NetworkEvent.pendingGossipsubMessage]: EventDirection.workerToMain,
    [NetworkEvent.gossipMessageValidationResult]: EventDirection.mainToWorker,
};
export class NetworkEventBus extends EventEmitter {
}
//# sourceMappingURL=events.js.map