@libp2p/fetch 4.0.14-4580b64fa → 4.0.14-74620dbcd
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/index.min.js.map +2 -2
- package/dist/src/index.d.ts +15 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js.map +1 -1
- package/package.json +6 -6
- package/src/index.ts +16 -0
package/dist/src/index.d.ts
CHANGED
|
@@ -67,6 +67,21 @@ export interface FetchComponents {
|
|
|
67
67
|
connectionManager: ConnectionManager;
|
|
68
68
|
}
|
|
69
69
|
export interface Fetch {
|
|
70
|
+
/**
|
|
71
|
+
* The protocol this Fetch instance supports
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
*
|
|
75
|
+
* ```TypeScript
|
|
76
|
+
* libp2p.register(libp2p.services.fetch.protocol, {
|
|
77
|
+
* onConnect (peerId) {
|
|
78
|
+
* // handle fetch peer connect
|
|
79
|
+
* }
|
|
80
|
+
* // ...etc
|
|
81
|
+
* })
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
readonly protocol: string;
|
|
70
85
|
/**
|
|
71
86
|
* Sends a request to fetch the value associated with the given key from the given peer
|
|
72
87
|
*/
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAE9E,MAAM,WAAW,SAAS;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAA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AAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;CACnD;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,SAAS,CAAA;IACpB,iBAAiB,EAAE,iBAAiB,CAAA;CACrC;AAED,MAAM,WAAW,KAAK;IACpB;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IAEzB;;OAEG;IACH,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;IAEjH;;;;;;;;;;OAUG;IACH,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CAAA;IAEpE;;;;;;;;;;OAUG;IACH,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;CACxE;AAED,wBAAgB,KAAK,CAAE,IAAI,GAAE,SAAc,GAAG,CAAC,UAAU,EAAE,eAAe,KAAK,KAAK,CAEnF"}
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAgFhD,MAAM,UAAU,KAAK,CAAE,OAAkB,EAAE;IACzC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;AACzD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/fetch",
|
|
3
|
-
"version": "4.0.14-
|
|
3
|
+
"version": "4.0.14-74620dbcd",
|
|
4
4
|
"description": "Implementation of the Fetch Protocol",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/libp2p/js-libp2p/tree/main/packages/protocol-fetch#readme",
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"doc-check": "aegir doc-check"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@libp2p/interface": "3.1.1-
|
|
49
|
-
"@libp2p/interface-internal": "3.0.14-
|
|
50
|
-
"@libp2p/utils": "7.0.14-
|
|
48
|
+
"@libp2p/interface": "3.1.1-74620dbcd",
|
|
49
|
+
"@libp2p/interface-internal": "3.0.14-74620dbcd",
|
|
50
|
+
"@libp2p/utils": "7.0.14-74620dbcd",
|
|
51
51
|
"main-event": "^1.0.1",
|
|
52
52
|
"protons-runtime": "^6.0.1",
|
|
53
53
|
"uint8arraylist": "^2.4.8",
|
|
54
54
|
"uint8arrays": "^5.1.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@libp2p/crypto": "5.1.14-
|
|
58
|
-
"@libp2p/peer-id": "6.0.5-
|
|
57
|
+
"@libp2p/crypto": "5.1.14-74620dbcd",
|
|
58
|
+
"@libp2p/peer-id": "6.0.5-74620dbcd",
|
|
59
59
|
"aegir": "^47.0.22",
|
|
60
60
|
"protons": "^8.1.1",
|
|
61
61
|
"sinon": "^21.0.0",
|
package/src/index.ts
CHANGED
|
@@ -74,6 +74,22 @@ export interface FetchComponents {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
export interface Fetch {
|
|
77
|
+
/**
|
|
78
|
+
* The protocol this Fetch instance supports
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
*
|
|
82
|
+
* ```TypeScript
|
|
83
|
+
* libp2p.register(libp2p.services.fetch.protocol, {
|
|
84
|
+
* onConnect (peerId) {
|
|
85
|
+
* // handle fetch peer connect
|
|
86
|
+
* }
|
|
87
|
+
* // ...etc
|
|
88
|
+
* })
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
readonly protocol: string
|
|
92
|
+
|
|
77
93
|
/**
|
|
78
94
|
* Sends a request to fetch the value associated with the given key from the given peer
|
|
79
95
|
*/
|