@libp2p/interface-internal 3.0.13 → 3.0.14-2a3e54738

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
@@ -38,7 +38,7 @@ $ npm i @libp2p/interface-internal
38
38
 
39
39
  # API Docs
40
40
 
41
- - <https://libp2p.github.io/js-libp2p/modules/_libp2p_interface_internal.html>
41
+ - <https://libp2p.github.io/js-libp2p/modules/_libp2p_interface-internal.html>
42
42
 
43
43
  # License
44
44
 
@@ -1,4 +1,4 @@
1
- import type { AbortOptions, PendingDial, Connection, MultiaddrConnection, PeerId, IsDialableOptions, OpenConnectionProgressEvents, Stream, NewStreamOptions } from '@libp2p/interface';
1
+ import type { AbortOptions, PendingDial, Connection, MultiaddrConnection, PeerId, IsDialableOptions, OpenConnectionProgressEvents, Stream, NewStreamOptions, DialTarget } from '@libp2p/interface';
2
2
  import type { PeerMap } from '@libp2p/peer-collections';
3
3
  import type { Multiaddr } from '@multiformats/multiaddr';
4
4
  import type { ProgressOptions } from 'progress-events';
@@ -72,7 +72,7 @@ export interface ConnectionManager {
72
72
  * @param options - Optional parameters for connection handling.
73
73
  * @returns A promise that resolves to a `Connection` object.
74
74
  */
75
- openConnection(peer: PeerId | Multiaddr | Multiaddr[], options?: OpenConnectionOptions): Promise<Connection>;
75
+ openConnection(peer: DialTarget, options?: OpenConnectionOptions): Promise<Connection>;
76
76
  /**
77
77
  * Open a protocol stream with a remote peer. If the peer is already connected
78
78
  * an existing connection will be used to open the stream, otherwise they will
@@ -87,7 +87,7 @@ export interface ConnectionManager {
87
87
  * @param options - Optional parameters for connection handling.
88
88
  * @returns A promise that resolves to a `Connection` object.
89
89
  */
90
- openStream(peer: PeerId | Multiaddr | Multiaddr[], protocol: string | string[], options?: OpenConnectionOptions & NewStreamOptions): Promise<Stream>;
90
+ openStream(peer: DialTarget, protocol: string | string[], options?: OpenConnectionOptions & NewStreamOptions): Promise<Stream>;
91
91
  /**
92
92
  * Close our connections to a peer
93
93
  *
@@ -1 +1 @@
1
- {"version":3,"file":"connection-manager.d.ts","sourceRoot":"","sources":["../../src/connection-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACtL,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,YAAY,EAAE,eAAe,CAAC,4BAA4B,CAAC;IACxG;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,EAAE,CAAA;IAE7C;;;;OAIG;IACH,iBAAiB,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IAE1C;;;;;OAKG;IACH,iBAAiB,IAAI,MAAM,CAAA;IAE3B;;;;OAIG;IACH,iBAAiB,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAE/C;;;;;;OAMG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,EAAE,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;IAE5G;;;;;;;;;;;;;OAaG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAA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.14-2a3e54738",
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",
@@ -41,8 +41,8 @@
41
41
  "build": "aegir build"
42
42
  },
43
43
  "dependencies": {
44
- "@libp2p/interface": "^3.1.0",
45
- "@libp2p/peer-collections": "^7.0.13",
44
+ "@libp2p/interface": "3.1.1-2a3e54738",
45
+ "@libp2p/peer-collections": "7.0.14-2a3e54738",
46
46
  "@multiformats/multiaddr": "^13.0.1",
47
47
  "progress-events": "^1.0.1"
48
48
  },
@@ -1,4 +1,4 @@
1
- import type { AbortOptions, PendingDial, Connection, MultiaddrConnection, PeerId, IsDialableOptions, OpenConnectionProgressEvents, Stream, NewStreamOptions } from '@libp2p/interface'
1
+ import type { AbortOptions, PendingDial, Connection, MultiaddrConnection, PeerId, IsDialableOptions, OpenConnectionProgressEvents, Stream, NewStreamOptions, DialTarget } from '@libp2p/interface'
2
2
  import type { PeerMap } from '@libp2p/peer-collections'
3
3
  import type { Multiaddr } from '@multiformats/multiaddr'
4
4
  import type { ProgressOptions } from 'progress-events'
@@ -80,7 +80,7 @@ export interface ConnectionManager {
80
80
  * @param options - Optional parameters for connection handling.
81
81
  * @returns A promise that resolves to a `Connection` object.
82
82
  */
83
- openConnection(peer: PeerId | Multiaddr | Multiaddr[], options?: OpenConnectionOptions): Promise<Connection>
83
+ openConnection(peer: DialTarget, options?: OpenConnectionOptions): Promise<Connection>
84
84
 
85
85
  /**
86
86
  * Open a protocol stream with a remote peer. If the peer is already connected
@@ -96,7 +96,7 @@ export interface ConnectionManager {
96
96
  * @param options - Optional parameters for connection handling.
97
97
  * @returns A promise that resolves to a `Connection` object.
98
98
  */
99
- openStream(peer: PeerId | Multiaddr | Multiaddr[], protocol: string | string[], options?: OpenConnectionOptions & NewStreamOptions): Promise<Stream>
99
+ openStream(peer: DialTarget, protocol: string | string[], options?: OpenConnectionOptions & NewStreamOptions): Promise<Stream>
100
100
 
101
101
  /**
102
102
  * Close our connections to a peer
@@ -1,12 +0,0 @@
1
- {
2
- "AddressManager": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface-internal.AddressManager.html",
3
- "ConfirmAddressOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface-internal.ConfirmAddressOptions.html",
4
- "ConnectionManager": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface-internal.ConnectionManager.html",
5
- "NodeAddress": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface-internal.NodeAddress.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
- "Registrar": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface-internal.Registrar.html",
9
- "TransportManager": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface-internal.TransportManager.html",
10
- "TransportManagerDialOptions": "https://libp2p.github.io/js-libp2p/interfaces/_libp2p_interface-internal.TransportManagerDialOptions.html",
11
- "AddressType": "https://libp2p.github.io/js-libp2p/types/_libp2p_interface-internal.AddressType.html"
12
- }