@libp2p/interface-internal 2.3.14-9f1be6742 → 2.3.14-d91ae66c6
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/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.14-
|
|
3
|
+
"version": "2.3.14-d91ae66c6",
|
|
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": "2.10.2-
|
|
45
|
-
"@libp2p/peer-collections": "6.0.30-
|
|
44
|
+
"@libp2p/interface": "2.10.2-d91ae66c6",
|
|
45
|
+
"@libp2p/peer-collections": "6.0.30-d91ae66c6",
|
|
46
46
|
"@multiformats/multiaddr": "^12.4.0",
|
|
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
|
}
|
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.
|