@libp2p/interface
Advanced tools
Comparing version 2.4.1 to 2.5.0-23685db5e
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.Libp2PInterface = factory()}(typeof self !== 'undefined' ? self : this, function () { | ||
"use strict";var Libp2PInterface=(()=>{var n=Object.defineProperty;var V=Object.getOwnPropertyDescriptor;var W=Object.getOwnPropertyNames;var X=Object.prototype.hasOwnProperty;var Y=(t,r)=>{for(var e in r)n(t,e,{get:r[e],enumerable:!0})},Z=(t,r,e,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of W(r))!X.call(t,o)&&o!==e&&n(t,o,{get:()=>r[o],enumerable:!(s=V(r,o))||s.enumerable});return t};var $=t=>Z(n({},"__esModule",{value:!0}),t);var dr={};Y(dr,{AbortError:()=>c,AlreadyStartedError:()=>U,ConnectionClosedError:()=>E,ConnectionClosingError:()=>f,ConnectionFailedError:()=>h,DialError:()=>D,FaultTolerance:()=>i,InvalidCIDError:()=>P,InvalidCryptoExchangeError:()=>l,InvalidMessageError:()=>w,InvalidMultiaddrError:()=>g,InvalidMultihashError:()=>L,InvalidParametersError:()=>u,InvalidPeerIdError:()=>I,InvalidPrivateKeyError:()=>x,InvalidPublicKeyError:()=>m,KEEP_ALIVE:()=>nr,LimitedConnectionError:()=>K,ListenError:()=>N,MuxerClosedError:()=>b,NotFoundError:()=>v,NotStartedError:()=>M,ProtocolError:()=>C,StreamResetError:()=>y,StreamStateError:()=>S,StrictNoSign:()=>ir,StrictSign:()=>ar,TimeoutError:()=>T,TooManyInboundProtocolStreamsError:()=>R,TooManyOutboundProtocolStreamsError:()=>_,TopicValidatorResult:()=>a,TypedEventEmitter:()=>O,UnexpectedPeerError:()=>p,UnsupportedKeyTypeError:()=>B,UnsupportedOperationError:()=>d,UnsupportedProtocolError:()=>A,connectionSymbol:()=>q,contentRoutingSymbol:()=>rr,isConnection:()=>k,isPeerId:()=>or,isPrivateKey:()=>tr,isPubSub:()=>cr,isPublicKey:()=>z,isStartable:()=>j,isTransport:()=>pr,peerDiscoverySymbol:()=>er,peerIdSymbol:()=>G,peerRoutingSymbol:()=>sr,pubSubSymbol:()=>H,serviceCapabilities:()=>mr,serviceDependencies:()=>xr,setMaxListeners:()=>F,start:()=>lr,stop:()=>ur,transportSymbol:()=>J});var q=Symbol.for("@libp2p/connection");function k(t){return t!=null&&!!t[q]}var rr=Symbol.for("@libp2p/content-routing");function z(t){return t==null?!1:(t.type==="RSA"||t.type==="Ed25519"||t.type==="secp256k1")&&t.raw instanceof Uint8Array&&typeof t.equals=="function"&&typeof t.toMultihash=="function"&&typeof t.toCID=="function"&&typeof t.verify=="function"}function tr(t){return t==null?!1:(t.type==="RSA"||t.type==="Ed25519"||t.type==="secp256k1")&&z(t.publicKey)&&t.raw instanceof Uint8Array&&typeof t.equals=="function"&&typeof t.sign=="function"}var er=Symbol.for("@libp2p/peer-discovery");var G=Symbol.for("@libp2p/peer-id");function or(t){return!!t?.[G]}var sr=Symbol.for("@libp2p/peer-routing");var nr="keep-alive";var ar="StrictSign",ir="StrictNoSign",a;(function(t){t.Accept="accept",t.Ignore="ignore",t.Reject="reject"})(a||(a={}));var H=Symbol.for("@libp2p/pubsub");function cr(t){return!!t?.[H]}var J=Symbol.for("@libp2p/transport");function pr(t){return t!=null&&!!t[J]}var i;(function(t){t[t.FATAL_ALL=0]="FATAL_ALL",t[t.NO_FATAL=1]="NO_FATAL"})(i||(i={}));var c=class extends Error{static name="AbortError";constructor(r="The operation was aborted"){super(r),this.name="AbortError"}},p=class extends Error{static name="UnexpectedPeerError";constructor(r="Unexpected Peer"){super(r),this.name="UnexpectedPeerError"}},l=class extends Error{static name="InvalidCryptoExchangeError";constructor(r="Invalid crypto exchange"){super(r),this.name="InvalidCryptoExchangeError"}},u=class extends Error{static name="InvalidParametersError";constructor(r="Invalid parameters"){super(r),this.name="InvalidParametersError"}},m=class extends Error{static name="InvalidPublicKeyError";constructor(r="Invalid public key"){super(r),this.name="InvalidPublicKeyError"}},x=class extends Error{static name="InvalidPrivateKeyError";constructor(r="Invalid private key"){super(r),this.name="InvalidPrivateKeyError"}},d=class extends Error{static name="UnsupportedOperationError";constructor(r="Unsupported operation"){super(r),this.name="UnsupportedOperationError"}},f=class extends Error{static name="ConnectionClosingError";constructor(r="The connection is closing"){super(r),this.name="ConnectionClosingError"}},E=class extends Error{static name="ConnectionClosedError";constructor(r="The connection is closed"){super(r),this.name="ConnectionClosedError"}},h=class extends Error{static name="ConnectionFailedError";constructor(r="Connection failed"){super(r),this.name="ConnectionFailedError"}},b=class extends Error{static name="MuxerClosedError";constructor(r="The muxer is closed"){super(r),this.name="MuxerClosedError"}},y=class extends Error{static name="StreamResetError";constructor(r="The stream has been reset"){super(r),this.name="StreamResetError"}},S=class extends Error{static name="StreamStateError";constructor(r="The stream is in an invalid state"){super(r),this.name="StreamStateError"}},v=class extends Error{static name="NotFoundError";constructor(r="Not found"){super(r),this.name="NotFoundError"}},I=class extends Error{static name="InvalidPeerIdError";constructor(r="Invalid PeerID"){super(r),this.name="InvalidPeerIdError"}},g=class extends Error{static name="InvalidMultiaddrError";constructor(r="Invalid multiaddr"){super(r),this.name="InvalidMultiaddrError"}},P=class extends Error{static name="InvalidCIDError";constructor(r="Invalid CID"){super(r),this.name="InvalidCIDError"}},L=class extends Error{static name="InvalidMultihashError";constructor(r="Invalid Multihash"){super(r),this.name="InvalidMultihashError"}},A=class extends Error{static name="UnsupportedProtocolError";constructor(r="Unsupported protocol error"){super(r),this.name="UnsupportedProtocolError"}},w=class extends Error{static name="InvalidMessageError";constructor(r="Invalid message"){super(r),this.name="InvalidMessageError"}},C=class extends Error{static name="ProtocolError";constructor(r="Protocol error"){super(r),this.name="ProtocolError"}},T=class extends Error{static name="TimeoutError";constructor(r="Timed out"){super(r),this.name="TimeoutError"}},M=class extends Error{static name="NotStartedError";constructor(r="Not started"){super(r),this.name="NotStartedError"}},U=class extends Error{static name="AlreadyStartedError";constructor(r="Already started"){super(r),this.name="AlreadyStartedError"}},D=class extends Error{static name="DialError";constructor(r="Dial error"){super(r),this.name="DialError"}},N=class extends Error{static name="ListenError";constructor(r="Listen error"){super(r),this.name="ListenError"}},K=class extends Error{static name="LimitedConnectionError";constructor(r="Limited connection"){super(r),this.name="LimitedConnectionError"}},R=class extends Error{static name="TooManyInboundProtocolStreamsError";constructor(r="Too many inbound protocol streams"){super(r),this.name="TooManyInboundProtocolStreamsError"}},_=class extends Error{static name="TooManyOutboundProtocolStreamsError";constructor(r="Too many outbound protocol streams"){super(r),this.name="TooManyOutboundProtocolStreamsError"}},B=class extends Error{static name="UnsupportedKeyTypeError";constructor(r="Unsupported key type"){super(r),this.name="UnsupportedKeyTypeError"}};var F=(t,...r)=>{try{[...r]}catch{}};var O=class extends EventTarget{#r=new Map;constructor(){super(),F(1/0,this)}listenerCount(r){let e=this.#r.get(r);return e==null?0:e.length}addEventListener(r,e,s){super.addEventListener(r,e,s);let o=this.#r.get(r);o==null&&(o=[],this.#r.set(r,o)),o.push({callback:e,once:(s!==!0&&s!==!1&&s?.once)??!1})}removeEventListener(r,e,s){super.removeEventListener(r.toString(),e??null,s);let o=this.#r.get(r);o!=null&&(o=o.filter(({callback:Q})=>Q!==e),this.#r.set(r,o))}dispatchEvent(r){let e=super.dispatchEvent(r),s=this.#r.get(r.type);return s==null||(s=s.filter(({once:o})=>!o),this.#r.set(r.type,s)),e}safeDispatchEvent(r,e={}){return this.dispatchEvent(new CustomEvent(r,e))}};function j(t){return t!=null&&typeof t.start=="function"&&typeof t.stop=="function"}async function lr(...t){let r=[];for(let e of t)j(e)&&r.push(e);await Promise.all(r.map(async e=>{e.beforeStart!=null&&await e.beforeStart()})),await Promise.all(r.map(async e=>{await e.start()})),await Promise.all(r.map(async e=>{e.afterStart!=null&&await e.afterStart()}))}async function ur(...t){let r=[];for(let e of t)j(e)&&r.push(e);await Promise.all(r.map(async e=>{e.beforeStop!=null&&await e.beforeStop()})),await Promise.all(r.map(async e=>{await e.stop()})),await Promise.all(r.map(async e=>{e.afterStop!=null&&await e.afterStop()}))}var mr=Symbol.for("@libp2p/service-capabilities"),xr=Symbol.for("@libp2p/service-dependencies");return $(dr);})(); | ||
"use strict";var Libp2PInterface=(()=>{var n=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var W=Object.prototype.hasOwnProperty;var X=(t,r)=>{for(var e in r)n(t,e,{get:r[e],enumerable:!0})},Y=(t,r,e,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of V(r))!W.call(t,o)&&o!==e&&n(t,o,{get:()=>r[o],enumerable:!(s=Q(r,o))||s.enumerable});return t};var Z=t=>Y(n({},"__esModule",{value:!0}),t);var dr={};X(dr,{AbortError:()=>c,AlreadyStartedError:()=>U,ConnectionClosedError:()=>E,ConnectionClosingError:()=>f,ConnectionFailedError:()=>h,DialError:()=>D,FaultTolerance:()=>i,InvalidCIDError:()=>P,InvalidCryptoExchangeError:()=>l,InvalidMessageError:()=>w,InvalidMultiaddrError:()=>g,InvalidMultihashError:()=>A,InvalidParametersError:()=>u,InvalidPeerIdError:()=>I,InvalidPrivateKeyError:()=>x,InvalidPublicKeyError:()=>m,KEEP_ALIVE:()=>sr,LimitedConnectionError:()=>K,ListenError:()=>N,MuxerClosedError:()=>b,NotFoundError:()=>v,NotStartedError:()=>M,ProtocolError:()=>C,StreamResetError:()=>y,StreamStateError:()=>S,StrictNoSign:()=>ar,StrictSign:()=>nr,TimeoutError:()=>T,TooManyInboundProtocolStreamsError:()=>R,TooManyOutboundProtocolStreamsError:()=>_,TopicValidatorResult:()=>a,TypedEventEmitter:()=>F,UnexpectedPeerError:()=>p,UnsupportedKeyTypeError:()=>B,UnsupportedOperationError:()=>d,UnsupportedProtocolError:()=>L,connectionSymbol:()=>j,contentRoutingSymbol:()=>k,isConnection:()=>$,isPeerId:()=>er,isPrivateKey:()=>rr,isPubSub:()=>ir,isPublicKey:()=>q,isStartable:()=>O,isTransport:()=>cr,peerDiscoverySymbol:()=>tr,peerIdSymbol:()=>z,peerRoutingSymbol:()=>or,pubSubSymbol:()=>G,serviceCapabilities:()=>mr,serviceDependencies:()=>xr,setMaxListeners:()=>pr,start:()=>lr,stop:()=>ur,transportSymbol:()=>H});var j=Symbol.for("@libp2p/connection");function $(t){return t!=null&&!!t[j]}var k=Symbol.for("@libp2p/content-routing");function q(t){return t==null?!1:(t.type==="RSA"||t.type==="Ed25519"||t.type==="secp256k1")&&t.raw instanceof Uint8Array&&typeof t.equals=="function"&&typeof t.toMultihash=="function"&&typeof t.toCID=="function"&&typeof t.verify=="function"}function rr(t){return t==null?!1:(t.type==="RSA"||t.type==="Ed25519"||t.type==="secp256k1")&&q(t.publicKey)&&t.raw instanceof Uint8Array&&typeof t.equals=="function"&&typeof t.sign=="function"}var tr=Symbol.for("@libp2p/peer-discovery");var z=Symbol.for("@libp2p/peer-id");function er(t){return!!t?.[z]}var or=Symbol.for("@libp2p/peer-routing");var sr="keep-alive";var nr="StrictSign",ar="StrictNoSign",a;(function(t){t.Accept="accept",t.Ignore="ignore",t.Reject="reject"})(a||(a={}));var G=Symbol.for("@libp2p/pubsub");function ir(t){return!!t?.[G]}var H=Symbol.for("@libp2p/transport");function cr(t){return t!=null&&!!t[H]}var i;(function(t){t[t.FATAL_ALL=0]="FATAL_ALL",t[t.NO_FATAL=1]="NO_FATAL"})(i||(i={}));var c=class extends Error{static name="AbortError";constructor(r="The operation was aborted"){super(r),this.name="AbortError"}},p=class extends Error{static name="UnexpectedPeerError";constructor(r="Unexpected Peer"){super(r),this.name="UnexpectedPeerError"}},l=class extends Error{static name="InvalidCryptoExchangeError";constructor(r="Invalid crypto exchange"){super(r),this.name="InvalidCryptoExchangeError"}},u=class extends Error{static name="InvalidParametersError";constructor(r="Invalid parameters"){super(r),this.name="InvalidParametersError"}},m=class extends Error{static name="InvalidPublicKeyError";constructor(r="Invalid public key"){super(r),this.name="InvalidPublicKeyError"}},x=class extends Error{static name="InvalidPrivateKeyError";constructor(r="Invalid private key"){super(r),this.name="InvalidPrivateKeyError"}},d=class extends Error{static name="UnsupportedOperationError";constructor(r="Unsupported operation"){super(r),this.name="UnsupportedOperationError"}},f=class extends Error{static name="ConnectionClosingError";constructor(r="The connection is closing"){super(r),this.name="ConnectionClosingError"}},E=class extends Error{static name="ConnectionClosedError";constructor(r="The connection is closed"){super(r),this.name="ConnectionClosedError"}},h=class extends Error{static name="ConnectionFailedError";constructor(r="Connection failed"){super(r),this.name="ConnectionFailedError"}},b=class extends Error{static name="MuxerClosedError";constructor(r="The muxer is closed"){super(r),this.name="MuxerClosedError"}},y=class extends Error{static name="StreamResetError";constructor(r="The stream has been reset"){super(r),this.name="StreamResetError"}},S=class extends Error{static name="StreamStateError";constructor(r="The stream is in an invalid state"){super(r),this.name="StreamStateError"}},v=class extends Error{static name="NotFoundError";constructor(r="Not found"){super(r),this.name="NotFoundError"}},I=class extends Error{static name="InvalidPeerIdError";constructor(r="Invalid PeerID"){super(r),this.name="InvalidPeerIdError"}},g=class extends Error{static name="InvalidMultiaddrError";constructor(r="Invalid multiaddr"){super(r),this.name="InvalidMultiaddrError"}},P=class extends Error{static name="InvalidCIDError";constructor(r="Invalid CID"){super(r),this.name="InvalidCIDError"}},A=class extends Error{static name="InvalidMultihashError";constructor(r="Invalid Multihash"){super(r),this.name="InvalidMultihashError"}},L=class extends Error{static name="UnsupportedProtocolError";constructor(r="Unsupported protocol error"){super(r),this.name="UnsupportedProtocolError"}},w=class extends Error{static name="InvalidMessageError";constructor(r="Invalid message"){super(r),this.name="InvalidMessageError"}},C=class extends Error{static name="ProtocolError";constructor(r="Protocol error"){super(r),this.name="ProtocolError"}},T=class extends Error{static name="TimeoutError";constructor(r="Timed out"){super(r),this.name="TimeoutError"}},M=class extends Error{static name="NotStartedError";constructor(r="Not started"){super(r),this.name="NotStartedError"}},U=class extends Error{static name="AlreadyStartedError";constructor(r="Already started"){super(r),this.name="AlreadyStartedError"}},D=class extends Error{static name="DialError";constructor(r="Dial error"){super(r),this.name="DialError"}},N=class extends Error{static name="ListenError";constructor(r="Listen error"){super(r),this.name="ListenError"}},K=class extends Error{static name="LimitedConnectionError";constructor(r="Limited connection"){super(r),this.name="LimitedConnectionError"}},R=class extends Error{static name="TooManyInboundProtocolStreamsError";constructor(r="Too many inbound protocol streams"){super(r),this.name="TooManyInboundProtocolStreamsError"}},_=class extends Error{static name="TooManyOutboundProtocolStreamsError";constructor(r="Too many outbound protocol streams"){super(r),this.name="TooManyOutboundProtocolStreamsError"}},B=class extends Error{static name="UnsupportedKeyTypeError";constructor(r="Unsupported key type"){super(r),this.name="UnsupportedKeyTypeError"}};function pr(){}var F=class extends EventTarget{#r=new Map;constructor(){super()}listenerCount(r){let e=this.#r.get(r);return e==null?0:e.length}addEventListener(r,e,s){super.addEventListener(r,e,s);let o=this.#r.get(r);o==null&&(o=[],this.#r.set(r,o)),o.push({callback:e,once:(s!==!0&&s!==!1&&s?.once)??!1})}removeEventListener(r,e,s){super.removeEventListener(r.toString(),e??null,s);let o=this.#r.get(r);o!=null&&(o=o.filter(({callback:J})=>J!==e),this.#r.set(r,o))}dispatchEvent(r){let e=super.dispatchEvent(r),s=this.#r.get(r.type);return s==null||(s=s.filter(({once:o})=>!o),this.#r.set(r.type,s)),e}safeDispatchEvent(r,e={}){return this.dispatchEvent(new CustomEvent(r,e))}};function O(t){return t!=null&&typeof t.start=="function"&&typeof t.stop=="function"}async function lr(...t){let r=[];for(let e of t)O(e)&&r.push(e);await Promise.all(r.map(async e=>{e.beforeStart!=null&&await e.beforeStart()})),await Promise.all(r.map(async e=>{await e.start()})),await Promise.all(r.map(async e=>{e.afterStart!=null&&await e.afterStart()}))}async function ur(...t){let r=[];for(let e of t)O(e)&&r.push(e);await Promise.all(r.map(async e=>{e.beforeStop!=null&&await e.beforeStop()})),await Promise.all(r.map(async e=>{await e.stop()})),await Promise.all(r.map(async e=>{e.afterStop!=null&&await e.afterStop()}))}var mr=Symbol.for("@libp2p/service-capabilities"),xr=Symbol.for("@libp2p/service-dependencies");return Z(dr);})(); | ||
return Libp2PInterface})); |
/// <reference types="node" /> | ||
import { setMaxListeners as nodeSetMaxListeners } from 'events'; | ||
import { setMaxListeners as nodeSetMaxListeners } from 'node:events'; | ||
/** | ||
@@ -4,0 +4,0 @@ * Create a setMaxListeners that doesn't break browser usage |
@@ -1,2 +0,2 @@ | ||
import { setMaxListeners as nodeSetMaxListeners } from 'events'; | ||
import { setMaxListeners as nodeSetMaxListeners } from 'node:events'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Create a setMaxListeners that doesn't break browser usage |
@@ -16,15 +16,15 @@ /** | ||
*/ | ||
import type { Connection, NewStreamOptions, Stream } from './connection/index.js'; | ||
import type { ContentRouting } from './content-routing/index.js'; | ||
import type { Connection, NewStreamOptions, Stream } from './connection.js'; | ||
import type { ContentRouting } from './content-routing.js'; | ||
import type { TypedEventTarget } from './event-target.js'; | ||
import type { Ed25519PublicKey, PublicKey, RSAPublicKey, Secp256k1PublicKey } from './keys/index.js'; | ||
import type { Metrics } from './metrics/index.js'; | ||
import type { Ed25519PeerId, PeerId, RSAPeerId, Secp256k1PeerId, URLPeerId } from './peer-id/index.js'; | ||
import type { PeerInfo } from './peer-info/index.js'; | ||
import type { PeerRouting } from './peer-routing/index.js'; | ||
import type { Address, Peer, PeerStore } from './peer-store/index.js'; | ||
import type { Ed25519PublicKey, PublicKey, RSAPublicKey, Secp256k1PublicKey } from './keys.js'; | ||
import type { Metrics } from './metrics.js'; | ||
import type { Ed25519PeerId, PeerId, RSAPeerId, Secp256k1PeerId, URLPeerId } from './peer-id.js'; | ||
import type { PeerInfo } from './peer-info.js'; | ||
import type { PeerRouting } from './peer-routing.js'; | ||
import type { Address, Peer, PeerStore } from './peer-store.js'; | ||
import type { Startable } from './startable.js'; | ||
import type { StreamHandler, StreamHandlerOptions } from './stream-handler/index.js'; | ||
import type { Topology } from './topology/index.js'; | ||
import type { Listener, OutboundConnectionUpgradeEvents } from './transport/index.js'; | ||
import type { StreamHandler, StreamHandlerOptions } from './stream-handler.js'; | ||
import type { Topology } from './topology.js'; | ||
import type { Listener, OutboundConnectionUpgradeEvents } from './transport.js'; | ||
import type { Multiaddr } from '@multiformats/multiaddr'; | ||
@@ -554,3 +554,4 @@ import type { ProgressOptions, ProgressEvent } from 'progress-events'; | ||
* | ||
* In the event of a new handler for the same protocol being added, the first one is discarded. | ||
* In the event of a new handler for the same protocol being added and error | ||
* will be thrown. Pass `force: true` to override this. | ||
* | ||
@@ -650,2 +651,6 @@ * @example | ||
version: string; | ||
/** | ||
* A string that contains information about the implementation and runtime | ||
*/ | ||
userAgent: string; | ||
} | ||
@@ -722,20 +727,19 @@ /** | ||
export declare const serviceDependencies: unique symbol; | ||
export * from './connection/index.js'; | ||
export * from './connection-encrypter/index.js'; | ||
export * from './connection-gater/index.js'; | ||
export * from './content-routing/index.js'; | ||
export * from './keys/index.js'; | ||
export * from './metrics/index.js'; | ||
export * from './peer-discovery/index.js'; | ||
export * from './peer-id/index.js'; | ||
export * from './peer-info/index.js'; | ||
export * from './peer-routing/index.js'; | ||
export * from './peer-store/index.js'; | ||
export * from './peer-store/tags.js'; | ||
export * from './pubsub/index.js'; | ||
export * from './record/index.js'; | ||
export * from './stream-handler/index.js'; | ||
export * from './stream-muxer/index.js'; | ||
export * from './topology/index.js'; | ||
export * from './transport/index.js'; | ||
export * from './connection.js'; | ||
export * from './connection-encrypter.js'; | ||
export * from './connection-gater.js'; | ||
export * from './content-routing.js'; | ||
export * from './keys.js'; | ||
export * from './metrics.js'; | ||
export * from './peer-discovery.js'; | ||
export * from './peer-id.js'; | ||
export * from './peer-info.js'; | ||
export * from './peer-routing.js'; | ||
export * from './peer-store.js'; | ||
export * from './pubsub.js'; | ||
export * from './record.js'; | ||
export * from './stream-handler.js'; | ||
export * from './stream-muxer.js'; | ||
export * from './topology.js'; | ||
export * from './transport.js'; | ||
export * from './errors.js'; | ||
@@ -742,0 +746,0 @@ export * from './event-target.js'; |
@@ -32,20 +32,19 @@ /** | ||
export const serviceDependencies = Symbol.for('@libp2p/service-dependencies'); | ||
export * from './connection/index.js'; | ||
export * from './connection-encrypter/index.js'; | ||
export * from './connection-gater/index.js'; | ||
export * from './content-routing/index.js'; | ||
export * from './keys/index.js'; | ||
export * from './metrics/index.js'; | ||
export * from './peer-discovery/index.js'; | ||
export * from './peer-id/index.js'; | ||
export * from './peer-info/index.js'; | ||
export * from './peer-routing/index.js'; | ||
export * from './peer-store/index.js'; | ||
export * from './peer-store/tags.js'; | ||
export * from './pubsub/index.js'; | ||
export * from './record/index.js'; | ||
export * from './stream-handler/index.js'; | ||
export * from './stream-muxer/index.js'; | ||
export * from './topology/index.js'; | ||
export * from './transport/index.js'; | ||
export * from './connection.js'; | ||
export * from './connection-encrypter.js'; | ||
export * from './connection-gater.js'; | ||
export * from './content-routing.js'; | ||
export * from './keys.js'; | ||
export * from './metrics.js'; | ||
export * from './peer-discovery.js'; | ||
export * from './peer-id.js'; | ||
export * from './peer-info.js'; | ||
export * from './peer-routing.js'; | ||
export * from './peer-store.js'; | ||
export * from './pubsub.js'; | ||
export * from './record.js'; | ||
export * from './stream-handler.js'; | ||
export * from './stream-muxer.js'; | ||
export * from './topology.js'; | ||
export * from './transport.js'; | ||
export * from './errors.js'; | ||
@@ -52,0 +51,0 @@ export * from './event-target.js'; |
{ | ||
"name": "@libp2p/interface", | ||
"version": "2.4.1", | ||
"version": "2.5.0-23685db5e", | ||
"description": "The interface implemented by a libp2p node", | ||
@@ -62,3 +62,3 @@ "license": "Apache-2.0 OR MIT", | ||
"browser": { | ||
"events": "./dist/src/events.browser.js" | ||
"./dist/src/events.js": "./dist/src/events.browser.js" | ||
}, | ||
@@ -65,0 +65,0 @@ "react-native": { |
@@ -1,2 +0,2 @@ | ||
import { setMaxListeners as nodeSetMaxListeners } from 'events' | ||
import { setMaxListeners as nodeSetMaxListeners } from 'node:events' | ||
@@ -3,0 +3,0 @@ /** |
@@ -17,15 +17,15 @@ /** | ||
import type { Connection, NewStreamOptions, Stream } from './connection/index.js' | ||
import type { ContentRouting } from './content-routing/index.js' | ||
import type { Connection, NewStreamOptions, Stream } from './connection.js' | ||
import type { ContentRouting } from './content-routing.js' | ||
import type { TypedEventTarget } from './event-target.js' | ||
import type { Ed25519PublicKey, PublicKey, RSAPublicKey, Secp256k1PublicKey } from './keys/index.js' | ||
import type { Metrics } from './metrics/index.js' | ||
import type { Ed25519PeerId, PeerId, RSAPeerId, Secp256k1PeerId, URLPeerId } from './peer-id/index.js' | ||
import type { PeerInfo } from './peer-info/index.js' | ||
import type { PeerRouting } from './peer-routing/index.js' | ||
import type { Address, Peer, PeerStore } from './peer-store/index.js' | ||
import type { Ed25519PublicKey, PublicKey, RSAPublicKey, Secp256k1PublicKey } from './keys.js' | ||
import type { Metrics } from './metrics.js' | ||
import type { Ed25519PeerId, PeerId, RSAPeerId, Secp256k1PeerId, URLPeerId } from './peer-id.js' | ||
import type { PeerInfo } from './peer-info.js' | ||
import type { PeerRouting } from './peer-routing.js' | ||
import type { Address, Peer, PeerStore } from './peer-store.js' | ||
import type { Startable } from './startable.js' | ||
import type { StreamHandler, StreamHandlerOptions } from './stream-handler/index.js' | ||
import type { Topology } from './topology/index.js' | ||
import type { Listener, OutboundConnectionUpgradeEvents } from './transport/index.js' | ||
import type { StreamHandler, StreamHandlerOptions } from './stream-handler.js' | ||
import type { Topology } from './topology.js' | ||
import type { Listener, OutboundConnectionUpgradeEvents } from './transport.js' | ||
import type { Multiaddr } from '@multiformats/multiaddr' | ||
@@ -624,3 +624,4 @@ import type { ProgressOptions, ProgressEvent } from 'progress-events' | ||
* | ||
* In the event of a new handler for the same protocol being added, the first one is discarded. | ||
* In the event of a new handler for the same protocol being added and error | ||
* will be thrown. Pass `force: true` to override this. | ||
* | ||
@@ -728,2 +729,7 @@ * @example | ||
version: string | ||
/** | ||
* A string that contains information about the implementation and runtime | ||
*/ | ||
userAgent: string | ||
} | ||
@@ -808,20 +814,19 @@ | ||
export * from './connection/index.js' | ||
export * from './connection-encrypter/index.js' | ||
export * from './connection-gater/index.js' | ||
export * from './content-routing/index.js' | ||
export * from './keys/index.js' | ||
export * from './metrics/index.js' | ||
export * from './peer-discovery/index.js' | ||
export * from './peer-id/index.js' | ||
export * from './peer-info/index.js' | ||
export * from './peer-routing/index.js' | ||
export * from './peer-store/index.js' | ||
export * from './peer-store/tags.js' | ||
export * from './pubsub/index.js' | ||
export * from './record/index.js' | ||
export * from './stream-handler/index.js' | ||
export * from './stream-muxer/index.js' | ||
export * from './topology/index.js' | ||
export * from './transport/index.js' | ||
export * from './connection.js' | ||
export * from './connection-encrypter.js' | ||
export * from './connection-gater.js' | ||
export * from './content-routing.js' | ||
export * from './keys.js' | ||
export * from './metrics.js' | ||
export * from './peer-discovery.js' | ||
export * from './peer-id.js' | ||
export * from './peer-info.js' | ||
export * from './peer-routing.js' | ||
export * from './peer-store.js' | ||
export * from './pubsub.js' | ||
export * from './record.js' | ||
export * from './stream-handler.js' | ||
export * from './stream-muxer.js' | ||
export * from './topology.js' | ||
export * from './transport.js' | ||
export * from './errors.js' | ||
@@ -828,0 +833,0 @@ export * from './event-target.js' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
310616
118
7668
1
1