@helia/libp2p 1.0.3 → 1.0.4-c0c34ad1
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 +44 -44
- package/dist/index.min.js.map +4 -4
- package/dist/src/routing.js +2 -2
- package/dist/src/routing.js.map +1 -1
- package/package.json +3 -3
- package/src/routing.ts +2 -2
- package/dist/typedoc-urls.json +0 -9
package/dist/src/routing.js
CHANGED
|
@@ -4,7 +4,8 @@ import { withArrayBuffer } from 'uint8arrays/with-array-buffer';
|
|
|
4
4
|
function peerInfoToPeer(info) {
|
|
5
5
|
return {
|
|
6
6
|
...info,
|
|
7
|
-
id: info.id.toCID()
|
|
7
|
+
id: info.id.toCID(),
|
|
8
|
+
routing: 'libp2p-router'
|
|
8
9
|
};
|
|
9
10
|
}
|
|
10
11
|
class Libp2pRouter {
|
|
@@ -21,7 +22,6 @@ class Libp2pRouter {
|
|
|
21
22
|
}
|
|
22
23
|
async *findProviders(cid, options) {
|
|
23
24
|
yield* map(this.libp2p.contentRouting.findProviders(cid, options), prov => ({
|
|
24
|
-
routing: this.name,
|
|
25
25
|
...peerInfoToPeer(prov)
|
|
26
26
|
}));
|
|
27
27
|
}
|
package/dist/src/routing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../src/routing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,GAAG,MAAM,QAAQ,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAK/D,SAAS,cAAc,CAAE,IAAc;IACrC,OAAO;QACL,GAAG,IAAI;QACP,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../src/routing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,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,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAA;IAC5E,CAAC;IAED,KAAK,CAAC,QAAQ,CAAE,MAAW,EAAE,OAAwB;QACnD,OAAO,cAAc,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,CAAA;IAC/F,CAAC;IAED,KAAK,CAAC,CAAE,eAAe,CAAE,GAAe,EAAE,OAAwB;QAChE,KAAM,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,cAAc,CAAC,CAAA;IACpF,CAAC;IAED,QAAQ;QACN,OAAO,gBAAgB,CAAA;IACzB,CAAC;CACF;AAED,MAAM,UAAU,aAAa,CAAE,MAAc;IAC3C,OAAO,IAAI,YAAY,CAAC,MAAM,CAAC,CAAA;AACjC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helia/libp2p",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4-c0c34ad1",
|
|
4
4
|
"description": "libp2p functionality for Helia",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/ipfs/helia/tree/main/packages/libp2p#readme",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@chainsafe/libp2p-noise": "^17.0.0",
|
|
52
52
|
"@chainsafe/libp2p-yamux": "^8.0.1",
|
|
53
|
-
"@helia/delegated-routing-client": "
|
|
53
|
+
"@helia/delegated-routing-client": "1.0.3-c0c34ad1",
|
|
54
54
|
"@helia/delegated-routing-v1-http-api-client": "^9.0.0",
|
|
55
|
-
"@helia/interface": "
|
|
55
|
+
"@helia/interface": "7.0.2-c0c34ad1",
|
|
56
56
|
"@ipshipyard/libp2p-auto-tls": "^2.0.1",
|
|
57
57
|
"@libp2p/autonat": "^3.0.21",
|
|
58
58
|
"@libp2p/bootstrap": "^12.0.24",
|
package/src/routing.ts
CHANGED
|
@@ -8,7 +8,8 @@ import type { CID } from 'multiformats'
|
|
|
8
8
|
function peerInfoToPeer (info: PeerInfo): Peer {
|
|
9
9
|
return {
|
|
10
10
|
...info,
|
|
11
|
-
id: info.id.toCID()
|
|
11
|
+
id: info.id.toCID(),
|
|
12
|
+
routing: 'libp2p-router'
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
|
|
@@ -30,7 +31,6 @@ class Libp2pRouter implements Router {
|
|
|
30
31
|
|
|
31
32
|
async * findProviders (cid: CID, options?: RoutingOptions): AsyncIterable<Provider> {
|
|
32
33
|
yield * map(this.libp2p.contentRouting.findProviders(cid, options), prov => ({
|
|
33
|
-
routing: this.name,
|
|
34
34
|
...peerInfoToPeer(prov)
|
|
35
35
|
}))
|
|
36
36
|
}
|
package/dist/typedoc-urls.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"CreateLibp2pOptions": "https://ipfs.github.io/helia/interfaces/_helia_libp2p.CreateLibp2pOptions.html",
|
|
3
|
-
"DefaultLibp2pServices": "https://ipfs.github.io/helia/interfaces/_helia_libp2p.DefaultLibp2pServices.html",
|
|
4
|
-
"HeliaWithLibp2p": "https://ipfs.github.io/helia/interfaces/_helia_libp2p.HeliaWithLibp2p.html",
|
|
5
|
-
".:HeliaWithLibp2p": "https://ipfs.github.io/helia/interfaces/_helia_libp2p.HeliaWithLibp2p.html",
|
|
6
|
-
"libp2pDefaults": "https://ipfs.github.io/helia/functions/_helia_libp2p.libp2pDefaults.html",
|
|
7
|
-
"withLibp2p": "https://ipfs.github.io/helia/functions/_helia_libp2p.withLibp2p.html",
|
|
8
|
-
".:withLibp2p": "https://ipfs.github.io/helia/functions/_helia_libp2p.withLibp2p.html"
|
|
9
|
-
}
|