From 1c49d0b720064317998e0da0f54f7f2cef64f768 Mon Sep 17 00:00:00 2001 From: Hayden Young Date: Thu, 10 Oct 2024 15:31:14 +0100 Subject: [PATCH] Upgrade to new version of libp2p. --- package-lock.json | 854 +++++++++++++++++++++++++++++++------ package.json | 4 +- src/daemon.js | 6 +- src/utils/libp2p-config.js | 8 +- 4 files changed, 729 insertions(+), 143 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7b3f902..63bfbf3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,12 +9,14 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@chainsafe/libp2p-gossipsub": "^13.1.0", + "@chainsafe/libp2p-gossipsub": "^14.1.0", "@orbitdb/core": "https://github.com/orbitdb/orbitdb.git#expose-identities", "@orbitdb/set-db": "^1.0.2", "blockstore-level": "^1.1.8", "datastore-level": "^10.1.8", "helia": "^4.2.5", + "it-pipe": "^3.0.1", + "libp2p": "^2.1.8", "yargs": "^17.7.2" }, "bin": { @@ -2449,23 +2451,22 @@ "integrity": "sha512-ndGqEMG1W5WkGagaqOZHpPU172AGdxr+LD15sv3WIUvT5oCFUrG1Y0CW/v2Egwj4JXEvSibaIIIqImsm98y1nA==" }, "node_modules/@chainsafe/libp2p-gossipsub": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-gossipsub/-/libp2p-gossipsub-13.1.0.tgz", - "integrity": "sha512-Wk1O6ZT/L0o+p9vlAB4qxDa9pAwTh5yxPrQbyc98wvKbrnPhAfZbjMfhCBOEvFKzMkEFDsTd3TGPjP8TTtNtQw==", - "license": "Apache-2.0", - "dependencies": { - "@libp2p/crypto": "^4.0.1", - "@libp2p/interface": "^1.5.0", - "@libp2p/interface-internal": "^1.0.7", - "@libp2p/peer-id": "^4.0.5", - "@libp2p/pubsub": "^9.0.8", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-gossipsub/-/libp2p-gossipsub-14.1.0.tgz", + "integrity": "sha512-nzFBbHOoRFa/bXUSzmJaXOgHI+EttTldhLJ33yWcM0DxnWhLKychHkCDLoJO3THa1+dnzrDJoxj3N3/V0WoPVw==", + "dependencies": { + "@libp2p/crypto": "^5.0.0", + "@libp2p/interface": "^2.0.0", + "@libp2p/interface-internal": "^2.0.0", + "@libp2p/peer-id": "^5.0.0", + "@libp2p/pubsub": "^10.0.0", "@multiformats/multiaddr": "^12.1.14", "denque": "^2.1.0", "it-length-prefixed": "^9.0.4", "it-pipe": "^3.0.1", "it-pushable": "^3.2.3", "multiformats": "^13.0.1", - "protons-runtime": "5.4.0", + "protons-runtime": "^5.5.0", "uint8arraylist": "^2.4.8", "uint8arrays": "^5.0.1" }, @@ -2473,6 +2474,109 @@ "npm": ">=8.7.0" } }, + "node_modules/@chainsafe/libp2p-gossipsub/node_modules/@libp2p/crypto": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-5.0.5.tgz", + "integrity": "sha512-bs3PpSQS59I/YD2RnwcPv88pF/vB6GH2rw4jqb/0xm60LfRuSm0tNoCrJMuyG2pFz89WuKM+0BpnEWQi4alwCg==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@noble/curves": "^1.4.0", + "@noble/hashes": "^1.4.0", + "asn1js": "^3.0.5", + "multiformats": "^13.1.0", + "protons-runtime": "^5.4.0", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/@chainsafe/libp2p-gossipsub/node_modules/@libp2p/interface": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.1.3.tgz", + "integrity": "sha512-t1i2LWcnTGJEr7fDMslA8wYwBzJP81QKBlrBHoGhXxqqpRQa9035roCh/Akuw5RUgjKE47/ezjuzo90aWsJB8g==", + "dependencies": { + "@multiformats/multiaddr": "^12.2.3", + "it-pushable": "^3.2.3", + "it-stream-types": "^2.0.1", + "multiformats": "^13.1.0", + "progress-events": "^1.0.0", + "uint8arraylist": "^2.4.8" + } + }, + "node_modules/@chainsafe/libp2p-gossipsub/node_modules/@libp2p/interface-internal": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@libp2p/interface-internal/-/interface-internal-2.0.8.tgz", + "integrity": "sha512-yWAVuygiy2XhZK2UsOfy3iA30Bi78VeJDac6cAD/FQzu3rmGy2LNYtHuz1Vze9/OL4I6cseMNTGkozTeDg8nMg==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@libp2p/peer-collections": "^6.0.8", + "@multiformats/multiaddr": "^12.2.3", + "progress-events": "^1.0.0", + "uint8arraylist": "^2.4.8" + } + }, + "node_modules/@chainsafe/libp2p-gossipsub/node_modules/@libp2p/logger": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-5.1.1.tgz", + "integrity": "sha512-+pwFFZekKQHKdSrGURKZjfAJ86soc1e4HsI0r7dJN+kHICzKFzC+x5hM5GsWCorNj3y++xshWlF/n03zyxoyJQ==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@multiformats/multiaddr": "^12.2.3", + "interface-datastore": "^8.3.0", + "multiformats": "^13.1.0", + "weald": "^1.0.2" + } + }, + "node_modules/@chainsafe/libp2p-gossipsub/node_modules/@libp2p/peer-collections": { + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-6.0.8.tgz", + "integrity": "sha512-/xaSvb45lydLibt7sb+Im1ohIGiMfOlz5wcxelEgxmvUd0QmvirZXM3eAavQ+xrxmvJSPEQDmWSP+851ohRlKQ==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@libp2p/peer-id": "^5.0.5", + "@libp2p/utils": "^6.1.1", + "multiformats": "^13.2.2" + } + }, + "node_modules/@chainsafe/libp2p-gossipsub/node_modules/@libp2p/peer-id": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-5.0.5.tgz", + "integrity": "sha512-+9aX4II0hjMgKcFX/TMWUHRu2wOXOkfV5jO2N5m/R91K+Kp4Tt4n1ceXHjrbwwz3k2IWl0xJOMYjrf9dhOZWAw==", + "dependencies": { + "@libp2p/crypto": "^5.0.5", + "@libp2p/interface": "^2.1.3", + "multiformats": "^13.1.0", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/@chainsafe/libp2p-gossipsub/node_modules/@libp2p/utils": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-6.1.1.tgz", + "integrity": "sha512-lpqNyyTx7ygIfXyU4eqDONW7c4oc8Gf1xjDahlOWcggqNhLWsC3/8zTmziKlY3PjTvzY0W37nDRPO1KiM1Sduw==", + "dependencies": { + "@chainsafe/is-ip": "^2.0.2", + "@libp2p/crypto": "^5.0.5", + "@libp2p/interface": "^2.1.3", + "@libp2p/logger": "^5.1.1", + "@multiformats/multiaddr": "^12.2.3", + "@sindresorhus/fnv1a": "^3.1.0", + "@types/murmurhash3js-revisited": "^3.0.3", + "any-signal": "^4.1.1", + "delay": "^6.0.0", + "get-iterator": "^2.0.1", + "is-loopback-addr": "^2.0.2", + "it-foreach": "^2.1.1", + "it-pipe": "^3.0.1", + "it-pushable": "^3.2.3", + "it-stream-types": "^2.0.1", + "murmurhash3js-revisited": "^3.0.0", + "netmask": "^2.0.2", + "p-defer": "^4.0.1", + "race-event": "^1.3.0", + "race-signal": "^1.0.2", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" + } + }, "node_modules/@chainsafe/libp2p-noise": { "version": "15.1.0", "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-noise/-/libp2p-noise-15.1.0.tgz", @@ -3601,12 +3705,11 @@ } }, "node_modules/@libp2p/crypto": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-4.1.7.tgz", - "integrity": "sha512-6c6vwP7wXTaAJMnRd/R8J9GlqZF0jHyxo6IKA7TF9T54SAcTbE6rVIQxRQ4v//JaaKxx5N9JfbufmigzUm0seQ==", - "license": "Apache-2.0 OR MIT", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-4.1.9.tgz", + "integrity": "sha512-8Cf2VKh0uC/rQLvTLSloIOMqUvf4jsSTHXgjWQRf47lDNJlNNI0wSv2S6gakT72GZsRV/jCjYwKPqRlsa5S0iA==", "dependencies": { - "@libp2p/interface": "^1.6.2", + "@libp2p/interface": "^1.7.0", "@noble/curves": "^1.4.0", "@noble/hashes": "^1.4.0", "asn1js": "^3.0.5", @@ -3655,10 +3758,9 @@ } }, "node_modules/@libp2p/interface": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.6.2.tgz", - "integrity": "sha512-DmjrEyz0Zfz3mDx7f18Jr18E1QDteYYVI4QXWGW0nMcyZQDWyf5WU4DW7MrqglwS00lpHKKtOyBPATVhjI/JAQ==", - "license": "Apache-2.0 OR MIT", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.7.0.tgz", + "integrity": "sha512-/zFyaIaIGW0aihhsH7/93vQdpWInUzFocxF11RO/029Y6h0SVjs24HHbils+DqaFDTqN+L7oNlBx2rM2MnmTjA==", "dependencies": { "@multiformats/multiaddr": "^12.2.3", "it-pushable": "^3.2.3", @@ -3669,13 +3771,12 @@ } }, "node_modules/@libp2p/interface-internal": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@libp2p/interface-internal/-/interface-internal-1.3.2.tgz", - "integrity": "sha512-imR9Ok2cDtOwySKfC4Fb6lXnVfR5IuAx3kA/RzWZb+ZGvR8Bo9t3y7el140CG34ODVZ1uPiTqim8fY8eLn/BTg==", - "license": "Apache-2.0 OR MIT", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@libp2p/interface-internal/-/interface-internal-1.3.4.tgz", + "integrity": "sha512-8x/0sdeH8T16yZ9t/Cfja0ms6Ho9fF3riX56WhQrNxMU6C1sIgAFmzUNzHLxxOR+rkKyL9cyXIyB+RcBf4gzjA==", "dependencies": { - "@libp2p/interface": "^1.6.2", - "@libp2p/peer-collections": "^5.2.7", + "@libp2p/interface": "^1.7.0", + "@libp2p/peer-collections": "^5.2.9", "@multiformats/multiaddr": "^12.2.3", "progress-events": "^1.0.0", "uint8arraylist": "^2.4.8" @@ -3736,16 +3837,15 @@ } }, "node_modules/@libp2p/logger": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-4.0.18.tgz", - "integrity": "sha512-pRf0+9BqqTw8GSLrIYMxsdkYh6O7hgBxV78/F7zPpbFmhN4mqTCaHSZ+WPSyDNTWiyDCujfonNq9iAWutYmo9w==", - "license": "Apache-2.0 OR MIT", + "version": "4.0.20", + "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-4.0.20.tgz", + "integrity": "sha512-TTh2dhHsOTAlMPxSa9ncFPHa/0jTt+0AQxwHdlxg/OGLAgc9VRhnrhHUbJZp07Crcw4T/MOfS4KhjlxgqYgJRw==", "dependencies": { - "@libp2p/interface": "^1.6.2", + "@libp2p/interface": "^1.7.0", "@multiformats/multiaddr": "^12.2.3", - "debug": "^4.3.4", "interface-datastore": "^8.2.11", - "multiformats": "^13.1.0" + "multiformats": "^13.1.0", + "weald": "^1.0.2" } }, "node_modules/@libp2p/mdns": { @@ -3781,12 +3881,11 @@ } }, "node_modules/@libp2p/multistream-select": { - "version": "5.1.15", - "resolved": "https://registry.npmjs.org/@libp2p/multistream-select/-/multistream-select-5.1.15.tgz", - "integrity": "sha512-CZvVn53XzX2IWiVsm2xknrerZY60CWtKxBUEFroBYDNFRPJhDcyoxvWP3LFXVRVKdTsVwSA4YvGYZ0EM1l7oFw==", - "license": "Apache-2.0 OR MIT", + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/@libp2p/multistream-select/-/multistream-select-6.0.6.tgz", + "integrity": "sha512-NM6CmJZYOJcB5woggoZgpMEqW6Jeovd65PYKqgvYUr7CQMPWUczUQQ9I/NSUEnv9g+69Pk9HN2AoMq1XKD60MQ==", "dependencies": { - "@libp2p/interface": "^1.6.2", + "@libp2p/interface": "^2.1.3", "it-length-prefixed": "^9.0.4", "it-length-prefixed-stream": "^1.1.7", "it-stream-types": "^2.0.1", @@ -3797,52 +3896,61 @@ "uint8arrays": "^5.1.0" } }, + "node_modules/@libp2p/multistream-select/node_modules/@libp2p/interface": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.1.3.tgz", + "integrity": "sha512-t1i2LWcnTGJEr7fDMslA8wYwBzJP81QKBlrBHoGhXxqqpRQa9035roCh/Akuw5RUgjKE47/ezjuzo90aWsJB8g==", + "dependencies": { + "@multiformats/multiaddr": "^12.2.3", + "it-pushable": "^3.2.3", + "it-stream-types": "^2.0.1", + "multiformats": "^13.1.0", + "progress-events": "^1.0.0", + "uint8arraylist": "^2.4.8" + } + }, "node_modules/@libp2p/peer-collections": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.2.7.tgz", - "integrity": "sha512-EcfzGPjNL8f76+ZX+D9QfI46mMMcewFeFyfoX9kDsasL+nALU3TcyAAICjyn78u7P6OwlTVN1PEoK5sZn1MEew==", - "license": "Apache-2.0 OR MIT", + "version": "5.2.9", + "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.2.9.tgz", + "integrity": "sha512-8gBmzQlCWjjb+FSQBKK33T25Y5Df/8FWCXFtJDsprVxVUzDOQoibQJ5Tb4Y+mb96HUhNzoaRWVEamB78MMB3DA==", "dependencies": { - "@libp2p/interface": "^1.6.2", - "@libp2p/peer-id": "^4.2.2", - "@libp2p/utils": "^5.4.7" + "@libp2p/interface": "^1.7.0", + "@libp2p/peer-id": "^4.2.4", + "@libp2p/utils": "^5.4.9" } }, "node_modules/@libp2p/peer-id": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-4.2.2.tgz", - "integrity": "sha512-ct4PKpwH/EdG64XrhEd+aruhQOZ4obSSP10WAZ4NktLRGzqhJoGyxigaSbZCuZHnjwpOmPqWlKHMgh++Sse5Lg==", - "license": "Apache-2.0 OR MIT", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-4.2.4.tgz", + "integrity": "sha512-mvvsVxt4HkF14BrTNKbqr14VObW+KBJBWu1Oe6BFCoDttGMQLaI+PdduE1r6Tquntv5IONBqoITgD7ow5dQ+vQ==", "dependencies": { - "@libp2p/interface": "^1.6.2", + "@libp2p/interface": "^1.7.0", "multiformats": "^13.1.0", "uint8arrays": "^5.1.0" } }, "node_modules/@libp2p/peer-id-factory": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@libp2p/peer-id-factory/-/peer-id-factory-4.2.2.tgz", - "integrity": "sha512-/8d7uhA2PozkU3hbjrhVQJJgFWRMCf+p3awapErFq9kAKynE52OfV0yaE3hUi0Aodj/hLWUWmjKE1gtvGCjB1A==", - "license": "Apache-2.0 OR MIT", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@libp2p/peer-id-factory/-/peer-id-factory-4.2.4.tgz", + "integrity": "sha512-NDQ/qIWpcAG/6xQjyut6xCkrYYAoCaI/33Z+7yzo5qFODwLfNonLzSTasnA6jhuvHn33aHnD1qhdpFkmstxtNQ==", "dependencies": { - "@libp2p/crypto": "^4.1.7", - "@libp2p/interface": "^1.6.2", - "@libp2p/peer-id": "^4.2.2", + "@libp2p/crypto": "^4.1.9", + "@libp2p/interface": "^1.7.0", + "@libp2p/peer-id": "^4.2.4", "protons-runtime": "^5.4.0", "uint8arraylist": "^2.4.8", "uint8arrays": "^5.1.0" } }, "node_modules/@libp2p/peer-record": { - "version": "7.0.23", - "resolved": "https://registry.npmjs.org/@libp2p/peer-record/-/peer-record-7.0.23.tgz", - "integrity": "sha512-ZryDzb++q1SwBO0x8BvItHQQxsxFh7dfCKHw8JHa5nS5WqAcTZnycRO6+imY7h95mGblx+/UydZELUWWBcwawg==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/crypto": "^4.1.7", - "@libp2p/interface": "^1.6.2", - "@libp2p/peer-id": "^4.2.2", - "@libp2p/utils": "^5.4.7", + "version": "7.0.25", + "resolved": "https://registry.npmjs.org/@libp2p/peer-record/-/peer-record-7.0.25.tgz", + "integrity": "sha512-b54P3cSeQniW/HPJjBVbeF3KaVUQkWa431gotuIFUS1PYgtz69uzkRrVY6Qt+RBb4R4fcmH4K4jWyZi3xyLGfQ==", + "dependencies": { + "@libp2p/crypto": "^4.1.9", + "@libp2p/interface": "^1.7.0", + "@libp2p/peer-id": "^4.2.4", + "@libp2p/utils": "^5.4.9", "@multiformats/multiaddr": "^12.2.3", "protons-runtime": "^5.4.0", "uint8-varint": "^2.0.4", @@ -3851,17 +3959,17 @@ } }, "node_modules/@libp2p/peer-store": { - "version": "10.1.3", - "resolved": "https://registry.npmjs.org/@libp2p/peer-store/-/peer-store-10.1.3.tgz", - "integrity": "sha512-hYM5fM3QG/i0bQlBsm389KVHerp7Y952998t0dwdcdGz3WwM5UazpjBlSBupih7/mvkBaIFYQZfv1udL5i2lCw==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface": "^1.6.2", - "@libp2p/peer-collections": "^5.2.7", - "@libp2p/peer-id": "^4.2.2", - "@libp2p/peer-record": "^7.0.23", + "version": "11.0.8", + "resolved": "https://registry.npmjs.org/@libp2p/peer-store/-/peer-store-11.0.8.tgz", + "integrity": "sha512-csn1LcnnyanDw2/WO25CqxZyEzkQyfSsYu2Letsc2Po4J/9qJk8lfRc/2ezggaDf8z1y2y25b/WWhil1E7aLVA==", + "dependencies": { + "@libp2p/crypto": "^5.0.5", + "@libp2p/interface": "^2.1.3", + "@libp2p/peer-collections": "^6.0.8", + "@libp2p/peer-id": "^5.0.5", + "@libp2p/peer-record": "^8.0.8", "@multiformats/multiaddr": "^12.2.3", - "interface-datastore": "^8.2.11", + "interface-datastore": "^8.3.0", "it-all": "^3.0.6", "mortice": "^3.0.4", "multiformats": "^13.1.0", @@ -3870,6 +3978,114 @@ "uint8arrays": "^5.1.0" } }, + "node_modules/@libp2p/peer-store/node_modules/@libp2p/crypto": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-5.0.5.tgz", + "integrity": "sha512-bs3PpSQS59I/YD2RnwcPv88pF/vB6GH2rw4jqb/0xm60LfRuSm0tNoCrJMuyG2pFz89WuKM+0BpnEWQi4alwCg==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@noble/curves": "^1.4.0", + "@noble/hashes": "^1.4.0", + "asn1js": "^3.0.5", + "multiformats": "^13.1.0", + "protons-runtime": "^5.4.0", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/@libp2p/peer-store/node_modules/@libp2p/interface": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.1.3.tgz", + "integrity": "sha512-t1i2LWcnTGJEr7fDMslA8wYwBzJP81QKBlrBHoGhXxqqpRQa9035roCh/Akuw5RUgjKE47/ezjuzo90aWsJB8g==", + "dependencies": { + "@multiformats/multiaddr": "^12.2.3", + "it-pushable": "^3.2.3", + "it-stream-types": "^2.0.1", + "multiformats": "^13.1.0", + "progress-events": "^1.0.0", + "uint8arraylist": "^2.4.8" + } + }, + "node_modules/@libp2p/peer-store/node_modules/@libp2p/logger": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-5.1.1.tgz", + "integrity": "sha512-+pwFFZekKQHKdSrGURKZjfAJ86soc1e4HsI0r7dJN+kHICzKFzC+x5hM5GsWCorNj3y++xshWlF/n03zyxoyJQ==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@multiformats/multiaddr": "^12.2.3", + "interface-datastore": "^8.3.0", + "multiformats": "^13.1.0", + "weald": "^1.0.2" + } + }, + "node_modules/@libp2p/peer-store/node_modules/@libp2p/peer-collections": { + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-6.0.8.tgz", + "integrity": "sha512-/xaSvb45lydLibt7sb+Im1ohIGiMfOlz5wcxelEgxmvUd0QmvirZXM3eAavQ+xrxmvJSPEQDmWSP+851ohRlKQ==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@libp2p/peer-id": "^5.0.5", + "@libp2p/utils": "^6.1.1", + "multiformats": "^13.2.2" + } + }, + "node_modules/@libp2p/peer-store/node_modules/@libp2p/peer-id": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-5.0.5.tgz", + "integrity": "sha512-+9aX4II0hjMgKcFX/TMWUHRu2wOXOkfV5jO2N5m/R91K+Kp4Tt4n1ceXHjrbwwz3k2IWl0xJOMYjrf9dhOZWAw==", + "dependencies": { + "@libp2p/crypto": "^5.0.5", + "@libp2p/interface": "^2.1.3", + "multiformats": "^13.1.0", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/@libp2p/peer-store/node_modules/@libp2p/peer-record": { + "version": "8.0.8", + "resolved": "https://registry.npmjs.org/@libp2p/peer-record/-/peer-record-8.0.8.tgz", + "integrity": "sha512-wYqVN13ZaC/cVdFaTR3+Plzv4lf/BNVSzZK11cSSo3MqinOWqFs38plw9OC1Mfne2x9HYHLGwhj2zE802itD0A==", + "dependencies": { + "@libp2p/crypto": "^5.0.5", + "@libp2p/interface": "^2.1.3", + "@libp2p/peer-id": "^5.0.5", + "@libp2p/utils": "^6.1.1", + "@multiformats/multiaddr": "^12.2.3", + "multiformats": "^13.2.2", + "protons-runtime": "^5.4.0", + "uint8-varint": "^2.0.4", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/@libp2p/peer-store/node_modules/@libp2p/utils": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-6.1.1.tgz", + "integrity": "sha512-lpqNyyTx7ygIfXyU4eqDONW7c4oc8Gf1xjDahlOWcggqNhLWsC3/8zTmziKlY3PjTvzY0W37nDRPO1KiM1Sduw==", + "dependencies": { + "@chainsafe/is-ip": "^2.0.2", + "@libp2p/crypto": "^5.0.5", + "@libp2p/interface": "^2.1.3", + "@libp2p/logger": "^5.1.1", + "@multiformats/multiaddr": "^12.2.3", + "@sindresorhus/fnv1a": "^3.1.0", + "@types/murmurhash3js-revisited": "^3.0.3", + "any-signal": "^4.1.1", + "delay": "^6.0.0", + "get-iterator": "^2.0.1", + "is-loopback-addr": "^2.0.2", + "it-foreach": "^2.1.1", + "it-pipe": "^3.0.1", + "it-pushable": "^3.2.3", + "it-stream-types": "^2.0.1", + "murmurhash3js-revisited": "^3.0.0", + "netmask": "^2.0.2", + "p-defer": "^4.0.1", + "race-event": "^1.3.0", + "race-signal": "^1.0.2", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" + } + }, "node_modules/@libp2p/ping": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@libp2p/ping/-/ping-1.1.3.tgz", @@ -3886,23 +4102,126 @@ } }, "node_modules/@libp2p/pubsub": { - "version": "9.0.10", - "resolved": "https://registry.npmjs.org/@libp2p/pubsub/-/pubsub-9.0.10.tgz", - "integrity": "sha512-oYvDM14NNXyFLnrVVQISrWZE1DZSOfHd7tQW/M+/Pl2iICsrMuj/ViZ8BFjGE2RkJflHXKGV5bdEqQNQMIoJ/g==", - "dependencies": { - "@libp2p/crypto": "^4.0.2", - "@libp2p/interface": "^1.1.3", - "@libp2p/interface-internal": "^1.0.8", - "@libp2p/peer-collections": "^5.1.6", - "@libp2p/peer-id": "^4.0.6", - "@libp2p/utils": "^5.2.5", + "version": "10.0.8", + "resolved": "https://registry.npmjs.org/@libp2p/pubsub/-/pubsub-10.0.8.tgz", + "integrity": "sha512-kOAQ2I6WUDtt1H6NMQuS+bfmj/JSMeLVIjPArn7xOe6OKaiIggGFP1LEI3waKeGVzwu0HGzIoNVe7WlNuyhwmg==", + "dependencies": { + "@libp2p/crypto": "^5.0.5", + "@libp2p/interface": "^2.1.3", + "@libp2p/interface-internal": "^2.0.8", + "@libp2p/peer-collections": "^6.0.8", + "@libp2p/peer-id": "^5.0.5", + "@libp2p/utils": "^6.1.1", "it-length-prefixed": "^9.0.4", "it-pipe": "^3.0.1", "it-pushable": "^3.2.3", - "multiformats": "^13.0.1", + "multiformats": "^13.1.0", "p-queue": "^8.0.1", "uint8arraylist": "^2.4.8", - "uint8arrays": "^5.0.1" + "uint8arrays": "^5.1.0" + } + }, + "node_modules/@libp2p/pubsub/node_modules/@libp2p/crypto": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-5.0.5.tgz", + "integrity": "sha512-bs3PpSQS59I/YD2RnwcPv88pF/vB6GH2rw4jqb/0xm60LfRuSm0tNoCrJMuyG2pFz89WuKM+0BpnEWQi4alwCg==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@noble/curves": "^1.4.0", + "@noble/hashes": "^1.4.0", + "asn1js": "^3.0.5", + "multiformats": "^13.1.0", + "protons-runtime": "^5.4.0", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/@libp2p/pubsub/node_modules/@libp2p/interface": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.1.3.tgz", + "integrity": "sha512-t1i2LWcnTGJEr7fDMslA8wYwBzJP81QKBlrBHoGhXxqqpRQa9035roCh/Akuw5RUgjKE47/ezjuzo90aWsJB8g==", + "dependencies": { + "@multiformats/multiaddr": "^12.2.3", + "it-pushable": "^3.2.3", + "it-stream-types": "^2.0.1", + "multiformats": "^13.1.0", + "progress-events": "^1.0.0", + "uint8arraylist": "^2.4.8" + } + }, + "node_modules/@libp2p/pubsub/node_modules/@libp2p/interface-internal": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@libp2p/interface-internal/-/interface-internal-2.0.8.tgz", + "integrity": "sha512-yWAVuygiy2XhZK2UsOfy3iA30Bi78VeJDac6cAD/FQzu3rmGy2LNYtHuz1Vze9/OL4I6cseMNTGkozTeDg8nMg==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@libp2p/peer-collections": "^6.0.8", + "@multiformats/multiaddr": "^12.2.3", + "progress-events": "^1.0.0", + "uint8arraylist": "^2.4.8" + } + }, + "node_modules/@libp2p/pubsub/node_modules/@libp2p/logger": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-5.1.1.tgz", + "integrity": "sha512-+pwFFZekKQHKdSrGURKZjfAJ86soc1e4HsI0r7dJN+kHICzKFzC+x5hM5GsWCorNj3y++xshWlF/n03zyxoyJQ==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@multiformats/multiaddr": "^12.2.3", + "interface-datastore": "^8.3.0", + "multiformats": "^13.1.0", + "weald": "^1.0.2" + } + }, + "node_modules/@libp2p/pubsub/node_modules/@libp2p/peer-collections": { + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-6.0.8.tgz", + "integrity": "sha512-/xaSvb45lydLibt7sb+Im1ohIGiMfOlz5wcxelEgxmvUd0QmvirZXM3eAavQ+xrxmvJSPEQDmWSP+851ohRlKQ==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@libp2p/peer-id": "^5.0.5", + "@libp2p/utils": "^6.1.1", + "multiformats": "^13.2.2" + } + }, + "node_modules/@libp2p/pubsub/node_modules/@libp2p/peer-id": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-5.0.5.tgz", + "integrity": "sha512-+9aX4II0hjMgKcFX/TMWUHRu2wOXOkfV5jO2N5m/R91K+Kp4Tt4n1ceXHjrbwwz3k2IWl0xJOMYjrf9dhOZWAw==", + "dependencies": { + "@libp2p/crypto": "^5.0.5", + "@libp2p/interface": "^2.1.3", + "multiformats": "^13.1.0", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/@libp2p/pubsub/node_modules/@libp2p/utils": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-6.1.1.tgz", + "integrity": "sha512-lpqNyyTx7ygIfXyU4eqDONW7c4oc8Gf1xjDahlOWcggqNhLWsC3/8zTmziKlY3PjTvzY0W37nDRPO1KiM1Sduw==", + "dependencies": { + "@chainsafe/is-ip": "^2.0.2", + "@libp2p/crypto": "^5.0.5", + "@libp2p/interface": "^2.1.3", + "@libp2p/logger": "^5.1.1", + "@multiformats/multiaddr": "^12.2.3", + "@sindresorhus/fnv1a": "^3.1.0", + "@types/murmurhash3js-revisited": "^3.0.3", + "any-signal": "^4.1.1", + "delay": "^6.0.0", + "get-iterator": "^2.0.1", + "is-loopback-addr": "^2.0.2", + "it-foreach": "^2.1.1", + "it-pipe": "^3.0.1", + "it-pushable": "^3.2.3", + "it-stream-types": "^2.0.1", + "murmurhash3js-revisited": "^3.0.0", + "netmask": "^2.0.2", + "p-defer": "^4.0.1", + "race-event": "^1.3.0", + "race-signal": "^1.0.2", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" } }, "node_modules/@libp2p/record": { @@ -3946,15 +4265,14 @@ } }, "node_modules/@libp2p/utils": { - "version": "5.4.7", - "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-5.4.7.tgz", - "integrity": "sha512-HDJgM8sF0oeYJg10kIGUJSGKz2V68Visl1aDFoZjEup2NHvIkNt1vR7mIFpF+4VFMg7DbPKv5mZFbLGj0RGNXg==", - "license": "Apache-2.0 OR MIT", + "version": "5.4.9", + "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-5.4.9.tgz", + "integrity": "sha512-0fRdX98WqhTmXU2WEVLegLFxs/kKTtUHanHk5Lzs4oGsIzlPHR7zE6lj/U1WfsFA+Xo1eYQpNLiXEL29hG+Nyw==", "dependencies": { "@chainsafe/is-ip": "^2.0.2", - "@libp2p/crypto": "^4.1.7", - "@libp2p/interface": "^1.6.2", - "@libp2p/logger": "^4.0.18", + "@libp2p/crypto": "^4.1.9", + "@libp2p/interface": "^1.7.0", + "@libp2p/logger": "^4.0.20", "@multiformats/multiaddr": "^12.2.3", "@multiformats/multiaddr-matcher": "^1.2.1", "@sindresorhus/fnv1a": "^3.1.0", @@ -5966,6 +6284,11 @@ "@types/node": "*" } }, + "node_modules/@types/retry": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.2.tgz", + "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==" + }, "node_modules/@types/sinon": { "version": "17.0.3", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.3.tgz", @@ -9822,6 +10145,74 @@ "multiformats": "^13.1.0" } }, + "node_modules/helia/node_modules/@libp2p/multistream-select": { + "version": "5.1.17", + "resolved": "https://registry.npmjs.org/@libp2p/multistream-select/-/multistream-select-5.1.17.tgz", + "integrity": "sha512-QOMGjCzKGf/W+qzWw5OxaqLEYhK45XjMCxGJYQ7L5eUkcwAv6rlPZAYw6YslaMLpJTa61/yfh8D4u7EuoMFsUw==", + "dependencies": { + "@libp2p/interface": "^1.7.0", + "it-length-prefixed": "^9.0.4", + "it-length-prefixed-stream": "^1.1.7", + "it-stream-types": "^2.0.1", + "p-defer": "^4.0.1", + "race-signal": "^1.0.2", + "uint8-varint": "^2.0.4", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/helia/node_modules/@libp2p/peer-store": { + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/@libp2p/peer-store/-/peer-store-10.1.5.tgz", + "integrity": "sha512-JqQcIcxZS7kicCPabGRyrKD+qZlOdaooL00hdHogVb4MIMqfjiQMmOEpzIvTQLCKHKM2mmfnV3P7kc6hYzPq8g==", + "dependencies": { + "@libp2p/interface": "^1.7.0", + "@libp2p/peer-collections": "^5.2.9", + "@libp2p/peer-id": "^4.2.4", + "@libp2p/peer-record": "^7.0.25", + "@multiformats/multiaddr": "^12.2.3", + "interface-datastore": "^8.2.11", + "it-all": "^3.0.6", + "mortice": "^3.0.4", + "multiformats": "^13.1.0", + "protons-runtime": "^5.4.0", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/helia/node_modules/libp2p": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-1.9.4.tgz", + "integrity": "sha512-OCMQqJ0Po8jhgb4CilWhI5EWhppn9ENdhg63PQL8Yi1tk2rOwJJt+NBec85AU18zBc0jv7Q6SgQRkzCefAuyIQ==", + "dependencies": { + "@libp2p/crypto": "^4.1.9", + "@libp2p/interface": "^1.7.0", + "@libp2p/interface-internal": "^1.3.4", + "@libp2p/logger": "^4.0.20", + "@libp2p/multistream-select": "^5.1.17", + "@libp2p/peer-collections": "^5.2.9", + "@libp2p/peer-id": "^4.2.4", + "@libp2p/peer-id-factory": "^4.2.4", + "@libp2p/peer-store": "^10.1.5", + "@libp2p/utils": "^5.4.9", + "@multiformats/dns": "^1.0.6", + "@multiformats/multiaddr": "^12.2.3", + "@multiformats/multiaddr-matcher": "^1.2.1", + "any-signal": "^4.1.1", + "datastore-core": "^9.2.9", + "interface-datastore": "^8.2.11", + "it-byte-stream": "^1.0.12", + "it-merge": "^3.0.5", + "it-parallel": "^3.0.7", + "merge-options": "^3.0.4", + "multiformats": "^13.1.0", + "p-defer": "^4.0.1", + "progress-events": "^1.0.0", + "race-event": "^1.3.0", + "race-signal": "^1.0.2", + "uint8arrays": "^5.1.0" + } + }, "node_modules/hermes-estree": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.19.1.tgz", @@ -10033,14 +10424,19 @@ } }, "node_modules/interface-datastore": { - "version": "8.2.11", - "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.2.11.tgz", - "integrity": "sha512-9E0iXehfp/j0UbZ2mvlYB4K9pP7uQBCppfuy8WHs1EHF6wLQrM9+zwyX+8Qt6HnH4GKZRyXX/CNXm6oD4+QYgA==", + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.3.1.tgz", + "integrity": "sha512-3r0ETmHIi6HmvM5sc09QQiCD3gUfwtEM/AAChOyAd/UAKT69uk8LXfTSUBufbUIO/dU65Vj8nb9O6QjwW8vDSQ==", "dependencies": { - "interface-store": "^5.0.0", - "uint8arrays": "^5.0.2" + "interface-store": "^6.0.0", + "uint8arrays": "^5.1.0" } }, + "node_modules/interface-datastore/node_modules/interface-store": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-6.0.2.tgz", + "integrity": "sha512-KSFCXtBlNoG0hzwNa0RmhHtrdhzexp+S+UY2s0rWTBJyfdEIgn6i6Zl9otVqrcFYbYrneBT7hbmHQ8gE0C3umA==" + }, "node_modules/interface-store": { "version": "5.1.8", "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.8.tgz", @@ -10422,6 +10818,17 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-network-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.1.0.tgz", + "integrity": "sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -10730,13 +11137,12 @@ "node_modules/it-drain": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/it-drain/-/it-drain-3.0.7.tgz", - "integrity": "sha512-vy6S1JKjjHSIFHgBpLpD1zhkCRl3z1zYWUxE14+kAYf+BL9ssWSFImJfhl361IIcwr0ofw8etzg11VqqB+ntUA==", - "license": "Apache-2.0 OR MIT" + "integrity": "sha512-vy6S1JKjjHSIFHgBpLpD1zhkCRl3z1zYWUxE14+kAYf+BL9ssWSFImJfhl361IIcwr0ofw8etzg11VqqB+ntUA==" }, "node_modules/it-filter": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/it-filter/-/it-filter-3.0.4.tgz", - "integrity": "sha512-e0sz+st4sudK/zH6GZ/gRTRP8A/ADuJFCYDmRgMbZvR79y5+v4ZXav850bBZk5wL9zXaYZFxS1v/6Qi+Vjwh5g==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/it-filter/-/it-filter-3.1.1.tgz", + "integrity": "sha512-TOXmVuaSkxlLp2hXKoMTra0WMZMKVFxE3vSsbIA+PbADNCBAHhjJ/lM31vBOUTddHMO34Ku++vU8T9PLlBxQtg==", "dependencies": { "it-peekable": "^3.0.0" } @@ -10748,9 +11154,9 @@ "license": "Apache-2.0 OR MIT" }, "node_modules/it-foreach": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/it-foreach/-/it-foreach-2.0.6.tgz", - "integrity": "sha512-OVosBHJsdXpAyeFlCbe3IGZia+65UykyAznakNsKXK+b99dbhuu/mOnXxTadDEo1GWhKx+WA8RNanKkMf07zQw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/it-foreach/-/it-foreach-2.1.1.tgz", + "integrity": "sha512-ID4Gxnavk/LVQLQESAQ9hR6dR63Ih6X+8VdxEktX8rpz2dCGAbZpey/eljTNbMfV2UKXHiu6UsneoNBZuac97g==", "dependencies": { "it-peekable": "^3.0.0" } @@ -10899,9 +11305,9 @@ } }, "node_modules/it-sort": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/it-sort/-/it-sort-3.0.4.tgz", - "integrity": "sha512-tvnC93JZZWjX4UxALy0asow0dzXabkoaRbrPJKClTKhNCqw4gzHr+H5axf1gohcthedRRkqd/ae+wl7WqoxFhw==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/it-sort/-/it-sort-3.0.6.tgz", + "integrity": "sha512-aNrlZAXB8vWBd42tCpaXGL6CJVJNDW3OLczmdt6g0k/s9Z6evkTdgU2LjwW5SNNeX41sF+C8MjV+OcVf93PsPw==", "dependencies": { "it-all": "^3.0.0" } @@ -11433,38 +11839,164 @@ } }, "node_modules/libp2p": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-1.8.2.tgz", - "integrity": "sha512-26XcWeNVBSQySvw8zxaxQYhfKAeUAxsKw3knaCNcmBisigSKGY7ZxW/NpeoDzILJOFsHfuu/BnIlABW9/0umOg==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/crypto": "^4.1.7", - "@libp2p/interface": "^1.6.2", - "@libp2p/interface-internal": "^1.3.2", - "@libp2p/logger": "^4.0.18", - "@libp2p/multistream-select": "^5.1.15", - "@libp2p/peer-collections": "^5.2.7", - "@libp2p/peer-id": "^4.2.2", - "@libp2p/peer-id-factory": "^4.2.2", - "@libp2p/peer-store": "^10.1.3", - "@libp2p/utils": "^5.4.7", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-2.1.8.tgz", + "integrity": "sha512-OzUUgAs6983lP2FDqc3oABeUAyvd3iJ/BlYjwmjddpUwQO6gemuJFpWujagj2Vtj+oPosGrrPGWqv+WPnTkHUA==", + "dependencies": { + "@libp2p/crypto": "^5.0.5", + "@libp2p/interface": "^2.1.3", + "@libp2p/interface-internal": "^2.0.8", + "@libp2p/logger": "^5.1.1", + "@libp2p/multistream-select": "^6.0.6", + "@libp2p/peer-collections": "^6.0.8", + "@libp2p/peer-id": "^5.0.5", + "@libp2p/peer-store": "^11.0.8", + "@libp2p/utils": "^6.1.1", "@multiformats/dns": "^1.0.6", "@multiformats/multiaddr": "^12.2.3", "@multiformats/multiaddr-matcher": "^1.2.1", "any-signal": "^4.1.1", - "datastore-core": "^9.2.9", - "interface-datastore": "^8.2.11", + "datastore-core": "^10.0.0", + "interface-datastore": "^8.3.0", + "it-byte-stream": "^1.0.12", "it-merge": "^3.0.5", "it-parallel": "^3.0.7", "merge-options": "^3.0.4", "multiformats": "^13.1.0", "p-defer": "^4.0.1", + "p-retry": "^6.2.0", "progress-events": "^1.0.0", "race-event": "^1.3.0", "race-signal": "^1.0.2", "uint8arrays": "^5.1.0" } }, + "node_modules/libp2p/node_modules/@libp2p/crypto": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-5.0.5.tgz", + "integrity": "sha512-bs3PpSQS59I/YD2RnwcPv88pF/vB6GH2rw4jqb/0xm60LfRuSm0tNoCrJMuyG2pFz89WuKM+0BpnEWQi4alwCg==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@noble/curves": "^1.4.0", + "@noble/hashes": "^1.4.0", + "asn1js": "^3.0.5", + "multiformats": "^13.1.0", + "protons-runtime": "^5.4.0", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/libp2p/node_modules/@libp2p/interface": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.1.3.tgz", + "integrity": "sha512-t1i2LWcnTGJEr7fDMslA8wYwBzJP81QKBlrBHoGhXxqqpRQa9035roCh/Akuw5RUgjKE47/ezjuzo90aWsJB8g==", + "dependencies": { + "@multiformats/multiaddr": "^12.2.3", + "it-pushable": "^3.2.3", + "it-stream-types": "^2.0.1", + "multiformats": "^13.1.0", + "progress-events": "^1.0.0", + "uint8arraylist": "^2.4.8" + } + }, + "node_modules/libp2p/node_modules/@libp2p/interface-internal": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@libp2p/interface-internal/-/interface-internal-2.0.8.tgz", + "integrity": "sha512-yWAVuygiy2XhZK2UsOfy3iA30Bi78VeJDac6cAD/FQzu3rmGy2LNYtHuz1Vze9/OL4I6cseMNTGkozTeDg8nMg==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@libp2p/peer-collections": "^6.0.8", + "@multiformats/multiaddr": "^12.2.3", + "progress-events": "^1.0.0", + "uint8arraylist": "^2.4.8" + } + }, + "node_modules/libp2p/node_modules/@libp2p/logger": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-5.1.1.tgz", + "integrity": "sha512-+pwFFZekKQHKdSrGURKZjfAJ86soc1e4HsI0r7dJN+kHICzKFzC+x5hM5GsWCorNj3y++xshWlF/n03zyxoyJQ==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@multiformats/multiaddr": "^12.2.3", + "interface-datastore": "^8.3.0", + "multiformats": "^13.1.0", + "weald": "^1.0.2" + } + }, + "node_modules/libp2p/node_modules/@libp2p/peer-collections": { + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-6.0.8.tgz", + "integrity": "sha512-/xaSvb45lydLibt7sb+Im1ohIGiMfOlz5wcxelEgxmvUd0QmvirZXM3eAavQ+xrxmvJSPEQDmWSP+851ohRlKQ==", + "dependencies": { + "@libp2p/interface": "^2.1.3", + "@libp2p/peer-id": "^5.0.5", + "@libp2p/utils": "^6.1.1", + "multiformats": "^13.2.2" + } + }, + "node_modules/libp2p/node_modules/@libp2p/peer-id": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-5.0.5.tgz", + "integrity": "sha512-+9aX4II0hjMgKcFX/TMWUHRu2wOXOkfV5jO2N5m/R91K+Kp4Tt4n1ceXHjrbwwz3k2IWl0xJOMYjrf9dhOZWAw==", + "dependencies": { + "@libp2p/crypto": "^5.0.5", + "@libp2p/interface": "^2.1.3", + "multiformats": "^13.1.0", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/libp2p/node_modules/@libp2p/utils": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-6.1.1.tgz", + "integrity": "sha512-lpqNyyTx7ygIfXyU4eqDONW7c4oc8Gf1xjDahlOWcggqNhLWsC3/8zTmziKlY3PjTvzY0W37nDRPO1KiM1Sduw==", + "dependencies": { + "@chainsafe/is-ip": "^2.0.2", + "@libp2p/crypto": "^5.0.5", + "@libp2p/interface": "^2.1.3", + "@libp2p/logger": "^5.1.1", + "@multiformats/multiaddr": "^12.2.3", + "@sindresorhus/fnv1a": "^3.1.0", + "@types/murmurhash3js-revisited": "^3.0.3", + "any-signal": "^4.1.1", + "delay": "^6.0.0", + "get-iterator": "^2.0.1", + "is-loopback-addr": "^2.0.2", + "it-foreach": "^2.1.1", + "it-pipe": "^3.0.1", + "it-pushable": "^3.2.3", + "it-stream-types": "^2.0.1", + "murmurhash3js-revisited": "^3.0.0", + "netmask": "^2.0.2", + "p-defer": "^4.0.1", + "race-event": "^1.3.0", + "race-signal": "^1.0.2", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/libp2p/node_modules/datastore-core": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/datastore-core/-/datastore-core-10.0.2.tgz", + "integrity": "sha512-B3WXxI54VxJkpXxnYibiF17si3bLXE1XOjrJB7wM5co9fx2KOEkiePDGiCCEtnapFHTnmAnYCPdA7WZTIpdn/A==", + "dependencies": { + "@libp2p/logger": "^5.0.1", + "interface-datastore": "^8.0.0", + "interface-store": "^6.0.0", + "it-drain": "^3.0.7", + "it-filter": "^3.1.1", + "it-map": "^3.1.1", + "it-merge": "^3.0.5", + "it-pipe": "^3.0.1", + "it-pushable": "^3.2.3", + "it-sort": "^3.0.6", + "it-take": "^3.0.6" + } + }, + "node_modules/libp2p/node_modules/interface-store": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-6.0.2.tgz", + "integrity": "sha512-KSFCXtBlNoG0hzwNa0RmhHtrdhzexp+S+UY2s0rWTBJyfdEIgn6i6Zl9otVqrcFYbYrneBT7hbmHQ8gE0C3umA==" + }, "node_modules/lighthouse-logger": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz", @@ -12700,9 +13232,9 @@ } }, "node_modules/multiformats": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.0.tgz", - "integrity": "sha512-HzdtdBwxsIkzpeXzhQ5mAhhuxcHbjEHH+JQoxt7hG/2HGFjjwyolLo7hbaexcnhoEuV4e0TNJ8kkpMjiEYY4VQ==" + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.3.0.tgz", + "integrity": "sha512-CBiqvsufgmpo01VT5ze94O+uc+Pbf6f/sThlvWss0sBZmAOu6GQn5usrYV2sf2mr17FWYc0rO8c/CNe2T90QAA==" }, "node_modules/murmurhash3js-revisited": { "version": "3.0.0", @@ -13413,6 +13945,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-retry": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.2.0.tgz", + "integrity": "sha512-JA6nkq6hKyWLLasXQXUrO4z8BUZGUt/LjlJxx8Gb2+2ntodU/SS63YZ8b0LUTbQ8ZB9iwOfhEPhg4ykKnn2KsA==", + "dependencies": { + "@types/retry": "0.12.2", + "is-network-error": "^1.0.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-timeout": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.1.2.tgz", @@ -14130,9 +14678,9 @@ "dev": true }, "node_modules/protons-runtime": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-5.4.0.tgz", - "integrity": "sha512-XfA++W/WlQOSyjUyuF5lgYBfXZUEMP01Oh1C2dSwZAlF2e/ZrMRPfWonXj6BGM+o8Xciv7w0tsRMKYwYEuQvaw==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-5.5.0.tgz", + "integrity": "sha512-EsALjF9QsrEk6gbCx3lmfHxVN0ah7nG3cY7GySD4xf4g8cr7g543zB88Foh897Sr1RQJ9yDCUsoT1i1H/cVUFA==", "dependencies": { "uint8-varint": "^2.0.2", "uint8arraylist": "^2.4.3", @@ -14741,6 +15289,14 @@ "resolved": "https://registry.npmjs.org/retimer/-/retimer-3.0.0.tgz", "integrity": "sha512-WKE0j11Pa0ZJI5YIk0nflGI7SQsfl2ljihVy7ogh7DeQSeYAUi0ubZ/yEueGtDfUPk6GH5LRw1hBdLq4IwUBWA==" }, + "node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "engines": { + "node": ">= 4" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -16734,6 +17290,34 @@ "defaults": "^1.0.3" } }, + "node_modules/weald": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/weald/-/weald-1.0.4.tgz", + "integrity": "sha512-+kYTuHonJBwmFhP1Z4YQK/dGi3jAnJGCYhyODFpHK73rbxnp9lnZQj7a2m+WVgn8fXr5bJaxUpF6l8qZpPeNWQ==", + "dependencies": { + "ms": "^3.0.0-canary.1", + "supports-color": "^9.4.0" + } + }, + "node_modules/weald/node_modules/ms": { + "version": "3.0.0-canary.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-3.0.0-canary.1.tgz", + "integrity": "sha512-kh8ARjh8rMN7Du2igDRO9QJnqCb2xYTJxyQYK7vJJS4TvLLmsbyhiKpSW+t+y26gyOyMd0riphX0GeWKU3ky5g==", + "engines": { + "node": ">=12.13" + } + }, + "node_modules/weald/node_modules/supports-color": { + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", + "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", diff --git a/package.json b/package.json index bca2a4c..3bf2f84 100644 --- a/package.json +++ b/package.json @@ -10,12 +10,14 @@ "voyager": "./src/bin/cli.js" }, "dependencies": { - "@chainsafe/libp2p-gossipsub": "^13.1.0", + "@chainsafe/libp2p-gossipsub": "^14.1.0", "@orbitdb/core": "https://github.com/orbitdb/orbitdb.git#expose-identities", "@orbitdb/set-db": "^1.0.2", "blockstore-level": "^1.1.8", "datastore-level": "^10.1.8", "helia": "^4.2.5", + "it-pipe": "^3.0.1", + "libp2p": "^2.1.8", "yargs": "^17.7.2" }, "devDependencies": { diff --git a/src/daemon.js b/src/daemon.js index dda9d54..bc8e1cf 100644 --- a/src/daemon.js +++ b/src/daemon.js @@ -50,11 +50,11 @@ export default async ({ options }) => { let identities = await Identities({ keystore }) await identities.createIdentity({ id }) - const peerId = await createFromPrivKey(await keystore.getKey(id)) + const privateKey = await keystore.getKey(id) await keystore.close() - const libp2p = await createLibp2p(await libp2pConfig({ peerId, port: options.port, websocketPort: options.wsport })) - + const libp2p = await createLibp2p(await libp2pConfig({ privateKey, port: options.port, websocketPort: options.wsport })) + log('peerid:', libp2p.peerId.toString()) for (const addr of libp2p.getMultiaddrs().map(e => e.toString())) { options.silent || console.log(addr) diff --git a/src/utils/libp2p-config.js b/src/utils/libp2p-config.js index 93022c5..dd7a0d2 100644 --- a/src/utils/libp2p-config.js +++ b/src/utils/libp2p-config.js @@ -6,7 +6,7 @@ import { webSockets } from '@libp2p/websockets' import { gossipsub } from '@chainsafe/libp2p-gossipsub' import { mdns } from '@libp2p/mdns' -export const config = ({ peerId, port, websocketPort } = {}) => { +export const config = ({ privateKey, port, websocketPort } = {}) => { const conf = { addresses: { listen: [ @@ -18,7 +18,7 @@ export const config = ({ peerId, port, websocketPort } = {}) => { tcp(), webSockets() ], - connectionEncryption: [ + connectionEncrypters: [ noise() ], streamMuxers: [ @@ -38,8 +38,8 @@ export const config = ({ peerId, port, websocketPort } = {}) => { } } - if (peerId) { - conf.peerId = peerId + if (privateKey) { + conf.privateKey = privateKey } return conf