@libp2p/interface-internal 2.3.14 → 2.3.15-6c42ea64a
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/dist/src/connection-manager.d.ts +6 -0
- package/dist/src/connection-manager.d.ts.map +1 -1
- package/dist/src/registrar.d.ts +3 -2
- package/dist/src/registrar.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/connection-manager.ts +7 -0
- package/src/registrar.ts +3 -2
- package/dist/typedoc-urls.json +0 -12
|
@@ -59,6 +59,12 @@ export interface ConnectionManager {
|
|
|
59
59
|
* @returns The maximum connection limit.
|
|
60
60
|
*/
|
|
61
61
|
getMaxConnections(): number;
|
|
62
|
+
/**
|
|
63
|
+
* Update the maximum number of connections that are accepted - setting this
|
|
64
|
+
* to a smaller value than the current setting will cause connections to be
|
|
65
|
+
* pruned.
|
|
66
|
+
*/
|
|
67
|
+
setMaxConnections(maxConnections: number): void;
|
|
62
68
|
/**
|
|
63
69
|
* Open a connection to a remote peer
|
|
64
70
|
*
|
|
@@ -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,mBAAmB,CAAA;AAC5J,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,CAA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,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CAC9F"}
|
package/dist/src/registrar.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { StreamHandler, StreamHandlerOptions, StreamHandlerRecord, Topology, IncomingStreamData } from '@libp2p/interface';
|
|
2
|
+
import type { AbortOptions } from '@multiformats/multiaddr';
|
|
2
3
|
export type {
|
|
3
4
|
/**
|
|
4
5
|
* @deprecated This type should be imported from @libp2p/interface directly
|
|
@@ -50,7 +51,7 @@ export interface Registrar {
|
|
|
50
51
|
* @param protocol - The protocol to unhandle.
|
|
51
52
|
* @returns A promise that resolves once the handler is removed.
|
|
52
53
|
*/
|
|
53
|
-
unhandle(protocol: string): Promise<void>;
|
|
54
|
+
unhandle(protocol: string, options?: AbortOptions): Promise<void>;
|
|
54
55
|
/**
|
|
55
56
|
* Retrieve the registered handler for a given protocol.
|
|
56
57
|
*
|
|
@@ -70,7 +71,7 @@ export interface Registrar {
|
|
|
70
71
|
* @param topology - The topology handler to register.
|
|
71
72
|
* @returns A promise resolving to a unique ID for the registered topology.
|
|
72
73
|
*/
|
|
73
|
-
register(protocol: string, topology: Topology): Promise<string>;
|
|
74
|
+
register(protocol: string, topology: Topology, options?: AbortOptions): Promise<string>;
|
|
74
75
|
/**
|
|
75
76
|
* Unregister a topology handler using its unique ID.
|
|
76
77
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registrar.d.ts","sourceRoot":"","sources":["../../src/registrar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"registrar.d.ts","sourceRoot":"","sources":["../../src/registrar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC/H,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAE3D,YAAY;AACV;;GAEG;AACH,kBAAkB;AAElB;;GAEG;AACH,aAAa;AAEb;;GAEG;AACH,oBAAoB;AAEpB;;GAEG;AACH,mBAAmB,EACpB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,YAAY,IAAI,MAAM,EAAE,CAAA;IAExB;;;;;;;OAOG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAE/F;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEjE;;;;;OAKG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,CAAA;IAEjD;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAEvF;;;;OAIG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IAE5B;;;;;;OAMG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,CAAA;CAC5C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/interface-internal",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.15-6c42ea64a",
|
|
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,13 +41,13 @@
|
|
|
41
41
|
"build": "aegir build"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@libp2p/interface": "
|
|
45
|
-
"@libp2p/peer-collections": "
|
|
46
|
-
"@multiformats/multiaddr": "^12.4.
|
|
44
|
+
"@libp2p/interface": "2.10.3-6c42ea64a",
|
|
45
|
+
"@libp2p/peer-collections": "6.0.31-6c42ea64a",
|
|
46
|
+
"@multiformats/multiaddr": "^12.4.4",
|
|
47
47
|
"progress-events": "^1.0.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"aegir": "^47.0.
|
|
50
|
+
"aegir": "^47.0.14"
|
|
51
51
|
},
|
|
52
52
|
"sideEffects": false
|
|
53
53
|
}
|
|
@@ -66,6 +66,13 @@ export interface ConnectionManager {
|
|
|
66
66
|
*/
|
|
67
67
|
getMaxConnections(): number
|
|
68
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Update the maximum number of connections that are accepted - setting this
|
|
71
|
+
* to a smaller value than the current setting will cause connections to be
|
|
72
|
+
* pruned.
|
|
73
|
+
*/
|
|
74
|
+
setMaxConnections(maxConnections: number): void
|
|
75
|
+
|
|
69
76
|
/**
|
|
70
77
|
* Open a connection to a remote peer
|
|
71
78
|
*
|
package/src/registrar.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { StreamHandler, StreamHandlerOptions, StreamHandlerRecord, Topology, IncomingStreamData } from '@libp2p/interface'
|
|
2
|
+
import type { AbortOptions } from '@multiformats/multiaddr'
|
|
2
3
|
|
|
3
4
|
export type {
|
|
4
5
|
/**
|
|
@@ -58,7 +59,7 @@ export interface Registrar {
|
|
|
58
59
|
* @param protocol - The protocol to unhandle.
|
|
59
60
|
* @returns A promise that resolves once the handler is removed.
|
|
60
61
|
*/
|
|
61
|
-
unhandle(protocol: string): Promise<void>
|
|
62
|
+
unhandle(protocol: string, options?: AbortOptions): Promise<void>
|
|
62
63
|
|
|
63
64
|
/**
|
|
64
65
|
* Retrieve the registered handler for a given protocol.
|
|
@@ -80,7 +81,7 @@ export interface Registrar {
|
|
|
80
81
|
* @param topology - The topology handler to register.
|
|
81
82
|
* @returns A promise resolving to a unique ID for the registered topology.
|
|
82
83
|
*/
|
|
83
|
-
register(protocol: string, topology: Topology): Promise<string>
|
|
84
|
+
register(protocol: string, topology: Topology, options?: AbortOptions): Promise<string>
|
|
84
85
|
|
|
85
86
|
/**
|
|
86
87
|
* Unregister a topology handler using its unique ID.
|
package/dist/typedoc-urls.json
DELETED
|
@@ -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
|
-
}
|