@libp2p/interface-internal 1.2.4 → 1.3.0-3319ff41e

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.
@@ -1,7 +1,8 @@
1
- import type { AbortOptions, PendingDial, Connection, MultiaddrConnection, PeerId, IsDialableOptions } from '@libp2p/interface';
1
+ import type { AbortOptions, PendingDial, Connection, MultiaddrConnection, PeerId, IsDialableOptions, OpenConnectionProgressEvents } from '@libp2p/interface';
2
2
  import type { PeerMap } from '@libp2p/peer-collections';
3
3
  import type { Multiaddr } from '@multiformats/multiaddr';
4
- export interface OpenConnectionOptions extends AbortOptions {
4
+ import type { ProgressOptions } from 'progress-events';
5
+ export interface OpenConnectionOptions extends AbortOptions, ProgressOptions<OpenConnectionProgressEvents> {
5
6
  /**
6
7
  * Connection requests with a higher priority will be executed before those
7
8
  * with a lower priority. (default: 50)
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connection-manager/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC9H,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;OASG;IACH,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,EAAE,CAAA;IAE7C;;;;;;;;OAQG;IACH,iBAAiB,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IAE1C;;;;;;;;O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AM,CAAC,EAAE,MAAM,GAAG,UAAU,EAAE,CAAA;IAE7C;;;;;;;;OAQG;IACH,iBAAiB,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IAE1C;;;;;;;;OAQG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;IAE5G;;OAEG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAErE;;;;;OAKG;IACH,wBAAwB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAEvE;;OAEG;IACH,mBAAmB,IAAI,IAAI,CAAA;IAE3B;;;;;;;;OAQG;IACH,YAAY,IAAI,WAAW,EAAE,CAAA;IAE7B;;;;;;;;OAQG;IACH,UAAU,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CAC9F"}
@@ -1,5 +1,8 @@
1
- import type { Connection, Listener, Transport } from '@libp2p/interface';
1
+ import type { AbortOptions, Connection, Listener, Transport, TransportManagerDialProgressEvents } from '@libp2p/interface';
2
2
  import type { Multiaddr } from '@multiformats/multiaddr';
3
+ import type { ProgressOptions } from 'progress-events';
4
+ export interface TransportManagerDialOptions extends AbortOptions, ProgressOptions<TransportManagerDialProgressEvents> {
5
+ }
3
6
  export interface TransportManager {
4
7
  /**
5
8
  * Add a transport to the transport manager
@@ -11,7 +14,7 @@ export interface TransportManager {
11
14
  * a multiaddr, you may want to call openConnection on the connection manager
12
15
  * instead.
13
16
  */
14
- dial(ma: Multiaddr, options?: any): Promise<Connection>;
17
+ dial(ma: Multiaddr, options?: TransportManagerDialOptions): Promise<Connection>;
15
18
  /**
16
19
  * Return all addresses currently being listened on
17
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transport-manager/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,GAAG,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAA;IAE/B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;IAEvD;;OAEG;IACH,QAAQ,IAAI,SAAS,EAAE,CAAA;IAEvB;;OAEG;IACH,aAAa,IAAI,SAAS,EAAE,CAAA;IAE5B;;OAEG;IACH,YAAY,IAAI,QAAQ,EAAE,CAAA;IAE1B;;OAEG;IACH,yBAAyB,CAAC,EAAE,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;IAE/D;;;OAGG;IACH,2BAA2B,CAAC,EAAE,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;IAEjE;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEzC;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAElC;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transport-manager/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,kCAAkC,EAAE,MAAM,mBAAmB,CAAA;AAC1H,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,MAAM,WAAW,2BAA4B,SAAQ,YAAY,EAAE,eAAe,CAAC,kCAAkC,CAAC;CAErH;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,GAAG,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAA;IAE/B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;IAE/E;;OAEG;IACH,QAAQ,IAAI,SAAS,EAAE,CAAA;IAEvB;;OAEG;IACH,aAAa,IAAI,SAAS,EAAE,CAAA;IAE5B;;OAEG;IACH,YAAY,IAAI,QAAQ,EAAE,CAAA;IAE1B;;OAEG;IACH,yBAAyB,CAAC,EAAE,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;IAE/D;;;OAGG;IACH,2BAA2B,CAAC,EAAE,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;IAEjE;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEzC;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAElC;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CAC3B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/interface-internal",
3
- "version": "1.2.4",
3
+ "version": "1.3.0-3319ff41e",
4
4
  "description": "Interfaces implemented by internal libp2p components",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/interface-internal#readme",
@@ -48,9 +48,10 @@
48
48
  "build": "aegir build"
49
49
  },
50
50
  "dependencies": {
51
- "@libp2p/interface": "^1.5.0",
52
- "@libp2p/peer-collections": "^5.2.4",
51
+ "@libp2p/interface": "1.6.0-3319ff41e",
52
+ "@libp2p/peer-collections": "5.2.5-3319ff41e",
53
53
  "@multiformats/multiaddr": "^12.2.3",
54
+ "progress-events": "^1.0.0",
54
55
  "uint8arraylist": "^2.4.8"
55
56
  },
56
57
  "devDependencies": {
@@ -1,8 +1,9 @@
1
- import type { AbortOptions, PendingDial, Connection, MultiaddrConnection, PeerId, IsDialableOptions } from '@libp2p/interface'
1
+ import type { AbortOptions, PendingDial, Connection, MultiaddrConnection, PeerId, IsDialableOptions, OpenConnectionProgressEvents } from '@libp2p/interface'
2
2
  import type { PeerMap } from '@libp2p/peer-collections'
3
3
  import type { Multiaddr } from '@multiformats/multiaddr'
4
+ import type { ProgressOptions } from 'progress-events'
4
5
 
5
- export interface OpenConnectionOptions extends AbortOptions {
6
+ export interface OpenConnectionOptions extends AbortOptions, ProgressOptions<OpenConnectionProgressEvents> {
6
7
  /**
7
8
  * Connection requests with a higher priority will be executed before those
8
9
  * with a lower priority. (default: 50)
@@ -1,5 +1,10 @@
1
- import type { Connection, Listener, Transport } from '@libp2p/interface'
1
+ import type { AbortOptions, Connection, Listener, Transport, TransportManagerDialProgressEvents } from '@libp2p/interface'
2
2
  import type { Multiaddr } from '@multiformats/multiaddr'
3
+ import type { ProgressOptions } from 'progress-events'
4
+
5
+ export interface TransportManagerDialOptions extends AbortOptions, ProgressOptions<TransportManagerDialProgressEvents> {
6
+
7
+ }
3
8
 
4
9
  export interface TransportManager {
5
10
  /**
@@ -13,7 +18,7 @@ export interface TransportManager {
13
18
  * a multiaddr, you may want to call openConnection on the connection manager
14
19
  * instead.
15
20
  */
16
- dial(ma: Multiaddr, options?: any): Promise<Connection>
21
+ dial(ma: Multiaddr, options?: TransportManagerDialOptions): Promise<Connection>
17
22
 
18
23
  /**
19
24
  * Return all addresses currently being listened on
@@ -1,14 +0,0 @@
1
- {
2
- "AddressManager": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_internal.AddressManager.html",
3
- "ConnectionManager": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_internal.ConnectionManager.html",
4
- "Envelope": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_internal.Envelope.html",
5
- "IncomingStreamData": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_internal.IncomingStreamData.html",
6
- "OpenConnectionOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_internal.OpenConnectionOptions.html",
7
- "RandomWalk": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_internal.RandomWalk.html",
8
- "Record": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_internal.Record.html",
9
- "Registrar": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_internal.Registrar.html",
10
- "StreamHandler": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_internal.StreamHandler.html",
11
- "StreamHandlerOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_internal.StreamHandlerOptions.html",
12
- "StreamHandlerRecord": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_internal.StreamHandlerRecord.html",
13
- "TransportManager": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface_internal.TransportManager.html"
14
- }