@libp2p/interface-internal 2.0.2-b3272cfce → 2.0.3-c258b35af
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/index.d.ts +7 -3
- package/dist/src/connection-manager/index.d.ts.map +1 -1
- package/dist/src/registrar/index.d.ts +6 -2
- package/dist/src/registrar/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/connection-manager/index.ts +7 -3
- package/src/registrar/index.ts +6 -2
|
@@ -5,13 +5,17 @@ import type { ProgressOptions } from 'progress-events';
|
|
|
5
5
|
export interface OpenConnectionOptions extends AbortOptions, ProgressOptions<OpenConnectionProgressEvents> {
|
|
6
6
|
/**
|
|
7
7
|
* Connection requests with a higher priority will be executed before those
|
|
8
|
-
* with a lower priority.
|
|
8
|
+
* with a lower priority.
|
|
9
|
+
*
|
|
10
|
+
* @default 50
|
|
9
11
|
*/
|
|
10
12
|
priority?: number;
|
|
11
13
|
/**
|
|
12
14
|
* When opening a connection to a remote peer, if a connection already exists
|
|
13
15
|
* it will be returned instead of creating a new connection. Pass true here
|
|
14
|
-
* to override that and dial a new connection anyway.
|
|
16
|
+
* to override that and dial a new connection anyway.
|
|
17
|
+
*
|
|
18
|
+
* @default false
|
|
15
19
|
*/
|
|
16
20
|
force?: boolean;
|
|
17
21
|
}
|
|
@@ -59,7 +63,7 @@ export interface ConnectionManager {
|
|
|
59
63
|
*/
|
|
60
64
|
acceptIncomingConnection(maConn: MultiaddrConnection): Promise<boolean>;
|
|
61
65
|
/**
|
|
62
|
-
* Invoked after upgrading
|
|
66
|
+
* Invoked after upgrading an inbound multiaddr connection has finished
|
|
63
67
|
*/
|
|
64
68
|
afterUpgradeInbound(): void;
|
|
65
69
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/connection-manager/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,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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"}
|
|
@@ -14,11 +14,15 @@ export interface StreamHandler {
|
|
|
14
14
|
}
|
|
15
15
|
export interface StreamHandlerOptions {
|
|
16
16
|
/**
|
|
17
|
-
* How many incoming streams can be open for this protocol at the same time on each connection
|
|
17
|
+
* How many incoming streams can be open for this protocol at the same time on each connection
|
|
18
|
+
*
|
|
19
|
+
* @default 32
|
|
18
20
|
*/
|
|
19
21
|
maxInboundStreams?: number;
|
|
20
22
|
/**
|
|
21
|
-
* How many outgoing streams can be open for this protocol at the same time on each connection
|
|
23
|
+
* How many outgoing streams can be open for this protocol at the same time on each connection
|
|
24
|
+
*
|
|
25
|
+
* @default 64
|
|
22
26
|
*/
|
|
23
27
|
maxOutboundStreams?: number;
|
|
24
28
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/registrar/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAErE,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,UAA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AE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAE/D;;OAEG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IAE5B;;;OAGG;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.0.
|
|
3
|
+
"version": "2.0.3-c258b35af",
|
|
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,8 +48,8 @@
|
|
|
48
48
|
"build": "aegir build"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@libp2p/interface": "2.1.
|
|
52
|
-
"@libp2p/peer-collections": "6.0.
|
|
51
|
+
"@libp2p/interface": "2.1.1-c258b35af",
|
|
52
|
+
"@libp2p/peer-collections": "6.0.3-c258b35af",
|
|
53
53
|
"@multiformats/multiaddr": "^12.2.3",
|
|
54
54
|
"progress-events": "^1.0.0",
|
|
55
55
|
"uint8arraylist": "^2.4.8"
|
|
@@ -6,14 +6,18 @@ import type { ProgressOptions } from 'progress-events'
|
|
|
6
6
|
export interface OpenConnectionOptions extends AbortOptions, ProgressOptions<OpenConnectionProgressEvents> {
|
|
7
7
|
/**
|
|
8
8
|
* Connection requests with a higher priority will be executed before those
|
|
9
|
-
* with a lower priority.
|
|
9
|
+
* with a lower priority.
|
|
10
|
+
*
|
|
11
|
+
* @default 50
|
|
10
12
|
*/
|
|
11
13
|
priority?: number
|
|
12
14
|
|
|
13
15
|
/**
|
|
14
16
|
* When opening a connection to a remote peer, if a connection already exists
|
|
15
17
|
* it will be returned instead of creating a new connection. Pass true here
|
|
16
|
-
* to override that and dial a new connection anyway.
|
|
18
|
+
* to override that and dial a new connection anyway.
|
|
19
|
+
*
|
|
20
|
+
* @default false
|
|
17
21
|
*/
|
|
18
22
|
force?: boolean
|
|
19
23
|
}
|
|
@@ -67,7 +71,7 @@ export interface ConnectionManager {
|
|
|
67
71
|
acceptIncomingConnection(maConn: MultiaddrConnection): Promise<boolean>
|
|
68
72
|
|
|
69
73
|
/**
|
|
70
|
-
* Invoked after upgrading
|
|
74
|
+
* Invoked after upgrading an inbound multiaddr connection has finished
|
|
71
75
|
*/
|
|
72
76
|
afterUpgradeInbound(): void
|
|
73
77
|
|
package/src/registrar/index.ts
CHANGED
|
@@ -18,12 +18,16 @@ export interface StreamHandler {
|
|
|
18
18
|
|
|
19
19
|
export interface StreamHandlerOptions {
|
|
20
20
|
/**
|
|
21
|
-
* How many incoming streams can be open for this protocol at the same time on each connection
|
|
21
|
+
* How many incoming streams can be open for this protocol at the same time on each connection
|
|
22
|
+
*
|
|
23
|
+
* @default 32
|
|
22
24
|
*/
|
|
23
25
|
maxInboundStreams?: number
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
|
-
* How many outgoing streams can be open for this protocol at the same time on each connection
|
|
28
|
+
* How many outgoing streams can be open for this protocol at the same time on each connection
|
|
29
|
+
*
|
|
30
|
+
* @default 64
|
|
27
31
|
*/
|
|
28
32
|
maxOutboundStreams?: number
|
|
29
33
|
|