@libp2p/interface 0.1.4 → 0.1.5-dfbe0cc0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,3 @@
1
- # @libp2p/interface <!-- omit in toc -->
2
-
3
1
  [![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
4
2
  [![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
5
3
  [![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)
@@ -7,21 +5,13 @@
7
5
 
8
6
  > The interface implemented by a libp2p node
9
7
 
10
- ## Table of contents <!-- omit in toc -->
11
-
12
- - [Install](#install)
13
- - [Browser `<script>` tag](#browser-script-tag)
14
- - [API Docs](#api-docs)
15
- - [License](#license)
16
- - [Contribution](#contribution)
17
-
18
- ## Install
8
+ # Install
19
9
 
20
10
  ```console
21
11
  $ npm i @libp2p/interface
22
12
  ```
23
13
 
24
- ### Browser `<script>` tag
14
+ ## Browser `<script>` tag
25
15
 
26
16
  Loading this module through a script tag will make it's exports available as `Libp2pInterface` in the global namespace.
27
17
 
@@ -29,17 +19,17 @@ Loading this module through a script tag will make it's exports available as `Li
29
19
  <script src="https://unpkg.com/@libp2p/interface/dist/index.min.js"></script>
30
20
  ```
31
21
 
32
- ## API Docs
22
+ # API Docs
33
23
 
34
24
  - <https://libp2p.github.io/js-libp2p/modules/_libp2p_interface.html>
35
25
 
36
- ## License
26
+ # License
37
27
 
38
28
  Licensed under either of
39
29
 
40
30
  - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
41
31
  - MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
42
32
 
43
- ## Contribution
33
+ # Contribution
44
34
 
45
35
  Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
@@ -0,0 +1,3 @@
1
+ /** Noop for browser compatibility */
2
+ export declare function setMaxListeners(): void;
3
+ //# sourceMappingURL=events.browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.browser.d.ts","sourceRoot":"","sources":["../../src/events.browser.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,wBAAgB,eAAe,IAAK,IAAI,CAAG"}
@@ -0,0 +1,3 @@
1
+ /** Noop for browser compatibility */
2
+ export function setMaxListeners() { }
3
+ //# sourceMappingURL=events.browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.browser.js","sourceRoot":"","sources":["../../src/events.browser.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,MAAM,UAAU,eAAe,KAAW,CAAC"}
@@ -1,3 +1,5 @@
1
+ /// <reference types="node" />
2
+ import { setMaxListeners as nodeSetMaxListeners } from 'events';
1
3
  export interface EventCallback<EventType> {
2
4
  (evt: EventType): void;
3
5
  }
@@ -37,4 +39,5 @@ export declare const CustomEvent: {
37
39
  prototype: CustomEvent<any>;
38
40
  };
39
41
  export { TypedEventEmitter as EventEmitter };
42
+ export declare const setMaxListeners: typeof nodeSetMaxListeners;
40
43
  //# sourceMappingURL=events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/events.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa,CAAC,SAAS;IAAI,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,CAAA;CAAE;AACpE,MAAM,WAAW,WAAW,CAAC,SAAS;IAAI,WAAW,EAAE,aAAa,CAAC,SAAS,CAAC,CAAA;CAAE;AACjF,MAAM,MAAM,YAAY,CAAC,SAAS,IAAI,aAAa,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC,SAAS,CAAC,CAAA;AAOvF;;;;;;;GA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AAM,EAAE,IAAI,EAAE,MAAM,QAAQ,EAAE,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,GAAG,OAAO;CAG1F;AAoBD,eAAO,MAAM,WAAW;;;CAAgD,CAAA;AAGxE,OAAO,EAAE,iBAAiB,IAAI,YAAY,EAAE,CAAA;AAG5C,eAAO,MAAM,eAAe,EAAE,OAAO,mBAMpC,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { setMaxListeners as nodeSetMaxListeners } from 'events';
1
2
  /**
2
3
  * An implementation of a typed event target
3
4
  * etc
@@ -65,4 +66,13 @@ class CustomEventPolyfill extends Event {
65
66
  export const CustomEvent = globalThis.CustomEvent ?? CustomEventPolyfill;
66
67
  // TODO: remove this in v1
67
68
  export { TypedEventEmitter as EventEmitter };
69
+ // create a setMaxListeners that doesn't break browser usage
70
+ export const setMaxListeners = (n, ...eventTargets) => {
71
+ try {
72
+ nodeSetMaxListeners(n, ...eventTargets);
73
+ }
74
+ catch {
75
+ // swallow error, gulp
76
+ }
77
+ };
68
78
  //# sourceMappingURL=events.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/events.ts"],"names":[],"mappings":"AA6BA;;;GAGG;AACH,MAAM,OAAO,iBAAwD,SAAQ,WAAW;IACtF,UAAU,GAAG,IAAI,GAAG,EAAmB,CAAA;IAEvC,aAAa,CAAE,IAAY;QACzB,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QAE3C,IAAI,SAAS,IAAI,IAAI,EAAE;YACrB,OAAO,CAAC,CAAA;SACT;QAED,OAAO,SAAS,CAAC,MAAM,CAAA;IACzB,CAAC;IAGD,gBAAgB,CAAE,IAAY,EAAE,QAA6B,EAAE,OAA2C;QACxG,KAAK,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAA;QAE/C,IAAI,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,GAA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CAAC,CAAA;QACvC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAErC,OAAO,MAAM,CAAA;IACf,CAAC;IAED,iBAAiB,CAAS,IAAoB,EAAE,MAA+B;QAC7E,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAS,IAAc,EAAE,MAAM,CAAC,CAAC,CAAA;IAC5E,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,mBAA6B,SAAQ,KAAK;IAC9C,2FAA2F;IACpF,MAAM,CAAG;IAEhB,YAAa,OAAe,EAAE,IAAgC;QAC5D,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACpB,sCAAsC;QACtC,IAAI,CAAC,MAAM,GAAG,IAAI,EAAE,MAAM,CAAA;IAC5B,CAAC;CACF;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC,WAAW,IAAI,mBAAmB,CAAA;AAExE,0BAA0B;AAC1B,OAAO,EAAE,iBAAiB,IAAI,YAAY,EAAE,CAAA;AAE5C,4DAA4D;AAC5D,MAAM,CAAC,MAAM,eAAe,GAA+B,CAAC,CAAC,EAAE,GAAG,YAAY,EAAE,EAAE;IAChF,IAAI;QACF,mBAAmB,CAAC,CAAC,EAAE,GAAG,YAAY,CAAC,CAAA;KACxC;IAAC,MAAM;QACN,sBAAsB;KACvB;AACH,CAAC,CAAA"}
@@ -87,6 +87,10 @@ export interface IdentifyResult {
87
87
  * If sent by the remote peer this is the deserialized signed peer record
88
88
  */
89
89
  signedPeerRecord?: SignedPeerRecord;
90
+ /**
91
+ * The connection that the identify protocol ran over
92
+ */
93
+ connection: Connection;
90
94
  }
91
95
  /**
92
96
  * Once you have a libp2p instance, you can listen to several events it emits,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,E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C,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACjJ,CAAA"}
@@ -3,7 +3,20 @@ import type { PeerId } from '../peer-id/index.js';
3
3
  export interface Topology {
4
4
  min?: number;
5
5
  max?: number;
6
+ /**
7
+ * If true, invoke `onConnect` for this topology on transient (e.g. short-lived
8
+ * and/or data-limited) connections. (default: false)
9
+ */
10
+ notifyOnTransient?: boolean;
11
+ /**
12
+ * Invoked when a new connection is opened to a peer that supports the
13
+ * registered protocol
14
+ */
6
15
  onConnect?(peerId: PeerId, conn: Connection): void;
16
+ /**
17
+ * Invoked when the last connection to a peer that supports the registered
18
+ * protocol closes
19
+ */
7
20
  onDisconnect?(peerId: PeerId): void;
8
21
  }
9
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/topology/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAEjD,MAAM,WAAW,QAAQ;IACvB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ,SAAS,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAAA;IAClD,YAAY,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CACpC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/topology/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAEjD,MAAM,WAAW,QAAQ;IACvB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAE3B;;;OAGG;IACH,SAAS,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAAA;IAElD;;;OAGG;IACH,YAAY,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CACpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/interface",
3
- "version": "0.1.4",
3
+ "version": "0.1.5-dfbe0cc0",
4
4
  "description": "The interface implemented by a libp2p node",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/master/packages/interface#readme",
@@ -39,6 +39,9 @@
39
39
  "!dist/test",
40
40
  "!**/*.tsbuildinfo"
41
41
  ],
42
+ "browser": {
43
+ "events": "./dist/src/events.browser.js"
44
+ },
42
45
  "exports": {
43
46
  ".": {
44
47
  "types": "./dist/src/index.d.ts",
@@ -174,6 +177,6 @@
174
177
  "it-all": "^3.0.3",
175
178
  "it-drain": "^3.0.3",
176
179
  "sinon": "^17.0.0",
177
- "sinon-ts": "^1.0.0"
180
+ "sinon-ts": "^2.0.0"
178
181
  }
179
182
  }
@@ -0,0 +1,2 @@
1
+ /** Noop for browser compatibility */
2
+ export function setMaxListeners (): void {}
package/src/events.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { setMaxListeners as nodeSetMaxListeners } from 'events'
2
+
1
3
  export interface EventCallback<EventType> { (evt: EventType): void }
2
4
  export interface EventObject<EventType> { handleEvent: EventCallback<EventType> }
3
5
  export type EventHandler<EventType> = EventCallback<EventType> | EventObject<EventType>
@@ -117,3 +119,12 @@ export const CustomEvent = globalThis.CustomEvent ?? CustomEventPolyfill
117
119
 
118
120
  // TODO: remove this in v1
119
121
  export { TypedEventEmitter as EventEmitter }
122
+
123
+ // create a setMaxListeners that doesn't break browser usage
124
+ export const setMaxListeners: typeof nodeSetMaxListeners = (n, ...eventTargets) => {
125
+ try {
126
+ nodeSetMaxListeners(n, ...eventTargets)
127
+ } catch {
128
+ // swallow error, gulp
129
+ }
130
+ }
package/src/index.ts CHANGED
@@ -99,6 +99,11 @@ export interface IdentifyResult {
99
99
  * If sent by the remote peer this is the deserialized signed peer record
100
100
  */
101
101
  signedPeerRecord?: SignedPeerRecord
102
+
103
+ /**
104
+ * The connection that the identify protocol ran over
105
+ */
106
+ connection: Connection
102
107
  }
103
108
 
104
109
  /**
@@ -5,6 +5,21 @@ export interface Topology {
5
5
  min?: number
6
6
  max?: number
7
7
 
8
+ /**
9
+ * If true, invoke `onConnect` for this topology on transient (e.g. short-lived
10
+ * and/or data-limited) connections. (default: false)
11
+ */
12
+ notifyOnTransient?: boolean
13
+
14
+ /**
15
+ * Invoked when a new connection is opened to a peer that supports the
16
+ * registered protocol
17
+ */
8
18
  onConnect?(peerId: PeerId, conn: Connection): void
19
+
20
+ /**
21
+ * Invoked when the last connection to a peer that supports the registered
22
+ * protocol closes
23
+ */
9
24
  onDisconnect?(peerId: PeerId): void
10
25
  }
@@ -1,260 +0,0 @@
1
- {
2
- "Connection": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.Connection.html",
3
- "./connection:Connection": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.Connection.html",
4
- "ConnectionProtector": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.ConnectionProtector.html",
5
- "./connection:ConnectionProtector": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.ConnectionProtector.html",
6
- "ConnectionTimeline": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.ConnectionTimeline.html",
7
- "./connection:ConnectionTimeline": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.ConnectionTimeline.html",
8
- "MultiaddrConnection": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.MultiaddrConnection.html",
9
- "./connection:MultiaddrConnection": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.MultiaddrConnection.html",
10
- "MultiaddrConnectionTimeline": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.MultiaddrConnectionTimeline.html",
11
- "./connection:MultiaddrConnectionTimeline": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.MultiaddrConnectionTimeline.html",
12
- "NewStreamOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.NewStreamOptions.html",
13
- "./connection:NewStreamOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.NewStreamOptions.html",
14
- "Stream": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.Stream.html",
15
- "./connection:Stream": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.Stream.html",
16
- "StreamTimeline": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.StreamTimeline.html",
17
- "./connection:StreamTimeline": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection.StreamTimeline.html",
18
- "ConnectionStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.connection.ConnectionStatus.html",
19
- "./connection:ConnectionStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.connection.ConnectionStatus.html",
20
- "Direction": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.connection.Direction.html",
21
- "./connection:Direction": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.connection.Direction.html",
22
- "ReadStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.connection.ReadStatus.html",
23
- "./connection:ReadStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.connection.ReadStatus.html",
24
- "StreamStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.connection.StreamStatus.html",
25
- "./connection:StreamStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.connection.StreamStatus.html",
26
- "WriteStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.connection.WriteStatus.html",
27
- "./connection:WriteStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.connection.WriteStatus.html",
28
- "symbol": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.connection.symbol.html",
29
- "./connection:symbol": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.connection.symbol.html",
30
- "isConnection": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.connection.isConnection.html",
31
- "./connection:isConnection": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.connection.isConnection.html",
32
- "ConnectionEncrypter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection_encrypter.ConnectionEncrypter.html",
33
- "./connection-encrypter:ConnectionEncrypter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection_encrypter.ConnectionEncrypter.html",
34
- "SecuredConnection": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection_encrypter.SecuredConnection.html",
35
- "./connection-encrypter:SecuredConnection": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection_encrypter.SecuredConnection.html",
36
- "ConnectionGater": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection_gater.ConnectionGater.html",
37
- "./connection-gater:ConnectionGater": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.connection_gater.ConnectionGater.html",
38
- "ContentRouting": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.content_routing.ContentRouting.html",
39
- "./content-routing:ContentRouting": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.content_routing.ContentRouting.html",
40
- "contentRouting": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.content_routing.contentRouting-1.html",
41
- "./content-routing:contentRouting": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.content_routing.contentRouting-1.html",
42
- "AbortError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.errors.AbortError.html",
43
- "./errors:AbortError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.errors.AbortError.html",
44
- "CodeError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.errors.CodeError.html",
45
- "./errors:CodeError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.errors.CodeError.html",
46
- "InvalidCryptoExchangeError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.errors.InvalidCryptoExchangeError.html",
47
- "./errors:InvalidCryptoExchangeError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.errors.InvalidCryptoExchangeError.html",
48
- "InvalidCryptoTransmissionError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.errors.InvalidCryptoTransmissionError.html",
49
- "./errors:InvalidCryptoTransmissionError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.errors.InvalidCryptoTransmissionError.html",
50
- "UnexpectedPeerError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.errors.UnexpectedPeerError.html",
51
- "./errors:UnexpectedPeerError": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.errors.UnexpectedPeerError.html",
52
- "TypedEventEmitter": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.events.TypedEventEmitter.html",
53
- "./events:TypedEventEmitter": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.events.TypedEventEmitter.html",
54
- "EventCallback": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.events.EventCallback.html",
55
- "./events:EventCallback": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.events.EventCallback.html",
56
- "EventObject": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.events.EventObject.html",
57
- "./events:EventObject": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.events.EventObject.html",
58
- "TypedEventTarget": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.events.TypedEventTarget.html",
59
- "./events:TypedEventTarget": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.events.TypedEventTarget.html",
60
- "EventHandler": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.events.EventHandler.html",
61
- "./events:EventHandler": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.events.EventHandler.html",
62
- "CustomEvent": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.events.CustomEvent.html",
63
- "./events:CustomEvent": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.events.CustomEvent.html",
64
- "AbortOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.AbortOptions.html",
65
- ".:AbortOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.AbortOptions.html",
66
- "AddressSorter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.AddressSorter.html",
67
- ".:AddressSorter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.AddressSorter.html",
68
- "IdentifyResult": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.IdentifyResult.html",
69
- ".:IdentifyResult": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.IdentifyResult.html",
70
- "Libp2p": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.Libp2p.html",
71
- ".:Libp2p": "https://libp2p.github.io/js-libp2p/interfaces/libp2p.index.Libp2p.html",
72
- "Libp2pEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.Libp2pEvents.html",
73
- ".:Libp2pEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.Libp2pEvents.html",
74
- "PeerUpdate": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.PeerUpdate.html",
75
- ".:PeerUpdate": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.PeerUpdate.html",
76
- "PendingDial": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.PendingDial.html",
77
- ".:PendingDial": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.PendingDial.html",
78
- "SignedPeerRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.SignedPeerRecord.html",
79
- ".:SignedPeerRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.index.SignedPeerRecord.html",
80
- "PendingDialStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.index.PendingDialStatus.html",
81
- ".:PendingDialStatus": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.index.PendingDialStatus.html",
82
- "RecursivePartial": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.index.RecursivePartial.html",
83
- ".:RecursivePartial": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.index.RecursivePartial.html",
84
- "ServiceMap": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.index.ServiceMap.html",
85
- ".:ServiceMap": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.index.ServiceMap.html",
86
- "KeyChain": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.keychain.KeyChain.html",
87
- "./keychain:KeyChain": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.keychain.KeyChain.html",
88
- "KeyInfo": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.keychain.KeyInfo.html",
89
- "./keychain:KeyInfo": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.keychain.KeyInfo.html",
90
- "PrivateKey": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.keys.PrivateKey.html",
91
- "./keys:PrivateKey": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.keys.PrivateKey.html",
92
- "PublicKey": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.keys.PublicKey.html",
93
- "./keys:PublicKey": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.keys.PublicKey.html",
94
- "KeyType": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.keys.KeyType.html",
95
- "./keys:KeyType": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.keys.KeyType.html",
96
- "Ed25519": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.keys.Ed25519.html",
97
- "./keys:Ed25519": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.keys.Ed25519.html",
98
- "RSA": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.keys.RSA.html",
99
- "./keys:RSA": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.keys.RSA.html",
100
- "secp256k1": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.keys.secp256k1.html",
101
- "./keys:secp256k1": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.keys.secp256k1.html",
102
- "CalculatedMetricOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.CalculatedMetricOptions.html",
103
- "./metrics:CalculatedMetricOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.CalculatedMetricOptions.html",
104
- "Counter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.Counter.html",
105
- "./metrics:Counter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.Counter.html",
106
- "CounterGroup": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.CounterGroup.html",
107
- "./metrics:CounterGroup": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.CounterGroup.html",
108
- "Metric": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.Metric.html",
109
- "./metrics:Metric": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.Metric.html",
110
- "MetricGroup": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.MetricGroup.html",
111
- "./metrics:MetricGroup": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.MetricGroup.html",
112
- "MetricOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.MetricOptions.html",
113
- "./metrics:MetricOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.MetricOptions.html",
114
- "Metrics": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.Metrics.html",
115
- "./metrics:Metrics": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.Metrics.html",
116
- "StopTimer": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.StopTimer.html",
117
- "./metrics:StopTimer": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics.StopTimer.html",
118
- "CalculateMetric": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.metrics.CalculateMetric.html",
119
- "./metrics:CalculateMetric": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.metrics.CalculateMetric.html",
120
- "CreateTrackedMapInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics_tracked_map.CreateTrackedMapInit.html",
121
- "./metrics/tracked-map:CreateTrackedMapInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics_tracked_map.CreateTrackedMapInit.html",
122
- "TrackedMapInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics_tracked_map.TrackedMapInit.html",
123
- "./metrics/tracked-map:TrackedMapInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.metrics_tracked_map.TrackedMapInit.html",
124
- "trackedMap": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.metrics_tracked_map.trackedMap.html",
125
- "./metrics/tracked-map:trackedMap": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.metrics_tracked_map.trackedMap.html",
126
- "PeerDiscovery": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_discovery.PeerDiscovery.html",
127
- "./peer-discovery:PeerDiscovery": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_discovery.PeerDiscovery.html",
128
- "PeerDiscoveryEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_discovery.PeerDiscoveryEvents.html",
129
- "./peer-discovery:PeerDiscoveryEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_discovery.PeerDiscoveryEvents.html",
130
- "peerDiscovery": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.peer_discovery.peerDiscovery-1.html",
131
- "./peer-discovery:peerDiscovery": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.peer_discovery.peerDiscovery-1.html",
132
- "Ed25519PeerId": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_id.Ed25519PeerId.html",
133
- "./peer-id:Ed25519PeerId": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_id.Ed25519PeerId.html",
134
- "RSAPeerId": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_id.RSAPeerId.html",
135
- "./peer-id:RSAPeerId": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_id.RSAPeerId.html",
136
- "Secp256k1PeerId": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_id.Secp256k1PeerId.html",
137
- "./peer-id:Secp256k1PeerId": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_id.Secp256k1PeerId.html",
138
- "PeerId": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.peer_id.PeerId.html",
139
- "./peer-id:PeerId": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.peer_id.PeerId.html",
140
- "PeerIdType": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.peer_id.PeerIdType.html",
141
- "./peer-id:PeerIdType": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.peer_id.PeerIdType.html",
142
- "./peer-id:symbol": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.peer_id.symbol.html",
143
- "isPeerId": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.peer_id.isPeerId.html",
144
- "./peer-id:isPeerId": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.peer_id.isPeerId.html",
145
- "PeerInfo": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_info.PeerInfo.html",
146
- "./peer-info:PeerInfo": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_info.PeerInfo.html",
147
- "PeerRouting": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_routing.PeerRouting.html",
148
- "./peer-routing:PeerRouting": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_routing.PeerRouting.html",
149
- "peerRouting": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.peer_routing.peerRouting-1.html",
150
- "./peer-routing:peerRouting": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.peer_routing.peerRouting-1.html",
151
- "Address": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.Address.html",
152
- "./peer-store:Address": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.Address.html",
153
- "Peer": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.Peer.html",
154
- "./peer-store:Peer": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.Peer.html",
155
- "PeerData": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.PeerData.html",
156
- "./peer-store:PeerData": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.PeerData.html",
157
- "PeerQuery": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.PeerQuery.html",
158
- "./peer-store:PeerQuery": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.PeerQuery.html",
159
- "PeerQueryFilter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.PeerQueryFilter.html",
160
- "./peer-store:PeerQueryFilter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.PeerQueryFilter.html",
161
- "PeerQueryOrder": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.PeerQueryOrder.html",
162
- "./peer-store:PeerQueryOrder": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.PeerQueryOrder.html",
163
- "PeerStore": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.PeerStore.html",
164
- "./peer-store:PeerStore": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.PeerStore.html",
165
- "Tag": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.Tag.html",
166
- "./peer-store:Tag": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.Tag.html",
167
- "TagOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.TagOptions.html",
168
- "./peer-store:TagOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.peer_store.TagOptions.html",
169
- "KEEP_ALIVE": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.peer_store_tags.KEEP_ALIVE.html",
170
- "./peer-store/tags:KEEP_ALIVE": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.peer_store_tags.KEEP_ALIVE.html",
171
- "TopicValidatorResult": "https://libp2p.github.io/js-libp2p/enums/_libp2p_interface.pubsub.TopicValidatorResult.html",
172
- "./pubsub:TopicValidatorResult": "https://libp2p.github.io/js-libp2p/enums/_libp2p_interface.pubsub.TopicValidatorResult.html",
173
- "PeerStreamEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PeerStreamEvents.html",
174
- "./pubsub:PeerStreamEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PeerStreamEvents.html",
175
- "PeerStreams": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PeerStreams.html",
176
- "./pubsub:PeerStreams": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PeerStreams.html",
177
- "PubSub": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PubSub.html",
178
- "./pubsub:PubSub": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PubSub.html",
179
- "PubSubEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PubSubEvents.html",
180
- "./pubsub:PubSubEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PubSubEvents.html",
181
- "PubSubInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PubSubInit.html",
182
- "./pubsub:PubSubInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PubSubInit.html",
183
- "PubSubRPC": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PubSubRPC.html",
184
- "./pubsub:PubSubRPC": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PubSubRPC.html",
185
- "PubSubRPCMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PubSubRPCMessage.html",
186
- "./pubsub:PubSubRPCMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PubSubRPCMessage.html",
187
- "PubSubRPCSubscription": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PubSubRPCSubscription.html",
188
- "./pubsub:PubSubRPCSubscription": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PubSubRPCSubscription.html",
189
- "PublishResult": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PublishResult.html",
190
- "./pubsub:PublishResult": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.PublishResult.html",
191
- "SignedMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.SignedMessage.html",
192
- "./pubsub:SignedMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.SignedMessage.html",
193
- "SubscriptionChangeData": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.SubscriptionChangeData.html",
194
- "./pubsub:SubscriptionChangeData": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.SubscriptionChangeData.html",
195
- "TopicValidatorFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.TopicValidatorFn.html",
196
- "./pubsub:TopicValidatorFn": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.TopicValidatorFn.html",
197
- "UnsignedMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.UnsignedMessage.html",
198
- "./pubsub:UnsignedMessage": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.pubsub.UnsignedMessage.html",
199
- "Message": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.pubsub.Message.html",
200
- "./pubsub:Message": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.pubsub.Message.html",
201
- "SignaturePolicy": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.pubsub.SignaturePolicy.html",
202
- "./pubsub:SignaturePolicy": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface.pubsub.SignaturePolicy.html",
203
- "StrictNoSign": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.pubsub.StrictNoSign.html",
204
- "./pubsub:StrictNoSign": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.pubsub.StrictNoSign.html",
205
- "StrictSign": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.pubsub.StrictSign.html",
206
- "./pubsub:StrictSign": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.pubsub.StrictSign.html",
207
- "Envelope": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.record.Envelope.html",
208
- "./record:Envelope": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.record.Envelope.html",
209
- "Record": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.record.Record.html",
210
- "./record:Record": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.record.Record.html",
211
- "Startable": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.startable.Startable.html",
212
- "./startable:Startable": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.startable.Startable.html",
213
- "isStartable": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.startable.isStartable.html",
214
- "./startable:isStartable": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.startable.isStartable.html",
215
- "start": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.startable.start.html",
216
- "./startable:start": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.startable.start.html",
217
- "stop": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.startable.stop.html",
218
- "./startable:stop": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.startable.stop.html",
219
- "IncomingStreamData": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_handler.IncomingStreamData.html",
220
- "./stream-handler:IncomingStreamData": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_handler.IncomingStreamData.html",
221
- "StreamHandler": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_handler.StreamHandler.html",
222
- "./stream-handler:StreamHandler": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_handler.StreamHandler.html",
223
- "StreamHandlerOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_handler.StreamHandlerOptions.html",
224
- "./stream-handler:StreamHandlerOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_handler.StreamHandlerOptions.html",
225
- "StreamHandlerRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_handler.StreamHandlerRecord.html",
226
- "./stream-handler:StreamHandlerRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_handler.StreamHandlerRecord.html",
227
- "StreamMuxer": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_muxer.StreamMuxer.html",
228
- "./stream-muxer:StreamMuxer": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_muxer.StreamMuxer.html",
229
- "StreamMuxerFactory": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_muxer.StreamMuxerFactory.html",
230
- "./stream-muxer:StreamMuxerFactory": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_muxer.StreamMuxerFactory.html",
231
- "StreamMuxerInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_muxer.StreamMuxerInit.html",
232
- "./stream-muxer:StreamMuxerInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_muxer.StreamMuxerInit.html",
233
- "AbstractStream": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.stream_muxer_stream.AbstractStream.html",
234
- "./stream-muxer/stream:AbstractStream": "https://libp2p.github.io/js-libp2p/classes/_libp2p_interface.stream_muxer_stream.AbstractStream.html",
235
- "AbstractStreamInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_muxer_stream.AbstractStreamInit.html",
236
- "./stream-muxer/stream:AbstractStreamInit": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.stream_muxer_stream.AbstractStreamInit.html",
237
- "FaultTolerance": "https://libp2p.github.io/js-libp2p/enums/_libp2p_interface.transport.FaultTolerance.html",
238
- "./transport:FaultTolerance": "https://libp2p.github.io/js-libp2p/enums/_libp2p_interface.transport.FaultTolerance.html",
239
- "ConnectionHandler": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.ConnectionHandler.html",
240
- "./transport:ConnectionHandler": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.ConnectionHandler.html",
241
- "CreateListenerOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.CreateListenerOptions.html",
242
- "./transport:CreateListenerOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.CreateListenerOptions.html",
243
- "DialOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.DialOptions.html",
244
- "./transport:DialOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.DialOptions.html",
245
- "Listener": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.Listener.html",
246
- "./transport:Listener": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.Listener.html",
247
- "ListenerEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.ListenerEvents.html",
248
- "./transport:ListenerEvents": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.ListenerEvents.html",
249
- "MultiaddrFilter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.MultiaddrFilter.html",
250
- "./transport:MultiaddrFilter": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.MultiaddrFilter.html",
251
- "Transport": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.Transport.html",
252
- "./transport:Transport": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.Transport.html",
253
- "Upgrader": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.Upgrader.html",
254
- "./transport:Upgrader": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.Upgrader.html",
255
- "UpgraderOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.UpgraderOptions.html",
256
- "./transport:UpgraderOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface.transport.UpgraderOptions.html",
257
- "./transport:symbol": "https://libp2p.github.io/js-libp2p/variables/_libp2p_interface.transport.symbol.html",
258
- "isTransport": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.transport.isTransport.html",
259
- "./transport:isTransport": "https://libp2p.github.io/js-libp2p/functions/_libp2p_interface.transport.isTransport.html"
260
- }