export { Libp2pError };
var Libp2pError;
(function (Libp2pError) {
    // https://github.com/libp2p/js-libp2p/blob/b936324a92038d9447983bb11db623c1b5a17a76/packages/libp2p/src/errors.ts#L6
    Libp2pError["MissingServiceError"] = "MissingServiceError";
    Libp2pError["UnmetServiceDependenciesError"] = "UnmetServiceDependenciesError";
    Libp2pError["NoContentRoutersError"] = "NoContentRoutersError";
    Libp2pError["NoPeerRoutersError"] = "NoPeerRoutersError";
    Libp2pError["QueriedForSelfError"] = "QueriedForSelfError";
    Libp2pError["UnhandledProtocolError"] = "UnhandledProtocolError";
    Libp2pError["DuplicateProtocolHandlerError"] = "DuplicateProtocolHandlerError";
    Libp2pError["DialDeniedError"] = "DialDeniedError";
    Libp2pError["UnsupportedListenAddressError"] = "UnsupportedListenAddressError";
    Libp2pError["UnsupportedListenAddressesError"] = "UnsupportedListenAddressesError";
    Libp2pError["NoValidAddressesError"] = "NoValidAddressesError";
    Libp2pError["ConnectionInterceptedError"] = "ConnectionInterceptedError";
    Libp2pError["ConnectionDeniedError"] = "ConnectionDeniedError";
    Libp2pError["MuxerUnavailableError"] = "MuxerUnavailableError";
    Libp2pError["EncryptionFailedError"] = "EncryptionFailedError";
    Libp2pError["TransportUnavailableError"] = "TransportUnavailableError";
    // https://github.com/libp2p/js-libp2p/blob/b936324a92038d9447983bb11db623c1b5a17a76/packages/interface/src/errors.ts#L6
    Libp2pError["AbortError"] = "AbortError";
    Libp2pError["UnexpectedPeerError"] = "UnexpectedPeerError";
    Libp2pError["InvalidCryptoExchangeError"] = "InvalidCryptoExchangeError";
    Libp2pError["InvalidParametersError"] = "InvalidParametersError";
    Libp2pError["InvalidPublicKeyError"] = "InvalidPublicKeyError";
    Libp2pError["InvalidPrivateKeyError"] = "InvalidPrivateKeyError";
    Libp2pError["UnsupportedOperationError"] = "UnsupportedOperationError";
    Libp2pError["ConnectionClosingError"] = "ConnectionClosingError";
    Libp2pError["ConnectionClosedError"] = "ConnectionClosedError";
    Libp2pError["ConnectionFailedError"] = "ConnectionFailedError";
    Libp2pError["MuxerClosedError"] = "MuxerClosedError";
    Libp2pError["StreamResetError"] = "StreamResetError";
    Libp2pError["StreamStateError"] = "StreamStateError";
    Libp2pError["NotFoundError"] = "NotFoundError";
    Libp2pError["InvalidPeerIdError"] = "InvalidPeerIdError";
    Libp2pError["InvalidMultiaddrError"] = "InvalidMultiaddrError";
    Libp2pError["InvalidCidError"] = "InvalidCIDError";
    Libp2pError["InvalidMultihashError"] = "InvalidMultihashError";
    Libp2pError["UnsupportedProtocolError"] = "UnsupportedProtocolError";
    Libp2pError["InvalidMessageError"] = "InvalidMessageError";
    Libp2pError["ProtocolError"] = "ProtocolError";
    Libp2pError["TimeoutError"] = "TimeoutError";
    Libp2pError["NotStartedError"] = "NotStartedError";
    Libp2pError["AlreadyStartedError"] = "AlreadyStartedError";
    Libp2pError["DialError"] = "DialError";
    Libp2pError["ListenError"] = "ListenError";
    Libp2pError["LimitedConnectionError"] = "LimitedConnectionError";
    Libp2pError["TooManyInboundProtocolStreamsError"] = "TooManyInboundProtocolStreamsError";
    Libp2pError["TooManyOutboundProtocolStreamsError"] = "TooManyOutboundProtocolStreamsError";
    Libp2pError["UnsupportedKeyTypeError"] = "UnsupportedKeyTypeError";
    Libp2pError["OtherError"] = "OtherError";
})(Libp2pError || (Libp2pError = {}));
export function getLibp2pError(error) {
    return Libp2pError[error.name] ?? Libp2pError.OtherError;
}
//# sourceMappingURL=error.js.map