diff --git a/package-lock.json b/package-lock.json index 440cd0096..1a9ad1d42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,25 +9,25 @@ "version": "0.2.3", "license": "Apache-2.0", "dependencies": { - "@chainsafe/libp2p-noise": "^15.1.0", - "@chainsafe/libp2p-yamux": "^6.0.2", + "@chainsafe/libp2p-noise": "^17.0.0", + "@chainsafe/libp2p-yamux": "^8.0.1", "@elastic/elasticsearch": "^8.14.0", - "@libp2p/autonat": "^2.0.0", - "@libp2p/bootstrap": "^10.1.1", - "@libp2p/circuit-relay-v2": "^1.1.1", - "@libp2p/crypto": "^4.1.5", - "@libp2p/dcutr": "^1.1.1", - "@libp2p/identify": "^2.1.1", - "@libp2p/kad-dht": "^12.1.1", - "@libp2p/mdns": "^10.1.1", - "@libp2p/peer-id": "^4.1.4", - "@libp2p/peer-id-factory": "^4.1.4", - "@libp2p/ping": "^1.1.1", - "@libp2p/pubsub": "^9.0.22", - "@libp2p/pubsub-peer-discovery": "^10.0.2", - "@libp2p/tcp": "^9.1.1", - "@libp2p/upnp-nat": "^1.2.1", - "@libp2p/websockets": "^8.1.1", + "@libp2p/autonat": "^3.0.9", + "@libp2p/bootstrap": "^12.0.10", + "@libp2p/circuit-relay-v2": "^4.1.2", + "@libp2p/crypto": "^5.1.13", + "@libp2p/dcutr": "^3.0.9", + "@libp2p/identify": "^4.0.9", + "@libp2p/kad-dht": "^16.1.2", + "@libp2p/mdns": "^12.0.10", + "@libp2p/peer-id": "^6.0.4", + "@libp2p/peer-id-factory": "^4.2.4", + "@libp2p/ping": "^3.0.9", + "@libp2p/pubsub": "^10.1.18", + "@libp2p/pubsub-peer-discovery": "^12.0.0", + "@libp2p/tcp": "^11.0.9", + "@libp2p/upnp-nat": "^4.0.9", + "@libp2p/websockets": "^10.1.2", "@multiformats/multiaddr": "^12.2.3", "@oceanprotocol/contracts": "^2.5.0", "@oceanprotocol/ddo-js": "^0.1.4", @@ -46,7 +46,7 @@ "ipaddr.js": "^2.3.0", "it-pipe": "^3.0.1", "jsonwebtoken": "^9.0.2", - "libp2p": "^1.8.0", + "libp2p": "^3.1.2", "lodash": "^4.17.21", "lzma-purejs-requirejs": "^1.0.0", "node-cron": "^3.0.3", @@ -101,18 +101,19 @@ } }, "node_modules/@achingbrain/nat-port-mapper": { - "version": "1.0.18", - "resolved": "https://registry.npmjs.org/@achingbrain/nat-port-mapper/-/nat-port-mapper-1.0.18.tgz", - "integrity": "sha512-B3sD+1KmD6qtmnCSdTtoMIwsw5Lj8XNDWnPakXnChm92eaFO7JRfS76oCts6iMFttJzOHq7FT0sNY7sDcbvosA==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@achingbrain/nat-port-mapper/-/nat-port-mapper-4.0.5.tgz", + "integrity": "sha512-YAA4MW6jO6W7pmJaFzQ0AOLpu8iQClUkdT2HbfKLmtFjrpoZugnFj9wH8EONV9LxnIW+0W1J98ri+oApKyAKLQ==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@achingbrain/ssdp": "^4.0.1", - "@libp2p/logger": "^5.0.1", - "default-gateway": "^7.2.2", + "@achingbrain/ssdp": "^4.1.0", + "@chainsafe/is-ip": "^2.0.2", + "@libp2p/logger": "^6.0.5", + "abort-error": "^1.0.0", "err-code": "^3.0.1", - "it-first": "^3.0.1", + "netmask": "^2.0.2", "p-defer": "^4.0.0", - "p-timeout": "^6.1.1", + "race-signal": "^2.0.0", "xml2js": "^0.6.0" } }, @@ -437,9 +438,9 @@ "license": "Apache-2.0" }, "node_modules/@chainsafe/as-sha256": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.4.2.tgz", - "integrity": "sha512-HJ8GZBRjLeWtRsAXf3EbNsNzmTGpzTFjfpSf4yHkLYC+E52DhT6hwz+7qpj6I/EmFzSUm5tYYvT9K8GZokLQCQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-1.2.0.tgz", + "integrity": "sha512-H2BNHQ5C3RS+H0ZvOdovK6GjFAyq5T6LClad8ivwj9Oaiy28uvdsGVS7gNJKuZmg0FGHAI+n7F0Qju6U0QkKDA==", "license": "Apache-2.0" }, "node_modules/@chainsafe/is-ip": { @@ -449,32 +450,51 @@ "license": "MIT" }, "node_modules/@chainsafe/libp2p-noise": { - "version": "15.1.2", - "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-noise/-/libp2p-noise-15.1.2.tgz", - "integrity": "sha512-o6mqsAbaCBucgdLOOHtkwtGVL1c8RLKhlTnHQY+leazY+thiE1Sm6qPCwsTHKQnWii1q5hDVI2Q0l9QgYi5v4Q==", + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-noise/-/libp2p-noise-17.0.0.tgz", + "integrity": "sha512-vwrmY2Y+L1xYhIDiEpl61KHxwrLCZoXzTpwhyk34u+3+6zCAZPL3GxH3i2cs+u5IYNoyLptORdH17RKFXy7upA==", "license": "Apache-2.0 OR MIT", "dependencies": { "@chainsafe/as-chacha20poly1305": "^0.1.0", - "@chainsafe/as-sha256": "^0.4.1", - "@libp2p/crypto": "^4.0.0", - "@libp2p/interface": "^1.5.0", - "@libp2p/peer-id": "^4.0.0", - "@noble/ciphers": "^0.6.0", - "@noble/curves": "^1.1.0", - "@noble/hashes": "^1.3.1", - "it-length-prefixed": "^9.0.1", - "it-length-prefixed-stream": "^1.0.0", - "it-pair": "^2.0.6", - "it-pipe": "^3.0.1", - "it-stream-types": "^2.0.1", - "protons-runtime": "^5.0.0", - "uint8arraylist": "^2.4.3", - "uint8arrays": "^5.0.0", + "@chainsafe/as-sha256": "^1.2.0", + "@libp2p/crypto": "^5.1.9", + "@libp2p/interface": "^3.0.0", + "@libp2p/peer-id": "^6.0.0", + "@libp2p/utils": "^7.0.0", + "@noble/ciphers": "^2.0.1", + "@noble/curves": "^2.0.1", + "@noble/hashes": "^2.0.1", + "protons-runtime": "^5.6.0", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0", "wherearewe": "^2.0.1" + } + }, + "node_modules/@chainsafe/libp2p-noise/node_modules/@noble/curves": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-2.0.1.tgz", + "integrity": "sha512-vs1Az2OOTBiP4q0pwjW5aF0xp9n4MxVrmkFBxc6EKZc6ddYx5gaZiAsZoq0uRRXWbi3AT/sBqn05eRPtn1JCPw==", + "license": "MIT", + "dependencies": { + "@noble/hashes": "2.0.1" }, "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@chainsafe/libp2p-noise/node_modules/@noble/hashes": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.0.1.tgz", + "integrity": "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==", + "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, "node_modules/@chainsafe/libp2p-noise/node_modules/multiformats": { @@ -491,17 +511,14 @@ } }, "node_modules/@chainsafe/libp2p-yamux": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-yamux/-/libp2p-yamux-6.0.2.tgz", - "integrity": "sha512-S5OkLHqYhEVMQQ4BTgnRANEIbGTQhaC23glCgBwGdeoTRtMpIozwDiPfljFLCm0RYWdCRJw9oFztO95KUHjptA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-yamux/-/libp2p-yamux-8.0.1.tgz", + "integrity": "sha512-pJsqmUg1cZRJZn/luAtQaq0uLcVfExo51Rg7iRtAEceNYtsKUi/exfegnvTBzTnF1CGmTzVEV3MCLsRhqiNyoA==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.1.3", - "@libp2p/utils": "^5.2.5", - "get-iterator": "^2.0.1", - "it-foreach": "^2.0.6", - "it-pipe": "^3.0.1", - "it-pushable": "^3.2.3", + "@libp2p/interface": "^3.0.0", + "@libp2p/utils": "^7.0.0", + "race-signal": "^2.0.0", "uint8arraylist": "^2.4.8" } }, @@ -2137,55 +2154,66 @@ "license": "MIT" }, "node_modules/@libp2p/autonat": { - "version": "2.0.38", - "resolved": "https://registry.npmjs.org/@libp2p/autonat/-/autonat-2.0.38.tgz", - "integrity": "sha512-SuJUbXsF0YQg926hxb6d/f7x4NEHqWHLSXnR6Og5fJSOv2A1i1xRUe8zXaCuxQkPa+CguH2tAPZ+l1A+NZlF5A==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@libp2p/autonat/-/autonat-3.0.9.tgz", + "integrity": "sha512-jqNxiGVpf4iBaQA2Bc1b/Uesxf6pO1Cn7tEsnIF01Hf973sRka9sKm372Zw0KMZw/hMTjJvZkt6KkwsOM6x6aw==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^2.11.0", - "@libp2p/interface-internal": "^2.3.19", - "@libp2p/peer-collections": "^6.0.35", - "@libp2p/peer-id": "^5.1.9", - "@libp2p/utils": "^6.7.2", - "@multiformats/multiaddr": "^12.4.4", + "@libp2p/interface": "^3.1.0", + "@libp2p/interface-internal": "^3.0.9", + "@libp2p/peer-collections": "^7.0.9", + "@libp2p/peer-id": "^6.0.4", + "@libp2p/utils": "^7.0.9", + "@multiformats/multiaddr": "^13.0.1", "any-signal": "^4.1.1", - "it-protobuf-stream": "^2.0.2", "main-event": "^1.0.1", - "multiformats": "^13.3.6", - "protons-runtime": "^5.5.0", + "multiformats": "^13.4.0", + "protons-runtime": "^5.6.0", "uint8arraylist": "^2.4.8" } }, - "node_modules/@libp2p/autonat/node_modules/@libp2p/crypto": { - "version": "5.1.13", - "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-5.1.13.tgz", - "integrity": "sha512-8NN9cQP3jDn+p9+QE9ByiEoZ2lemDFf/unTgiKmS3JF93ph240EUVdbCyyEgOMfykzb0okTM4gzvwfx9osJebQ==", + "node_modules/@libp2p/autonat/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^3.1.0", - "@noble/curves": "^2.0.1", - "@noble/hashes": "^2.0.1", - "multiformats": "^13.4.0", - "protons-runtime": "^5.6.0", - "uint8arraylist": "^2.4.8", - "uint8arrays": "^5.1.0" + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, - "node_modules/@libp2p/autonat/node_modules/@libp2p/crypto/node_modules/@libp2p/interface": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-3.1.0.tgz", - "integrity": "sha512-RE7/XyvC47fQBe1cHxhMvepYKa5bFCUyFrrpj8PuM0E7JtzxU7F+Du5j4VXbg2yLDcToe0+j8mB7jvwE2AThYw==", + "node_modules/@libp2p/autonat/node_modules/multiformats": { + "version": "13.4.2", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", + "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/@libp2p/autonat/node_modules/uint8arrays": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", + "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@multiformats/dns": "^1.0.6", + "multiformats": "^13.0.0" + } + }, + "node_modules/@libp2p/bootstrap": { + "version": "12.0.10", + "resolved": "https://registry.npmjs.org/@libp2p/bootstrap/-/bootstrap-12.0.10.tgz", + "integrity": "sha512-TXU88UintWDolGjN183HSzMHdQRzyL95PYAY5TtKetYCd8Z6WFg92LlxjRvIpKb5w/1OMeeI3rZBzC9qivoTYA==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@libp2p/interface": "^3.1.0", + "@libp2p/interface-internal": "^3.0.9", + "@libp2p/peer-id": "^6.0.4", "@multiformats/multiaddr": "^13.0.1", - "main-event": "^1.0.1", - "multiformats": "^13.4.0", - "progress-events": "^1.0.1", - "uint8arraylist": "^2.4.8" + "@multiformats/multiaddr-matcher": "^3.0.1", + "main-event": "^1.0.1" } }, - "node_modules/@libp2p/autonat/node_modules/@libp2p/crypto/node_modules/@multiformats/multiaddr": { + "node_modules/@libp2p/bootstrap/node_modules/@multiformats/multiaddr": { "version": "13.0.1", "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", @@ -2197,66 +2225,90 @@ "uint8arrays": "^5.0.0" } }, - "node_modules/@libp2p/autonat/node_modules/@libp2p/interface": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.11.0.tgz", - "integrity": "sha512-0MUFKoXWHTQW3oWIgSHApmYMUKWO/Y02+7Hpyp+n3z+geD4Xo2Rku2gYWmxcq+Pyjkz6Q9YjDWz3Yb2SoV2E8Q==", + "node_modules/@libp2p/bootstrap/node_modules/multiformats": { + "version": "13.4.2", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", + "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/@libp2p/bootstrap/node_modules/uint8arrays": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", + "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@multiformats/dns": "^1.0.6", - "@multiformats/multiaddr": "^12.4.4", - "it-pushable": "^3.2.3", - "it-stream-types": "^2.0.2", + "multiformats": "^13.0.0" + } + }, + "node_modules/@libp2p/circuit-relay-v2": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@libp2p/circuit-relay-v2/-/circuit-relay-v2-4.1.2.tgz", + "integrity": "sha512-zGYIJUfqzddnxtrrsJE3K6sHxL65Gx8oIAaG90S6vPiL2KBuQUXjbkSShdN9QiK7HbdEY+LWCYVsH0ex7c+C9Q==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@libp2p/crypto": "^5.1.13", + "@libp2p/interface": "^3.1.0", + "@libp2p/interface-internal": "^3.0.9", + "@libp2p/peer-collections": "^7.0.9", + "@libp2p/peer-id": "^6.0.4", + "@libp2p/peer-record": "^9.0.4", + "@libp2p/utils": "^7.0.9", + "@multiformats/multiaddr": "^13.0.1", + "@multiformats/multiaddr-matcher": "^3.0.1", + "any-signal": "^4.1.1", "main-event": "^1.0.1", - "multiformats": "^13.3.6", + "multiformats": "^13.4.0", + "nanoid": "^5.1.5", "progress-events": "^1.0.1", - "uint8arraylist": "^2.4.8" + "protons-runtime": "^5.6.0", + "retimeable-signal": "^1.0.1", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" } }, - "node_modules/@libp2p/autonat/node_modules/@libp2p/peer-id": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-5.1.9.tgz", - "integrity": "sha512-cVDp7lX187Epmi/zr0Qq2RsEMmueswP9eIxYSFoMcHL/qcvRFhsxOfUGB8361E26s2WJvC9sXZ0oJS9XVueJhQ==", + "node_modules/@libp2p/circuit-relay-v2/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/crypto": "^5.1.8", - "@libp2p/interface": "^2.11.0", - "multiformats": "^13.3.6", - "uint8arrays": "^5.1.0" + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, - "node_modules/@libp2p/autonat/node_modules/@libp2p/utils": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-6.7.2.tgz", - "integrity": "sha512-yglVPcYErb4al3MMTdedVLLsdUvr5KaqrrxohxTl/FXMFBvBs0o3w8lo29nfnTUpnNSHFhWZ9at0ZGNnpT/C/w==", + "node_modules/@libp2p/circuit-relay-v2/node_modules/multiformats": { + "version": "13.4.2", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", + "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/@libp2p/circuit-relay-v2/node_modules/uint8arrays": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", + "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@chainsafe/is-ip": "^2.1.0", - "@chainsafe/netmask": "^2.0.0", - "@libp2p/crypto": "^5.1.8", - "@libp2p/interface": "^2.11.0", - "@libp2p/logger": "^5.2.0", - "@multiformats/multiaddr": "^12.4.4", - "@sindresorhus/fnv1a": "^3.1.0", - "any-signal": "^4.1.1", - "delay": "^6.0.0", - "get-iterator": "^2.0.1", - "is-loopback-addr": "^2.0.2", - "is-plain-obj": "^4.1.0", - "it-foreach": "^2.1.3", - "it-pipe": "^3.0.1", - "it-pushable": "^3.2.3", - "it-stream-types": "^2.0.2", - "main-event": "^1.0.1", - "netmask": "^2.0.2", - "p-defer": "^4.0.1", - "race-event": "^1.3.0", - "race-signal": "^1.1.3", + "multiformats": "^13.0.0" + } + }, + "node_modules/@libp2p/crypto": { + "version": "5.1.13", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-5.1.13.tgz", + "integrity": "sha512-8NN9cQP3jDn+p9+QE9ByiEoZ2lemDFf/unTgiKmS3JF93ph240EUVdbCyyEgOMfykzb0okTM4gzvwfx9osJebQ==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@libp2p/interface": "^3.1.0", + "@noble/curves": "^2.0.1", + "@noble/hashes": "^2.0.1", + "multiformats": "^13.4.0", + "protons-runtime": "^5.6.0", "uint8arraylist": "^2.4.8", "uint8arrays": "^5.1.0" } }, - "node_modules/@libp2p/autonat/node_modules/@noble/curves": { + "node_modules/@libp2p/crypto/node_modules/@noble/curves": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-2.0.1.tgz", "integrity": "sha512-vs1Az2OOTBiP4q0pwjW5aF0xp9n4MxVrmkFBxc6EKZc6ddYx5gaZiAsZoq0uRRXWbi3AT/sBqn05eRPtn1JCPw==", @@ -2271,7 +2323,7 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/@libp2p/autonat/node_modules/@noble/hashes": { + "node_modules/@libp2p/crypto/node_modules/@noble/hashes": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.0.1.tgz", "integrity": "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==", @@ -2283,43 +2335,71 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/@libp2p/autonat/node_modules/delay": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/delay/-/delay-6.0.0.tgz", - "integrity": "sha512-2NJozoOHQ4NuZuVIr5CWd0iiLVIRSDepakaovIN+9eIDHEhdCAEvSy2cuf1DCrPPQLvHmbqTHODlhHg8UCy4zw==", - "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node_modules/@libp2p/crypto/node_modules/multiformats": { + "version": "13.4.2", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", + "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/@libp2p/crypto/node_modules/uint8arrays": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", + "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", + "dependencies": { + "multiformats": "^13.0.0" } }, - "node_modules/@libp2p/autonat/node_modules/is-plain-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", - "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "node_modules/@libp2p/dcutr": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@libp2p/dcutr/-/dcutr-3.0.9.tgz", + "integrity": "sha512-oO+2dECZ1HEIc9OrFW+mrXSAU5C7uzrdVy+Zdt+wVQHiYPmBBa6gUK0LMMbn4l9n4MlHxG+AqV2Y9WtkrLPJxA==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@libp2p/interface": "^3.1.0", + "@libp2p/interface-internal": "^3.0.9", + "@libp2p/utils": "^7.0.9", + "@multiformats/multiaddr": "^13.0.1", + "@multiformats/multiaddr-matcher": "^3.0.1", + "delay": "^7.0.0", + "protons-runtime": "^5.6.0", + "uint8arraylist": "^2.4.8" + } + }, + "node_modules/@libp2p/dcutr/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@libp2p/dcutr/node_modules/delay": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-7.0.0.tgz", + "integrity": "sha512-C3vaGs818qzZjCvVJ98GQUMVyWeg7dr5w2Nwwb2t5K8G98jOyyVO2ti2bKYk5yoYElqH3F2yA53ykuEnwD6MCg==", "license": "MIT", + "dependencies": { + "random-int": "^3.1.0", + "unlimited-timeout": "^0.1.0" + }, "engines": { - "node": ">=12" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@libp2p/autonat/node_modules/multiformats": { + "node_modules/@libp2p/dcutr/node_modules/multiformats": { "version": "13.4.2", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, - "node_modules/@libp2p/autonat/node_modules/race-signal": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.1.3.tgz", - "integrity": "sha512-Mt2NznMgepLfORijhQMncE26IhkmjEphig+/1fKC0OtaKwys/gpvpmswSjoN01SS+VO951mj0L4VIDXdXsjnfA==", - "license": "Apache-2.0 OR MIT" - }, - "node_modules/@libp2p/autonat/node_modules/uint8arrays": { + "node_modules/@libp2p/dcutr/node_modules/uint8arrays": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", @@ -2328,92 +2408,47 @@ "multiformats": "^13.0.0" } }, - "node_modules/@libp2p/bootstrap": { - "version": "10.1.5", - "resolved": "https://registry.npmjs.org/@libp2p/bootstrap/-/bootstrap-10.1.5.tgz", - "integrity": "sha512-cXn/Wl7X4uaVGRyh/uSU/crRbhsPkyzH59hzoLP3727f7w82o+sIHVr4SkJcJewt+LZELBLgkJTibZxAntA1dA==", + "node_modules/@libp2p/identify": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@libp2p/identify/-/identify-4.0.9.tgz", + "integrity": "sha512-tZ6Q+eCDcGan0TowBvp7sd86jgXIHs7PRIZeBduhjYV24QYSQ1V4mS71RygNRadhn4TVoZkuXwgIByc30eZWhw==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/peer-id": "^4.2.4", - "@multiformats/mafmt": "^12.1.6", - "@multiformats/multiaddr": "^12.2.3" - } - }, - "node_modules/@libp2p/circuit-relay-v2": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@libp2p/circuit-relay-v2/-/circuit-relay-v2-1.1.5.tgz", - "integrity": "sha512-WVIHaj61LJd2JB6vvPikd049NhC2R3vrkuu4T00WJSMNWobmhrKPvFyQMN+1miL6KmdL8Yt1AjK0gog2oT4vDw==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/interface-internal": "^1.3.4", - "@libp2p/peer-collections": "^5.2.9", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/peer-record": "^7.0.25", - "@libp2p/utils": "^5.4.9", - "@multiformats/mafmt": "^12.1.6", - "@multiformats/multiaddr": "^12.2.3", - "any-signal": "^4.1.1", - "it-protobuf-stream": "^1.1.3", - "it-stream-types": "^2.0.1", - "multiformats": "^13.1.0", - "p-defer": "^4.0.1", - "progress-events": "^1.0.0", - "protons-runtime": "^5.4.0", - "race-signal": "^1.0.2", + "@libp2p/crypto": "^5.1.13", + "@libp2p/interface": "^3.1.0", + "@libp2p/interface-internal": "^3.0.9", + "@libp2p/peer-id": "^6.0.4", + "@libp2p/peer-record": "^9.0.4", + "@libp2p/utils": "^7.0.9", + "@multiformats/multiaddr": "^13.0.1", + "@multiformats/multiaddr-matcher": "^3.0.1", + "it-drain": "^3.0.10", + "it-parallel": "^3.0.13", + "main-event": "^1.0.1", + "protons-runtime": "^5.6.0", "uint8arraylist": "^2.4.8", "uint8arrays": "^5.1.0" } }, - "node_modules/@libp2p/circuit-relay-v2/node_modules/@libp2p/interface-internal": { - "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==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@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" - } - }, - "node_modules/@libp2p/circuit-relay-v2/node_modules/@libp2p/peer-collections": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.2.9.tgz", - "integrity": "sha512-8gBmzQlCWjjb+FSQBKK33T25Y5Df/8FWCXFtJDsprVxVUzDOQoibQJ5Tb4Y+mb96HUhNzoaRWVEamB78MMB3DA==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/utils": "^5.4.9" - } - }, - "node_modules/@libp2p/circuit-relay-v2/node_modules/it-protobuf-stream": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/it-protobuf-stream/-/it-protobuf-stream-1.1.6.tgz", - "integrity": "sha512-TxqgDHXTBt1XkYhrGKP8ubNsYD4zuTClSg6S1M0xTPsskGKA4nPFOGM60zrkh4NMB1Wt3EnsqM5U7kXkx60EXQ==", + "node_modules/@libp2p/identify/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "it-length-prefixed-stream": "^1.0.0", - "it-stream-types": "^2.0.2", - "uint8arraylist": "^2.4.8" + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, - "node_modules/@libp2p/circuit-relay-v2/node_modules/multiformats": { + "node_modules/@libp2p/identify/node_modules/multiformats": { "version": "13.4.2", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, - "node_modules/@libp2p/circuit-relay-v2/node_modules/race-signal": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.1.3.tgz", - "integrity": "sha512-Mt2NznMgepLfORijhQMncE26IhkmjEphig+/1fKC0OtaKwys/gpvpmswSjoN01SS+VO951mj0L4VIDXdXsjnfA==", - "license": "Apache-2.0 OR MIT" - }, - "node_modules/@libp2p/circuit-relay-v2/node_modules/uint8arrays": { + "node_modules/@libp2p/identify/node_modules/uint8arrays": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", @@ -2422,190 +2457,78 @@ "multiformats": "^13.0.0" } }, - "node_modules/@libp2p/crypto": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-4.1.9.tgz", - "integrity": "sha512-8Cf2VKh0uC/rQLvTLSloIOMqUvf4jsSTHXgjWQRf47lDNJlNNI0wSv2S6gakT72GZsRV/jCjYwKPqRlsa5S0iA==", + "node_modules/@libp2p/interface": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-3.1.0.tgz", + "integrity": "sha512-RE7/XyvC47fQBe1cHxhMvepYKa5bFCUyFrrpj8PuM0E7JtzxU7F+Du5j4VXbg2yLDcToe0+j8mB7jvwE2AThYw==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@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" + "@multiformats/dns": "^1.0.6", + "@multiformats/multiaddr": "^13.0.1", + "main-event": "^1.0.1", + "multiformats": "^13.4.0", + "progress-events": "^1.0.1", + "uint8arraylist": "^2.4.8" } }, - "node_modules/@libp2p/crypto/node_modules/@noble/curves": { - "version": "1.9.7", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", - "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", - "license": "MIT", + "node_modules/@libp2p/interface-internal": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@libp2p/interface-internal/-/interface-internal-3.0.9.tgz", + "integrity": "sha512-g6hqsrorej945uh/iwA4MY4n7vAFq5mtuMXOf1vo4CS2v8Zl3RMOl0mQZIhUpHLq8XV2aZ3C5rSe4+KsOmZM5A==", + "license": "Apache-2.0 OR MIT", "dependencies": { - "@noble/hashes": "1.8.0" - }, - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "@libp2p/interface": "^3.1.0", + "@libp2p/peer-collections": "^7.0.9", + "@multiformats/multiaddr": "^13.0.1", + "progress-events": "^1.0.1" } }, - "node_modules/@libp2p/crypto/node_modules/@noble/hashes": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", - "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", - "license": "MIT", - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "node_modules/@libp2p/interface-internal/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, - "node_modules/@libp2p/crypto/node_modules/multiformats": { + "node_modules/@libp2p/interface-internal/node_modules/multiformats": { "version": "13.4.2", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, - "node_modules/@libp2p/crypto/node_modules/uint8arrays": { + "node_modules/@libp2p/interface-internal/node_modules/uint8arrays": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", - "dependencies": { - "multiformats": "^13.0.0" - } - }, - "node_modules/@libp2p/dcutr": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@libp2p/dcutr/-/dcutr-1.1.5.tgz", - "integrity": "sha512-1zDhZxLxrl+yqIAG9KzyLu3gzyvOT7UYTislw4EwhcMGMviot/pgR87SSVqbT+HDpAoj1sM/3F5VUT/sCDa9WA==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/interface-internal": "^1.3.4", - "@libp2p/utils": "^5.4.9", - "@multiformats/multiaddr": "^12.2.3", - "@multiformats/multiaddr-matcher": "^1.2.1", - "delay": "^6.0.0", - "it-protobuf-stream": "^1.1.3", - "protons-runtime": "^5.4.0", - "uint8arraylist": "^2.4.8" - } - }, - "node_modules/@libp2p/dcutr/node_modules/@libp2p/interface-internal": { - "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==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@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" - } - }, - "node_modules/@libp2p/dcutr/node_modules/@libp2p/peer-collections": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.2.9.tgz", - "integrity": "sha512-8gBmzQlCWjjb+FSQBKK33T25Y5Df/8FWCXFtJDsprVxVUzDOQoibQJ5Tb4Y+mb96HUhNzoaRWVEamB78MMB3DA==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/utils": "^5.4.9" - } - }, - "node_modules/@libp2p/dcutr/node_modules/delay": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/delay/-/delay-6.0.0.tgz", - "integrity": "sha512-2NJozoOHQ4NuZuVIr5CWd0iiLVIRSDepakaovIN+9eIDHEhdCAEvSy2cuf1DCrPPQLvHmbqTHODlhHg8UCy4zw==", - "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@libp2p/dcutr/node_modules/it-protobuf-stream": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/it-protobuf-stream/-/it-protobuf-stream-1.1.6.tgz", - "integrity": "sha512-TxqgDHXTBt1XkYhrGKP8ubNsYD4zuTClSg6S1M0xTPsskGKA4nPFOGM60zrkh4NMB1Wt3EnsqM5U7kXkx60EXQ==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "it-length-prefixed-stream": "^1.0.0", - "it-stream-types": "^2.0.2", - "uint8arraylist": "^2.4.8" - } - }, - "node_modules/@libp2p/identify": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@libp2p/identify/-/identify-2.1.5.tgz", - "integrity": "sha512-uVghY2KfZ3ffDkPmcivfiRDlq1h5rCcoHAW+Kb7JF2qrDfg6BgHAn6IRN4pe/DnYXOuJXIIm6+jjcReTPGBKBQ==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/interface-internal": "^1.3.4", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/peer-record": "^7.0.25", - "@multiformats/multiaddr": "^12.2.3", - "@multiformats/multiaddr-matcher": "^1.2.1", - "it-drain": "^3.0.7", - "it-parallel": "^3.0.7", - "it-protobuf-stream": "^1.1.3", - "protons-runtime": "^5.4.0", - "uint8arraylist": "^2.4.8", - "uint8arrays": "^5.1.0", - "wherearewe": "^2.0.1" - } - }, - "node_modules/@libp2p/identify/node_modules/@libp2p/interface-internal": { - "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==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@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" - } - }, - "node_modules/@libp2p/identify/node_modules/@libp2p/peer-collections": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.2.9.tgz", - "integrity": "sha512-8gBmzQlCWjjb+FSQBKK33T25Y5Df/8FWCXFtJDsprVxVUzDOQoibQJ5Tb4Y+mb96HUhNzoaRWVEamB78MMB3DA==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/utils": "^5.4.9" + "multiformats": "^13.0.0" } }, - "node_modules/@libp2p/identify/node_modules/it-protobuf-stream": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/it-protobuf-stream/-/it-protobuf-stream-1.1.6.tgz", - "integrity": "sha512-TxqgDHXTBt1XkYhrGKP8ubNsYD4zuTClSg6S1M0xTPsskGKA4nPFOGM60zrkh4NMB1Wt3EnsqM5U7kXkx60EXQ==", + "node_modules/@libp2p/interface/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "it-length-prefixed-stream": "^1.0.0", - "it-stream-types": "^2.0.2", - "uint8arraylist": "^2.4.8" + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, - "node_modules/@libp2p/identify/node_modules/multiformats": { + "node_modules/@libp2p/interface/node_modules/multiformats": { "version": "13.4.2", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, - "node_modules/@libp2p/identify/node_modules/uint8arrays": { + "node_modules/@libp2p/interface/node_modules/uint8arrays": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", @@ -2614,131 +2537,55 @@ "multiformats": "^13.0.0" } }, - "node_modules/@libp2p/interface": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.7.0.tgz", - "integrity": "sha512-/zFyaIaIGW0aihhsH7/93vQdpWInUzFocxF11RO/029Y6h0SVjs24HHbils+DqaFDTqN+L7oNlBx2rM2MnmTjA==", - "license": "Apache-2.0 OR MIT", - "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/interface-internal": { - "version": "2.3.19", - "resolved": "https://registry.npmjs.org/@libp2p/interface-internal/-/interface-internal-2.3.19.tgz", - "integrity": "sha512-v335EB0i5CaNF+0SqT01CTBp0VyjJizpy46KprcshFFjX16UQ8+/QzoTZqmot9WiAmAzwR0b87oKmlAE9cpxzQ==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface": "^2.11.0", - "@libp2p/peer-collections": "^6.0.35", - "@multiformats/multiaddr": "^12.4.4", - "progress-events": "^1.0.1" - } - }, - "node_modules/@libp2p/interface-internal/node_modules/@libp2p/interface": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.11.0.tgz", - "integrity": "sha512-0MUFKoXWHTQW3oWIgSHApmYMUKWO/Y02+7Hpyp+n3z+geD4Xo2Rku2gYWmxcq+Pyjkz6Q9YjDWz3Yb2SoV2E8Q==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@multiformats/dns": "^1.0.6", - "@multiformats/multiaddr": "^12.4.4", - "it-pushable": "^3.2.3", - "it-stream-types": "^2.0.2", - "main-event": "^1.0.1", - "multiformats": "^13.3.6", - "progress-events": "^1.0.1", - "uint8arraylist": "^2.4.8" - } - }, - "node_modules/@libp2p/interface-internal/node_modules/multiformats": { - "version": "13.4.2", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", - "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", - "license": "Apache-2.0 OR MIT" - }, - "node_modules/@libp2p/interface/node_modules/multiformats": { - "version": "13.4.2", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", - "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", - "license": "Apache-2.0 OR MIT" - }, "node_modules/@libp2p/kad-dht": { - "version": "12.1.5", - "resolved": "https://registry.npmjs.org/@libp2p/kad-dht/-/kad-dht-12.1.5.tgz", - "integrity": "sha512-n/Tdd3zVa2p1S4L6wRIBUAo3ctCbiEkp1aewpOUthL6rOwBh6U/RQ+dssiZNEDHCsF1ta/mZkREuXqxOPpplFQ==", + "version": "16.1.2", + "resolved": "https://registry.npmjs.org/@libp2p/kad-dht/-/kad-dht-16.1.2.tgz", + "integrity": "sha512-s/S859NPnF2DaLcV7ynPhFHvW2wGhaHdKQbOI6yziICe/A6/eJtTM4hjjHHCoqo+hG7Duj8Tnk/GYsrfG6Qdrg==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/crypto": "^4.1.9", - "@libp2p/interface": "^1.7.0", - "@libp2p/interface-internal": "^1.3.4", - "@libp2p/peer-collections": "^5.2.9", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/record": "^4.0.4", - "@libp2p/utils": "^5.4.9", - "@multiformats/multiaddr": "^12.2.3", + "@libp2p/crypto": "^5.1.13", + "@libp2p/interface": "^3.1.0", + "@libp2p/interface-internal": "^3.0.9", + "@libp2p/peer-collections": "^7.0.9", + "@libp2p/peer-id": "^6.0.4", + "@libp2p/ping": "^3.0.9", + "@libp2p/record": "^4.0.8", + "@libp2p/utils": "^7.0.9", + "@multiformats/multiaddr": "^13.0.1", + "@multiformats/multiaddr-matcher": "^3.0.1", "any-signal": "^4.1.1", - "hashlru": "^2.3.0", - "interface-datastore": "^8.2.11", - "it-drain": "^3.0.7", - "it-length": "^3.0.6", - "it-length-prefixed": "^9.0.4", - "it-map": "^3.1.0", - "it-merge": "^3.0.5", - "it-parallel": "^3.0.7", + "interface-datastore": "^9.0.1", + "it-all": "^3.0.9", + "it-drain": "^3.0.10", + "it-length": "^3.0.9", + "it-map": "^3.1.4", + "it-merge": "^3.0.12", + "it-parallel": "^3.0.13", "it-pipe": "^3.0.1", - "it-protobuf-stream": "^1.1.3", - "it-take": "^3.0.5", - "multiformats": "^13.1.0", + "it-pushable": "^3.2.3", + "it-take": "^3.0.9", + "main-event": "^1.0.1", + "multiformats": "^13.4.0", "p-defer": "^4.0.1", - "p-event": "^6.0.1", - "p-queue": "^8.0.1", - "progress-events": "^1.0.0", - "protons-runtime": "^5.4.0", - "race-signal": "^1.0.2", + "p-event": "^7.0.0", + "progress-events": "^1.0.1", + "protons-runtime": "^5.6.0", + "race-signal": "^2.0.0", "uint8-varint": "^2.0.4", "uint8arraylist": "^2.4.8", "uint8arrays": "^5.1.0" } }, - "node_modules/@libp2p/kad-dht/node_modules/@libp2p/interface-internal": { - "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==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@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" - } - }, - "node_modules/@libp2p/kad-dht/node_modules/@libp2p/peer-collections": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.2.9.tgz", - "integrity": "sha512-8gBmzQlCWjjb+FSQBKK33T25Y5Df/8FWCXFtJDsprVxVUzDOQoibQJ5Tb4Y+mb96HUhNzoaRWVEamB78MMB3DA==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/utils": "^5.4.9" - } - }, - "node_modules/@libp2p/kad-dht/node_modules/it-protobuf-stream": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/it-protobuf-stream/-/it-protobuf-stream-1.1.6.tgz", - "integrity": "sha512-TxqgDHXTBt1XkYhrGKP8ubNsYD4zuTClSg6S1M0xTPsskGKA4nPFOGM60zrkh4NMB1Wt3EnsqM5U7kXkx60EXQ==", + "node_modules/@libp2p/kad-dht/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "it-length-prefixed-stream": "^1.0.0", - "it-stream-types": "^2.0.2", - "uint8arraylist": "^2.4.8" + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, "node_modules/@libp2p/kad-dht/node_modules/multiformats": { @@ -2747,12 +2594,6 @@ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, - "node_modules/@libp2p/kad-dht/node_modules/race-signal": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.1.3.tgz", - "integrity": "sha512-Mt2NznMgepLfORijhQMncE26IhkmjEphig+/1fKC0OtaKwys/gpvpmswSjoN01SS+VO951mj0L4VIDXdXsjnfA==", - "license": "Apache-2.0 OR MIT" - }, "node_modules/@libp2p/kad-dht/node_modules/uint8arrays": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", @@ -2763,32 +2604,28 @@ } }, "node_modules/@libp2p/logger": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-5.2.0.tgz", - "integrity": "sha512-OEFS529CnIKfbWEHmuCNESw9q0D0hL8cQ8klQfjIVPur15RcgAEgc1buQ7Y6l0B6tCYg120bp55+e9tGvn8c0g==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-6.2.2.tgz", + "integrity": "sha512-XtanXDT+TuMuZoCK760HGV1AmJsZbwAw5AiRUxWDbsZPwAroYq64nb41AHRu9Gyc0TK9YD+p72+5+FIxbw0hzw==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^2.11.0", - "@multiformats/multiaddr": "^12.4.4", - "interface-datastore": "^8.3.1", - "multiformats": "^13.3.6", - "weald": "^1.0.4" + "@libp2p/interface": "^3.1.0", + "@multiformats/multiaddr": "^13.0.1", + "interface-datastore": "^9.0.1", + "multiformats": "^13.4.0", + "weald": "^1.1.0" } }, - "node_modules/@libp2p/logger/node_modules/@libp2p/interface": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.11.0.tgz", - "integrity": "sha512-0MUFKoXWHTQW3oWIgSHApmYMUKWO/Y02+7Hpyp+n3z+geD4Xo2Rku2gYWmxcq+Pyjkz6Q9YjDWz3Yb2SoV2E8Q==", + "node_modules/@libp2p/logger/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@multiformats/dns": "^1.0.6", - "@multiformats/multiaddr": "^12.4.4", - "it-pushable": "^3.2.3", - "it-stream-types": "^2.0.2", - "main-event": "^1.0.1", - "multiformats": "^13.3.6", - "progress-events": "^1.0.1", - "uint8arraylist": "^2.4.8" + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, "node_modules/@libp2p/logger/node_modules/multiformats": { @@ -2797,59 +2634,68 @@ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, + "node_modules/@libp2p/logger/node_modules/uint8arrays": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", + "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "multiformats": "^13.0.0" + } + }, "node_modules/@libp2p/mdns": { - "version": "10.1.5", - "resolved": "https://registry.npmjs.org/@libp2p/mdns/-/mdns-10.1.5.tgz", - "integrity": "sha512-iSBnjaUgPdPudXP3ZPXJMWzJkT+I+TQHRCBTh6OMPa0V2C/MhL+FfCGn0SDMWKSDDwqK6I6UOeTflf4YUzy/8w==", + "version": "12.0.10", + "resolved": "https://registry.npmjs.org/@libp2p/mdns/-/mdns-12.0.10.tgz", + "integrity": "sha512-dghYN1g74KA5GaeL4g9s6eDmca5fZy1oMREU0R0eF8g+astHpWzx5UzTBeco4Q67bPs6o0b5NxtDGlwFh4oTBw==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/interface-internal": "^1.3.4", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/utils": "^5.4.9", - "@multiformats/multiaddr": "^12.2.3", + "@libp2p/interface": "^3.1.0", + "@libp2p/interface-internal": "^3.0.9", + "@libp2p/peer-id": "^6.0.4", + "@libp2p/utils": "^7.0.9", + "@multiformats/multiaddr": "^13.0.1", "@types/multicast-dns": "^7.2.4", "dns-packet": "^5.6.1", + "main-event": "^1.0.1", "multicast-dns": "^7.2.5" } }, - "node_modules/@libp2p/mdns/node_modules/@libp2p/interface-internal": { - "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==", + "node_modules/@libp2p/mdns/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@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" + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, - "node_modules/@libp2p/mdns/node_modules/@libp2p/peer-collections": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.2.9.tgz", - "integrity": "sha512-8gBmzQlCWjjb+FSQBKK33T25Y5Df/8FWCXFtJDsprVxVUzDOQoibQJ5Tb4Y+mb96HUhNzoaRWVEamB78MMB3DA==", + "node_modules/@libp2p/mdns/node_modules/multiformats": { + "version": "13.4.2", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", + "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/@libp2p/mdns/node_modules/uint8arrays": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", + "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/utils": "^5.4.9" + "multiformats": "^13.0.0" } }, "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==", + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@libp2p/multistream-select/-/multistream-select-7.0.9.tgz", + "integrity": "sha512-2WAaYuTD1B5FtC0+qFVyglMBnzI0KC8Xmiw7nX9XnlYwrnLj2LIBi/XK7MpsGU1LiphSxT8UfmngwnAWf4t1Dg==", "license": "Apache-2.0 OR MIT", "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", + "@libp2p/interface": "^3.1.0", + "@libp2p/utils": "^7.0.9", + "it-length-prefixed": "^10.0.1", "uint8arraylist": "^2.4.8", "uint8arrays": "^5.1.0" } @@ -2860,12 +2706,6 @@ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, - "node_modules/@libp2p/multistream-select/node_modules/race-signal": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.1.3.tgz", - "integrity": "sha512-Mt2NznMgepLfORijhQMncE26IhkmjEphig+/1fKC0OtaKwys/gpvpmswSjoN01SS+VO951mj0L4VIDXdXsjnfA==", - "license": "Apache-2.0 OR MIT" - }, "node_modules/@libp2p/multistream-select/node_modules/uint8arrays": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", @@ -2876,214 +2716,117 @@ } }, "node_modules/@libp2p/peer-collections": { - "version": "6.0.35", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-6.0.35.tgz", - "integrity": "sha512-QiloK3T7DXW7R2cpL38dBnALCHf5pMzs/TyFzlEK33WezA2YFVoj7CtOJKqbn29bmV9uspWOxMgfmLUXf8ALvA==", + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-7.0.9.tgz", + "integrity": "sha512-pAMRxmT5V31V0gy2MfwVE1TMAcTnbyBYFOv60OWnkKth4hD+HvQ9DLW1z+opYDqRNON5sIWjcnDsIQDm2VUS7A==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^2.11.0", - "@libp2p/peer-id": "^5.1.9", - "@libp2p/utils": "^6.7.2", - "multiformats": "^13.3.6" + "@libp2p/interface": "^3.1.0", + "@libp2p/peer-id": "^6.0.4", + "@libp2p/utils": "^7.0.9", + "multiformats": "^13.4.0" } }, - "node_modules/@libp2p/peer-collections/node_modules/@libp2p/crypto": { - "version": "5.1.13", - "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-5.1.13.tgz", - "integrity": "sha512-8NN9cQP3jDn+p9+QE9ByiEoZ2lemDFf/unTgiKmS3JF93ph240EUVdbCyyEgOMfykzb0okTM4gzvwfx9osJebQ==", + "node_modules/@libp2p/peer-collections/node_modules/multiformats": { + "version": "13.4.2", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", + "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/@libp2p/peer-id": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-6.0.4.tgz", + "integrity": "sha512-Z3xK0lwwKn4bPg3ozEpPr1HxsRi2CxZdghOL+MXoFah/8uhJJHxHFA8A/jxtKn4BB8xkk6F8R5vKNIS05yaCYw==", "license": "Apache-2.0 OR MIT", "dependencies": { + "@libp2p/crypto": "^5.1.13", "@libp2p/interface": "^3.1.0", - "@noble/curves": "^2.0.1", - "@noble/hashes": "^2.0.1", "multiformats": "^13.4.0", - "protons-runtime": "^5.6.0", - "uint8arraylist": "^2.4.8", "uint8arrays": "^5.1.0" } }, - "node_modules/@libp2p/peer-collections/node_modules/@libp2p/crypto/node_modules/@libp2p/interface": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-3.1.0.tgz", - "integrity": "sha512-RE7/XyvC47fQBe1cHxhMvepYKa5bFCUyFrrpj8PuM0E7JtzxU7F+Du5j4VXbg2yLDcToe0+j8mB7jvwE2AThYw==", + "node_modules/@libp2p/peer-id-factory": { + "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==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@multiformats/dns": "^1.0.6", - "@multiformats/multiaddr": "^13.0.1", - "main-event": "^1.0.1", - "multiformats": "^13.4.0", - "progress-events": "^1.0.1", - "uint8arraylist": "^2.4.8" + "@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-collections/node_modules/@libp2p/crypto/node_modules/@multiformats/multiaddr": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", - "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", + "node_modules/@libp2p/peer-id-factory/node_modules/@libp2p/crypto": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-4.1.9.tgz", + "integrity": "sha512-8Cf2VKh0uC/rQLvTLSloIOMqUvf4jsSTHXgjWQRf47lDNJlNNI0wSv2S6gakT72GZsRV/jCjYwKPqRlsa5S0iA==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@chainsafe/is-ip": "^2.0.1", - "multiformats": "^13.0.0", - "uint8-varint": "^2.0.1", - "uint8arrays": "^5.0.0" + "@libp2p/interface": "^1.7.0", + "@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-collections/node_modules/@libp2p/interface": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.11.0.tgz", - "integrity": "sha512-0MUFKoXWHTQW3oWIgSHApmYMUKWO/Y02+7Hpyp+n3z+geD4Xo2Rku2gYWmxcq+Pyjkz6Q9YjDWz3Yb2SoV2E8Q==", + "node_modules/@libp2p/peer-id-factory/node_modules/@libp2p/interface": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.7.0.tgz", + "integrity": "sha512-/zFyaIaIGW0aihhsH7/93vQdpWInUzFocxF11RO/029Y6h0SVjs24HHbils+DqaFDTqN+L7oNlBx2rM2MnmTjA==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@multiformats/dns": "^1.0.6", - "@multiformats/multiaddr": "^12.4.4", + "@multiformats/multiaddr": "^12.2.3", "it-pushable": "^3.2.3", - "it-stream-types": "^2.0.2", - "main-event": "^1.0.1", - "multiformats": "^13.3.6", - "progress-events": "^1.0.1", + "it-stream-types": "^2.0.1", + "multiformats": "^13.1.0", + "progress-events": "^1.0.0", "uint8arraylist": "^2.4.8" } }, - "node_modules/@libp2p/peer-collections/node_modules/@libp2p/peer-id": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-5.1.9.tgz", - "integrity": "sha512-cVDp7lX187Epmi/zr0Qq2RsEMmueswP9eIxYSFoMcHL/qcvRFhsxOfUGB8361E26s2WJvC9sXZ0oJS9XVueJhQ==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/crypto": "^5.1.8", - "@libp2p/interface": "^2.11.0", - "multiformats": "^13.3.6", - "uint8arrays": "^5.1.0" - } - }, - "node_modules/@libp2p/peer-collections/node_modules/@libp2p/utils": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-6.7.2.tgz", - "integrity": "sha512-yglVPcYErb4al3MMTdedVLLsdUvr5KaqrrxohxTl/FXMFBvBs0o3w8lo29nfnTUpnNSHFhWZ9at0ZGNnpT/C/w==", + "node_modules/@libp2p/peer-id-factory/node_modules/@libp2p/peer-id": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-4.2.4.tgz", + "integrity": "sha512-mvvsVxt4HkF14BrTNKbqr14VObW+KBJBWu1Oe6BFCoDttGMQLaI+PdduE1r6Tquntv5IONBqoITgD7ow5dQ+vQ==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@chainsafe/is-ip": "^2.1.0", - "@chainsafe/netmask": "^2.0.0", - "@libp2p/crypto": "^5.1.8", - "@libp2p/interface": "^2.11.0", - "@libp2p/logger": "^5.2.0", - "@multiformats/multiaddr": "^12.4.4", - "@sindresorhus/fnv1a": "^3.1.0", - "any-signal": "^4.1.1", - "delay": "^6.0.0", - "get-iterator": "^2.0.1", - "is-loopback-addr": "^2.0.2", - "is-plain-obj": "^4.1.0", - "it-foreach": "^2.1.3", - "it-pipe": "^3.0.1", - "it-pushable": "^3.2.3", - "it-stream-types": "^2.0.2", - "main-event": "^1.0.1", - "netmask": "^2.0.2", - "p-defer": "^4.0.1", - "race-event": "^1.3.0", - "race-signal": "^1.1.3", - "uint8arraylist": "^2.4.8", + "@libp2p/interface": "^1.7.0", + "multiformats": "^13.1.0", "uint8arrays": "^5.1.0" } }, - "node_modules/@libp2p/peer-collections/node_modules/@noble/curves": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-2.0.1.tgz", - "integrity": "sha512-vs1Az2OOTBiP4q0pwjW5aF0xp9n4MxVrmkFBxc6EKZc6ddYx5gaZiAsZoq0uRRXWbi3AT/sBqn05eRPtn1JCPw==", + "node_modules/@libp2p/peer-id-factory/node_modules/@noble/curves": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", "license": "MIT", "dependencies": { - "@noble/hashes": "2.0.1" + "@noble/hashes": "1.8.0" }, "engines": { - "node": ">= 20.19.0" + "node": "^14.21.3 || >=16" }, "funding": { "url": "https://paulmillr.com/funding/" } }, - "node_modules/@libp2p/peer-collections/node_modules/@noble/hashes": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.0.1.tgz", - "integrity": "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==", + "node_modules/@libp2p/peer-id-factory/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", "license": "MIT", "engines": { - "node": ">= 20.19.0" + "node": "^14.21.3 || >=16" }, "funding": { "url": "https://paulmillr.com/funding/" } }, - "node_modules/@libp2p/peer-collections/node_modules/delay": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/delay/-/delay-6.0.0.tgz", - "integrity": "sha512-2NJozoOHQ4NuZuVIr5CWd0iiLVIRSDepakaovIN+9eIDHEhdCAEvSy2cuf1DCrPPQLvHmbqTHODlhHg8UCy4zw==", - "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@libp2p/peer-collections/node_modules/is-plain-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", - "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@libp2p/peer-collections/node_modules/multiformats": { - "version": "13.4.2", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", - "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", - "license": "Apache-2.0 OR MIT" - }, - "node_modules/@libp2p/peer-collections/node_modules/race-signal": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.1.3.tgz", - "integrity": "sha512-Mt2NznMgepLfORijhQMncE26IhkmjEphig+/1fKC0OtaKwys/gpvpmswSjoN01SS+VO951mj0L4VIDXdXsjnfA==", - "license": "Apache-2.0 OR MIT" - }, - "node_modules/@libp2p/peer-collections/node_modules/uint8arrays": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", - "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "multiformats": "^13.0.0" - } - }, - "node_modules/@libp2p/peer-id": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-4.2.4.tgz", - "integrity": "sha512-mvvsVxt4HkF14BrTNKbqr14VObW+KBJBWu1Oe6BFCoDttGMQLaI+PdduE1r6Tquntv5IONBqoITgD7ow5dQ+vQ==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface": "^1.7.0", - "multiformats": "^13.1.0", - "uint8arrays": "^5.1.0" - } - }, - "node_modules/@libp2p/peer-id-factory": { - "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==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@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-id-factory/node_modules/multiformats": { "version": "13.1.3", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.3.tgz", @@ -3112,22 +2855,34 @@ } }, "node_modules/@libp2p/peer-record": { - "version": "7.0.25", - "resolved": "https://registry.npmjs.org/@libp2p/peer-record/-/peer-record-7.0.25.tgz", - "integrity": "sha512-b54P3cSeQniW/HPJjBVbeF3KaVUQkWa431gotuIFUS1PYgtz69uzkRrVY6Qt+RBb4R4fcmH4K4jWyZi3xyLGfQ==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@libp2p/peer-record/-/peer-record-9.0.4.tgz", + "integrity": "sha512-c8NrP2q0FPIiEef2IKOQFi7k0CJK1vr0uk+jbn6KjF85YUWVyaVvuncZG7EwAjO68tuwGS0LLrvJWJbjHFqAwQ==", "license": "Apache-2.0 OR MIT", "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", + "@libp2p/crypto": "^5.1.13", + "@libp2p/interface": "^3.1.0", + "@libp2p/peer-id": "^6.0.4", + "@multiformats/multiaddr": "^13.0.1", + "multiformats": "^13.4.0", + "protons-runtime": "^5.6.0", "uint8-varint": "^2.0.4", "uint8arraylist": "^2.4.8", "uint8arrays": "^5.1.0" } }, + "node_modules/@libp2p/peer-record/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" + } + }, "node_modules/@libp2p/peer-record/node_modules/multiformats": { "version": "13.4.2", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", @@ -3144,34 +2899,37 @@ } }, "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==", + "version": "12.0.9", + "resolved": "https://registry.npmjs.org/@libp2p/peer-store/-/peer-store-12.0.9.tgz", + "integrity": "sha512-+OOKqrllUUACE3IcfFEVcByJo1fMUy9kztxwfy5wmOxybcysxmJ5p3NmETDCqRhlY2sEk55NuRLh5vzDfJIcQQ==", "license": "Apache-2.0 OR MIT", "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", + "@libp2p/crypto": "^5.1.13", + "@libp2p/interface": "^3.1.0", + "@libp2p/peer-collections": "^7.0.9", + "@libp2p/peer-id": "^6.0.4", + "@libp2p/peer-record": "^9.0.4", + "@multiformats/multiaddr": "^13.0.1", + "interface-datastore": "^9.0.1", + "it-all": "^3.0.9", + "main-event": "^1.0.1", + "mortice": "^3.3.1", + "multiformats": "^13.4.0", + "protons-runtime": "^5.6.0", "uint8arraylist": "^2.4.8", "uint8arrays": "^5.1.0" } }, - "node_modules/@libp2p/peer-store/node_modules/@libp2p/peer-collections": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.2.9.tgz", - "integrity": "sha512-8gBmzQlCWjjb+FSQBKK33T25Y5Df/8FWCXFtJDsprVxVUzDOQoibQJ5Tb4Y+mb96HUhNzoaRWVEamB78MMB3DA==", + "node_modules/@libp2p/peer-store/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/utils": "^5.4.9" + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, "node_modules/@libp2p/peer-store/node_modules/multiformats": { @@ -3190,42 +2948,31 @@ } }, "node_modules/@libp2p/ping": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@libp2p/ping/-/ping-1.1.6.tgz", - "integrity": "sha512-tzTL0BzS1JaHE8v4PhRZ5K8wQQQcTMXM/0baCkLTLIaSMe1fzhj+KHbFNoUrY3yni4yfsVY1uR0qchhc1/J9qg==", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@libp2p/ping/-/ping-3.0.9.tgz", + "integrity": "sha512-PeOH3jH+f4cjczxNMKsAf67x/ai3/YQIAc8rq+fkhRWzIuYKjSG8omgiIJJ9sGbaI0b7Ap8vFVbVflvb52qEDg==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/crypto": "^4.1.9", - "@libp2p/interface": "^1.7.0", - "@libp2p/interface-internal": "^1.3.4", - "@multiformats/multiaddr": "^12.2.3", - "it-first": "^3.0.6", - "it-pipe": "^3.0.1", + "@libp2p/crypto": "^5.1.13", + "@libp2p/interface": "^3.1.0", + "@libp2p/interface-internal": "^3.0.9", + "@multiformats/multiaddr": "^13.0.1", + "p-event": "^7.0.0", + "race-signal": "^2.0.0", + "uint8arraylist": "^2.4.8", "uint8arrays": "^5.1.0" } }, - "node_modules/@libp2p/ping/node_modules/@libp2p/interface-internal": { - "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==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@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" - } - }, - "node_modules/@libp2p/ping/node_modules/@libp2p/peer-collections": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.2.9.tgz", - "integrity": "sha512-8gBmzQlCWjjb+FSQBKK33T25Y5Df/8FWCXFtJDsprVxVUzDOQoibQJ5Tb4Y+mb96HUhNzoaRWVEamB78MMB3DA==", + "node_modules/@libp2p/ping/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/utils": "^5.4.9" + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, "node_modules/@libp2p/ping/node_modules/multiformats": { @@ -3244,63 +2991,53 @@ } }, "node_modules/@libp2p/pubsub": { - "version": "9.0.26", - "resolved": "https://registry.npmjs.org/@libp2p/pubsub/-/pubsub-9.0.26.tgz", - "integrity": "sha512-69sFv5DAHSXrQdu4THX9WSZuEfCjEbbk6bKiTtbNGpq1Vaf57rjsTWk/EXMS/veeMl95xJs3/BR7dQal2PtJmw==", + "version": "10.1.18", + "resolved": "https://registry.npmjs.org/@libp2p/pubsub/-/pubsub-10.1.18.tgz", + "integrity": "sha512-Bxa0cwkaQvadyJNlJlzH0m1eo7m03G2nCpuKbcv+i0qNbyyTOydBcuoslG/UWFYhRBB9Js9R6zNIsaIgpo+iGw==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/crypto": "^4.1.9", - "@libp2p/interface": "^1.7.0", - "@libp2p/interface-internal": "^1.3.4", - "@libp2p/peer-collections": "^5.2.9", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/utils": "^5.4.9", - "it-length-prefixed": "^9.0.4", + "@libp2p/crypto": "^5.1.8", + "@libp2p/interface": "^2.11.0", + "@libp2p/interface-internal": "^2.3.19", + "@libp2p/peer-collections": "^6.0.35", + "@libp2p/peer-id": "^5.1.9", + "@libp2p/utils": "^6.7.2", + "it-length-prefixed": "^10.0.1", "it-pipe": "^3.0.1", "it-pushable": "^3.2.3", - "multiformats": "^13.1.0", - "p-queue": "^8.0.1", + "main-event": "^1.0.1", + "multiformats": "^13.3.6", + "p-queue": "^8.1.0", "uint8arraylist": "^2.4.8", "uint8arrays": "^5.1.0" } }, "node_modules/@libp2p/pubsub-peer-discovery": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/@libp2p/pubsub-peer-discovery/-/pubsub-peer-discovery-10.0.3.tgz", - "integrity": "sha512-9UL7j24SoXBHPulUUWpHiFjrI1rdbIZS8mN4+tRCF8e9J99fr7EcHpyN/kB0o31KXDKFA6zr8H0hniHhuqMPKA==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@libp2p/pubsub-peer-discovery/-/pubsub-peer-discovery-12.0.0.tgz", + "integrity": "sha512-72sZwTDBH/iowRumycPLjSlaUd3cwQcjSN2xUagdzNtMt9ryWt7dL4fDGM+VsktSdYmzzOHhL9ZftNfUk7XG7A==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.0.1", - "@libp2p/interface-internal": "^1.0.1", - "@libp2p/peer-id": "^4.0.1", - "@multiformats/multiaddr": "^12.0.0", + "@libp2p/crypto": "^5.0.0", + "@libp2p/interface": "^3.0.0", + "@libp2p/interface-internal": "^3.0.1", + "@libp2p/peer-id": "^6.0.1", + "@multiformats/multiaddr": "^13.0.1", "protons-runtime": "^5.0.0", "uint8arraylist": "^2.4.3", "uint8arrays": "^5.0.2" } }, - "node_modules/@libp2p/pubsub-peer-discovery/node_modules/@libp2p/interface-internal": { - "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==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@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" - } - }, - "node_modules/@libp2p/pubsub-peer-discovery/node_modules/@libp2p/peer-collections": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.2.9.tgz", - "integrity": "sha512-8gBmzQlCWjjb+FSQBKK33T25Y5Df/8FWCXFtJDsprVxVUzDOQoibQJ5Tb4Y+mb96HUhNzoaRWVEamB78MMB3DA==", + "node_modules/@libp2p/pubsub-peer-discovery/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/utils": "^5.4.9" + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, "node_modules/@libp2p/pubsub-peer-discovery/node_modules/multiformats": { @@ -3318,28 +3055,140 @@ "multiformats": "^13.0.0" } }, - "node_modules/@libp2p/pubsub/node_modules/@libp2p/interface-internal": { - "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==", + "node_modules/@libp2p/pubsub/node_modules/@libp2p/interface": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-2.11.0.tgz", + "integrity": "sha512-0MUFKoXWHTQW3oWIgSHApmYMUKWO/Y02+7Hpyp+n3z+geD4Xo2Rku2gYWmxcq+Pyjkz6Q9YjDWz3Yb2SoV2E8Q==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/peer-collections": "^5.2.9", - "@multiformats/multiaddr": "^12.2.3", - "progress-events": "^1.0.0", + "@multiformats/dns": "^1.0.6", + "@multiformats/multiaddr": "^12.4.4", + "it-pushable": "^3.2.3", + "it-stream-types": "^2.0.2", + "main-event": "^1.0.1", + "multiformats": "^13.3.6", + "progress-events": "^1.0.1", "uint8arraylist": "^2.4.8" } }, + "node_modules/@libp2p/pubsub/node_modules/@libp2p/interface-internal": { + "version": "2.3.19", + "resolved": "https://registry.npmjs.org/@libp2p/interface-internal/-/interface-internal-2.3.19.tgz", + "integrity": "sha512-v335EB0i5CaNF+0SqT01CTBp0VyjJizpy46KprcshFFjX16UQ8+/QzoTZqmot9WiAmAzwR0b87oKmlAE9cpxzQ==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@libp2p/interface": "^2.11.0", + "@libp2p/peer-collections": "^6.0.35", + "@multiformats/multiaddr": "^12.4.4", + "progress-events": "^1.0.1" + } + }, + "node_modules/@libp2p/pubsub/node_modules/@libp2p/logger": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-5.2.0.tgz", + "integrity": "sha512-OEFS529CnIKfbWEHmuCNESw9q0D0hL8cQ8klQfjIVPur15RcgAEgc1buQ7Y6l0B6tCYg120bp55+e9tGvn8c0g==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@libp2p/interface": "^2.11.0", + "@multiformats/multiaddr": "^12.4.4", + "interface-datastore": "^8.3.1", + "multiformats": "^13.3.6", + "weald": "^1.0.4" + } + }, "node_modules/@libp2p/pubsub/node_modules/@libp2p/peer-collections": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.2.9.tgz", - "integrity": "sha512-8gBmzQlCWjjb+FSQBKK33T25Y5Df/8FWCXFtJDsprVxVUzDOQoibQJ5Tb4Y+mb96HUhNzoaRWVEamB78MMB3DA==", + "version": "6.0.35", + "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-6.0.35.tgz", + "integrity": "sha512-QiloK3T7DXW7R2cpL38dBnALCHf5pMzs/TyFzlEK33WezA2YFVoj7CtOJKqbn29bmV9uspWOxMgfmLUXf8ALvA==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/utils": "^5.4.9" + "@libp2p/interface": "^2.11.0", + "@libp2p/peer-id": "^5.1.9", + "@libp2p/utils": "^6.7.2", + "multiformats": "^13.3.6" + } + }, + "node_modules/@libp2p/pubsub/node_modules/@libp2p/peer-id": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-5.1.9.tgz", + "integrity": "sha512-cVDp7lX187Epmi/zr0Qq2RsEMmueswP9eIxYSFoMcHL/qcvRFhsxOfUGB8361E26s2WJvC9sXZ0oJS9XVueJhQ==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@libp2p/crypto": "^5.1.8", + "@libp2p/interface": "^2.11.0", + "multiformats": "^13.3.6", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/@libp2p/pubsub/node_modules/@libp2p/utils": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-6.7.2.tgz", + "integrity": "sha512-yglVPcYErb4al3MMTdedVLLsdUvr5KaqrrxohxTl/FXMFBvBs0o3w8lo29nfnTUpnNSHFhWZ9at0ZGNnpT/C/w==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@chainsafe/is-ip": "^2.1.0", + "@chainsafe/netmask": "^2.0.0", + "@libp2p/crypto": "^5.1.8", + "@libp2p/interface": "^2.11.0", + "@libp2p/logger": "^5.2.0", + "@multiformats/multiaddr": "^12.4.4", + "@sindresorhus/fnv1a": "^3.1.0", + "any-signal": "^4.1.1", + "delay": "^6.0.0", + "get-iterator": "^2.0.1", + "is-loopback-addr": "^2.0.2", + "is-plain-obj": "^4.1.0", + "it-foreach": "^2.1.3", + "it-pipe": "^3.0.1", + "it-pushable": "^3.2.3", + "it-stream-types": "^2.0.2", + "main-event": "^1.0.1", + "netmask": "^2.0.2", + "p-defer": "^4.0.1", + "race-event": "^1.3.0", + "race-signal": "^1.1.3", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/@libp2p/pubsub/node_modules/delay": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-6.0.0.tgz", + "integrity": "sha512-2NJozoOHQ4NuZuVIr5CWd0iiLVIRSDepakaovIN+9eIDHEhdCAEvSy2cuf1DCrPPQLvHmbqTHODlhHg8UCy4zw==", + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@libp2p/pubsub/node_modules/interface-datastore": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.3.2.tgz", + "integrity": "sha512-R3NLts7pRbJKc3qFdQf+u40hK8XWc0w4Qkx3OFEstC80VoaDUABY/dXA2EJPhtNC+bsrf41Ehvqb6+pnIclyRA==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "interface-store": "^6.0.0", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/@libp2p/pubsub/node_modules/interface-store": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-6.0.3.tgz", + "integrity": "sha512-+WvfEZnFUhRwFxgz+QCQi7UC6o9AM0EHM9bpIe2Nhqb100NHCsTvNAn4eJgvgV2/tmLo1MP9nGxQKEcZTAueLA==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/@libp2p/pubsub/node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@libp2p/pubsub/node_modules/multiformats": { @@ -3348,7 +3197,38 @@ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, + "node_modules/@libp2p/pubsub/node_modules/race-signal": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.1.3.tgz", + "integrity": "sha512-Mt2NznMgepLfORijhQMncE26IhkmjEphig+/1fKC0OtaKwys/gpvpmswSjoN01SS+VO951mj0L4VIDXdXsjnfA==", + "license": "Apache-2.0 OR MIT" + }, "node_modules/@libp2p/pubsub/node_modules/uint8arrays": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", + "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", + "dependencies": { + "multiformats": "^13.0.0" + } + }, + "node_modules/@libp2p/record": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@libp2p/record/-/record-4.0.8.tgz", + "integrity": "sha512-ZsGKBA1zuzqiwNPO2q0PHFhZzAJi/p+YLDtYdkwLYW0FbIgeMb5FX7cmopDk5Aa8mM9UbINb+nK5xz4+Bz8ShQ==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "protons-runtime": "^5.6.0", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/@libp2p/record/node_modules/multiformats": { + "version": "13.4.2", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", + "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/@libp2p/record/node_modules/uint8arrays": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", @@ -3357,24 +3237,51 @@ "multiformats": "^13.0.0" } }, - "node_modules/@libp2p/record": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@libp2p/record/-/record-4.0.8.tgz", - "integrity": "sha512-ZsGKBA1zuzqiwNPO2q0PHFhZzAJi/p+YLDtYdkwLYW0FbIgeMb5FX7cmopDk5Aa8mM9UbINb+nK5xz4+Bz8ShQ==", - "license": "Apache-2.0 OR MIT", + "node_modules/@libp2p/tcp": { + "version": "11.0.9", + "resolved": "https://registry.npmjs.org/@libp2p/tcp/-/tcp-11.0.9.tgz", + "integrity": "sha512-/Fjy2TQR5rMBp0DbKYiP43wRM+CYsWVLc+hOpFrPp5EOS3yu/38/0F7EISFdk2vsijqll7iD0BA4+/Zt4U1kwQ==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@libp2p/interface": "^3.1.0", + "@libp2p/utils": "^7.0.9", + "@multiformats/multiaddr": "^13.0.1", + "@multiformats/multiaddr-matcher": "^3.0.1", + "@types/sinon": "^20.0.0", + "main-event": "^1.0.1", + "p-event": "^7.0.0", + "progress-events": "^1.0.1", + "uint8arraylist": "^2.4.8" + } + }, + "node_modules/@libp2p/tcp/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@libp2p/tcp/node_modules/@types/sinon": { + "version": "20.0.0", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-20.0.0.tgz", + "integrity": "sha512-etYGUC6IEevDGSWvR9WrECRA01ucR2/Oi9XMBUAdV0g4bLkNf4HlZWGiGlDOq5lgwXRwcV+PSeKgFcW4QzzYOg==", + "license": "MIT", "dependencies": { - "protons-runtime": "^5.6.0", - "uint8arraylist": "^2.4.8", - "uint8arrays": "^5.1.0" + "@types/sinonjs__fake-timers": "*" } }, - "node_modules/@libp2p/record/node_modules/multiformats": { + "node_modules/@libp2p/tcp/node_modules/multiformats": { "version": "13.4.2", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, - "node_modules/@libp2p/record/node_modules/uint8arrays": { + "node_modules/@libp2p/tcp/node_modules/uint8arrays": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", @@ -3383,108 +3290,105 @@ "multiformats": "^13.0.0" } }, - "node_modules/@libp2p/tcp": { - "version": "9.1.6", - "resolved": "https://registry.npmjs.org/@libp2p/tcp/-/tcp-9.1.6.tgz", - "integrity": "sha512-zbhHDY5txl8ypCL50JQWej/fZ8X7Lh+qfZw1HXDQEJZvgIrdYDPXrXfjIFflN0m/6hPoU/VAkKOr+RIuhIE8wQ==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/utils": "^5.4.9", - "@multiformats/mafmt": "^12.1.6", - "@multiformats/multiaddr": "^12.2.3", - "@types/sinon": "^17.0.3", - "progress-events": "^1.0.0", - "stream-to-it": "^1.0.1" - } - }, "node_modules/@libp2p/upnp-nat": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@libp2p/upnp-nat/-/upnp-nat-1.2.5.tgz", - "integrity": "sha512-bxW4jB4p4T/i8V5BrwUzPLsQvFleC7EZIkqS0r8JbNiFy5iYIvU/WOMB6s7VJkiX3m1RxOxkKU6DcuAPuIJPzQ==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@libp2p/upnp-nat/-/upnp-nat-4.0.9.tgz", + "integrity": "sha512-+f564UNNc0ZMACqdTJCgIfXe3QHevJKwzXq703gJ6Gm8HV2zVuh9W+2CQhDjdizMsnCJdDhmml14cEL1iXkPOw==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@achingbrain/nat-port-mapper": "^1.0.13", - "@libp2p/interface": "^1.7.0", - "@libp2p/interface-internal": "^1.3.4", - "@libp2p/utils": "^5.4.9", - "@multiformats/multiaddr": "^12.2.3", - "wherearewe": "^2.0.1" + "@achingbrain/nat-port-mapper": "^4.0.4", + "@chainsafe/is-ip": "^2.1.0", + "@libp2p/interface": "^3.1.0", + "@libp2p/interface-internal": "^3.0.9", + "@libp2p/utils": "^7.0.9", + "@multiformats/multiaddr": "^13.0.1", + "@multiformats/multiaddr-matcher": "^3.0.1", + "main-event": "^1.0.1", + "p-defer": "^4.0.1", + "race-signal": "^2.0.0" } }, - "node_modules/@libp2p/upnp-nat/node_modules/@libp2p/interface-internal": { - "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==", + "node_modules/@libp2p/upnp-nat/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@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" + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, - "node_modules/@libp2p/upnp-nat/node_modules/@libp2p/peer-collections": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.2.9.tgz", - "integrity": "sha512-8gBmzQlCWjjb+FSQBKK33T25Y5Df/8FWCXFtJDsprVxVUzDOQoibQJ5Tb4Y+mb96HUhNzoaRWVEamB78MMB3DA==", + "node_modules/@libp2p/upnp-nat/node_modules/multiformats": { + "version": "13.4.2", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", + "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/@libp2p/upnp-nat/node_modules/uint8arrays": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", + "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/utils": "^5.4.9" + "multiformats": "^13.0.0" } }, "node_modules/@libp2p/utils": { - "version": "5.4.9", - "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-5.4.9.tgz", - "integrity": "sha512-0fRdX98WqhTmXU2WEVLegLFxs/kKTtUHanHk5Lzs4oGsIzlPHR7zE6lj/U1WfsFA+Xo1eYQpNLiXEL29hG+Nyw==", + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@libp2p/utils/-/utils-7.0.9.tgz", + "integrity": "sha512-2wYhsgfbFXfh5ui0ME9MNHc7uUIuZwpeZ/yagKmDSjIP7B+L3/9mj+vVXO14AhmjfwnKx2xUDQvzGZeq5to4ow==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@chainsafe/is-ip": "^2.0.2", - "@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", + "@chainsafe/is-ip": "^2.1.0", + "@chainsafe/netmask": "^2.0.0", + "@libp2p/crypto": "^5.1.13", + "@libp2p/interface": "^3.1.0", + "@libp2p/logger": "^6.2.2", + "@multiformats/multiaddr": "^13.0.1", "@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", + "cborg": "^4.2.14", + "delay": "^7.0.0", "is-loopback-addr": "^2.0.2", + "it-length-prefixed": "^10.0.1", + "it-pipe": "^3.0.1", "it-pushable": "^3.2.3", - "it-stream-types": "^2.0.1", - "murmurhash3js-revisited": "^3.0.0", + "it-stream-types": "^2.0.2", + "main-event": "^1.0.1", "netmask": "^2.0.2", "p-defer": "^4.0.1", - "race-event": "^1.3.0", - "race-signal": "^1.0.2", + "p-event": "^7.0.0", + "race-signal": "^2.0.0", + "uint8-varint": "^2.0.4", "uint8arraylist": "^2.4.8", "uint8arrays": "^5.1.0" } }, - "node_modules/@libp2p/utils/node_modules/@libp2p/logger": { - "version": "4.0.20", - "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-4.0.20.tgz", - "integrity": "sha512-TTh2dhHsOTAlMPxSa9ncFPHa/0jTt+0AQxwHdlxg/OGLAgc9VRhnrhHUbJZp07Crcw4T/MOfS4KhjlxgqYgJRw==", + "node_modules/@libp2p/utils/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@multiformats/multiaddr": "^12.2.3", - "interface-datastore": "^8.2.11", - "multiformats": "^13.1.0", - "weald": "^1.0.2" + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, "node_modules/@libp2p/utils/node_modules/delay": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/delay/-/delay-6.0.0.tgz", - "integrity": "sha512-2NJozoOHQ4NuZuVIr5CWd0iiLVIRSDepakaovIN+9eIDHEhdCAEvSy2cuf1DCrPPQLvHmbqTHODlhHg8UCy4zw==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-7.0.0.tgz", + "integrity": "sha512-C3vaGs818qzZjCvVJ98GQUMVyWeg7dr5w2Nwwb2t5K8G98jOyyVO2ti2bKYk5yoYElqH3F2yA53ykuEnwD6MCg==", "license": "MIT", + "dependencies": { + "random-int": "^3.1.0", + "unlimited-timeout": "^0.1.0" + }, "engines": { - "node": ">=16" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -3496,12 +3400,6 @@ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, - "node_modules/@libp2p/utils/node_modules/race-signal": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.1.3.tgz", - "integrity": "sha512-Mt2NznMgepLfORijhQMncE26IhkmjEphig+/1fKC0OtaKwys/gpvpmswSjoN01SS+VO951mj0L4VIDXdXsjnfA==", - "license": "Apache-2.0 OR MIT" - }, "node_modules/@libp2p/utils/node_modules/uint8arrays": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", @@ -3512,31 +3410,51 @@ } }, "node_modules/@libp2p/websockets": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/@libp2p/websockets/-/websockets-8.2.0.tgz", - "integrity": "sha512-UNjqkQ8/emnYswp1ohIIuZCnhI5DlvWF9IaIND2MoTCDavi7yubWfMp8jSWBsAqPnMeLMO8MQ6YlOo4FFC104Q==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/@libp2p/websockets/-/websockets-10.1.2.tgz", + "integrity": "sha512-WjUxzVpniENxclwSRZpFtk3riV846WCf02Rm7MsAL9ui6szWcCEXzmMIjuo5mOzCUGOn0NPol6Uiz11nadC4iQ==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/utils": "^5.4.9", - "@multiformats/mafmt": "^12.1.6", - "@multiformats/multiaddr": "^12.2.3", - "@multiformats/multiaddr-to-uri": "^10.0.1", - "@types/ws": "^8.5.10", - "it-ws": "^6.1.1", - "p-defer": "^4.0.1", - "progress-events": "^1.0.0", - "race-signal": "^1.0.2", - "wherearewe": "^2.0.1", - "ws": "^8.17.0" + "@libp2p/interface": "^3.1.0", + "@libp2p/utils": "^7.0.9", + "@multiformats/multiaddr": "^13.0.1", + "@multiformats/multiaddr-matcher": "^3.0.1", + "@multiformats/multiaddr-to-uri": "^12.0.0", + "main-event": "^1.0.1", + "p-event": "^7.0.0", + "progress-events": "^1.0.1", + "uint8arraylist": "^2.4.8", + "uint8arrays": "^5.1.0", + "ws": "^8.18.3" } }, - "node_modules/@libp2p/websockets/node_modules/race-signal": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.1.3.tgz", - "integrity": "sha512-Mt2NznMgepLfORijhQMncE26IhkmjEphig+/1fKC0OtaKwys/gpvpmswSjoN01SS+VO951mj0L4VIDXdXsjnfA==", + "node_modules/@libp2p/websockets/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@libp2p/websockets/node_modules/multiformats": { + "version": "13.4.2", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", + "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, + "node_modules/@libp2p/websockets/node_modules/uint8arrays": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", + "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "multiformats": "^13.0.0" + } + }, "node_modules/@libp2p/websockets/node_modules/ws": { "version": "8.18.3", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", @@ -3615,15 +3533,6 @@ "multiformats": "^13.0.0" } }, - "node_modules/@multiformats/mafmt": { - "version": "12.1.6", - "resolved": "https://registry.npmjs.org/@multiformats/mafmt/-/mafmt-12.1.6.tgz", - "integrity": "sha512-tlJRfL21X+AKn9b5i5VnaTD6bNttpSpcqwKVmDmSHLwxoz97fAHaepqFOk/l1fIu94nImIXneNbhsJx/RQNIww==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@multiformats/multiaddr": "^12.0.0" - } - }, "node_modules/@multiformats/multiaddr": { "version": "12.5.1", "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-12.5.1.tgz", @@ -3640,14 +3549,24 @@ } }, "node_modules/@multiformats/multiaddr-matcher": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@multiformats/multiaddr-matcher/-/multiaddr-matcher-1.8.0.tgz", - "integrity": "sha512-tR/HFhDucXjvwCef5lfXT7kikqR2ffUjliuYlg/RKYGPySVKVlvrDufz86cIuHNc+i/fNR16FWWgD/pMJ6RW4w==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr-matcher/-/multiaddr-matcher-3.0.1.tgz", + "integrity": "sha512-jvjwzCPysVTQ53F4KqwmcqZw73BqHMk0UUZrMP9P4OtJ/YHrfs122ikTqhVA2upe0P/Qz9l8HVlhEifVYB2q9A==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@multiformats/multiaddr": "^13.0.0" + } + }, + "node_modules/@multiformats/multiaddr-matcher/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { "@chainsafe/is-ip": "^2.0.1", - "@multiformats/multiaddr": "^12.0.0", - "multiformats": "^13.0.0" + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, "node_modules/@multiformats/multiaddr-matcher/node_modules/multiformats": { @@ -3656,13 +3575,49 @@ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, + "node_modules/@multiformats/multiaddr-matcher/node_modules/uint8arrays": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", + "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "multiformats": "^13.0.0" + } + }, "node_modules/@multiformats/multiaddr-to-uri": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/@multiformats/multiaddr-to-uri/-/multiaddr-to-uri-10.1.2.tgz", - "integrity": "sha512-6sicfYRjJlHJn4bwsQancs8kXncWU4dDN/+V9sMVTYp9hi8ovWgVkK75AbAv4SfhztmmI+oufVUncQ1n+SukKQ==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr-to-uri/-/multiaddr-to-uri-12.0.0.tgz", + "integrity": "sha512-3uIEBCiy8tfzxYYBl81x1tISiNBQ7mHU4pGjippbJRoQYHzy/ZdZM/7JvTldr8pc/dzpkaNJxnsuxxlhsPOJsA==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@multiformats/multiaddr": "^13.0.0" + } + }, + "node_modules/@multiformats/multiaddr-to-uri/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@multiformats/multiaddr-to-uri/node_modules/multiformats": { + "version": "13.4.2", + "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", + "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", + "license": "Apache-2.0 OR MIT" + }, + "node_modules/@multiformats/multiaddr-to-uri/node_modules/uint8arrays": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", + "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@multiformats/multiaddr": "^12.3.0" + "multiformats": "^13.0.0" } }, "node_modules/@multiformats/multiaddr/node_modules/multiformats": { @@ -3681,10 +3636,13 @@ } }, "node_modules/@noble/ciphers": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.6.0.tgz", - "integrity": "sha512-mIbq/R9QXk5/cTfESb1OKtyFnk7oc1Om/8onA1158K9/OZUQFDEVy55jVTato+xmp3XX6F6Qh0zz0Nc1AxAlRQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-2.1.1.tgz", + "integrity": "sha512-bysYuiVfhxNJuldNXlFEitTVdNnYUc+XNJZd7Qm2a5j1vZHgY+fazadNFWFaMK/2vye0JVlxV3gHmC0WDfAOQw==", "license": "MIT", + "engines": { + "node": ">= 20.19.0" + }, "funding": { "url": "https://paulmillr.com/funding/" } @@ -4922,12 +4880,6 @@ "@types/node": "*" } }, - "node_modules/@types/murmurhash3js-revisited": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.3.tgz", - "integrity": "sha512-QvlqvYtGBYIDeO8dFdY4djkRubcrc+yTJtBc7n8VZPlJDUS/00A+PssbvERM8f9bYRmcaSEHPZgZojeQj7kzAA==", - "license": "MIT" - }, "node_modules/@types/node": { "version": "25.0.3", "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.3.tgz", @@ -5206,6 +5158,7 @@ "version": "17.0.4", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.4.tgz", "integrity": "sha512-RHnIrhfPO3+tJT0s7cFaXGZvsL4bbR3/k7z3P312qMS4JaS2Tk+KiwiLx1S0rQ56ERj00u1/BtdyVd0FY+Pdew==", + "dev": true, "license": "MIT", "dependencies": { "@types/sinonjs__fake-timers": "*" @@ -5249,15 +5202,6 @@ "version": "1.3.4", "license": "MIT" }, - "node_modules/@types/ws": { - "version": "8.18.1", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", - "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.9.1", "dev": true, @@ -6576,6 +6520,15 @@ "version": "1.0.8", "license": "Apache-2.0" }, + "node_modules/cborg": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/cborg/-/cborg-4.3.2.tgz", + "integrity": "sha512-l+QzebEAG0vb09YKkaOrMi2zmm80UNjmbvocMIeW5hO7JOXWdrQ/H49yOKfYX0MBgrj/KWgatBnEgRXyNyKD+A==", + "license": "Apache-2.0", + "bin": { + "cborg": "lib/bin.js" + } + }, "node_modules/chai": { "version": "4.3.10", "dev": true, @@ -7084,50 +7037,23 @@ } }, "node_modules/datastore-core": { - "version": "9.2.9", - "resolved": "https://registry.npmjs.org/datastore-core/-/datastore-core-9.2.9.tgz", - "integrity": "sha512-wraWTPsbtdE7FFaVo3pwPuTB/zXsgwGGAm8BgBYwYAuzZCTS0MfXmd/HH1vR9s0/NFFjOVmBkGiWCvKxZ+QjVw==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/datastore-core/-/datastore-core-11.0.2.tgz", + "integrity": "sha512-0pN4hMcaCWcnUBo5OL/8j14Lt1l/p1v2VvzryRYeJAKRLqnFrzy2FhAQ7y0yTA63ki760ImQHfm2XlZrfIdFpQ==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/logger": "^4.0.6", - "err-code": "^3.0.1", - "interface-datastore": "^8.0.0", - "interface-store": "^5.0.0", - "it-drain": "^3.0.5", - "it-filter": "^3.0.4", - "it-map": "^3.0.5", - "it-merge": "^3.0.3", + "@libp2p/logger": "^6.0.0", + "interface-datastore": "^9.0.0", + "interface-store": "^7.0.0", + "it-drain": "^3.0.9", + "it-filter": "^3.1.3", + "it-map": "^3.1.3", + "it-merge": "^3.0.11", "it-pipe": "^3.0.1", - "it-pushable": "^3.2.3", - "it-sort": "^3.0.4", - "it-take": "^3.0.4" - } - }, - "node_modules/datastore-core/node_modules/@libp2p/logger": { - "version": "4.0.20", - "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-4.0.20.tgz", - "integrity": "sha512-TTh2dhHsOTAlMPxSa9ncFPHa/0jTt+0AQxwHdlxg/OGLAgc9VRhnrhHUbJZp07Crcw4T/MOfS4KhjlxgqYgJRw==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface": "^1.7.0", - "@multiformats/multiaddr": "^12.2.3", - "interface-datastore": "^8.2.11", - "multiformats": "^13.1.0", - "weald": "^1.0.2" + "it-sort": "^3.0.8", + "it-take": "^3.0.8" } }, - "node_modules/datastore-core/node_modules/interface-store": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.8.tgz", - "integrity": "sha512-7na81Uxkl0vqk0CBPO5PvyTkdaJBaezwUJGsMOz7riPOq0rJt+7W31iaopaMICWea/iykUsvNlPx/Tc+MxC3/w==", - "license": "Apache-2.0 OR MIT" - }, - "node_modules/datastore-core/node_modules/multiformats": { - "version": "13.4.2", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", - "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", - "license": "Apache-2.0 OR MIT" - }, "node_modules/date-fns": { "version": "2.30.0", "dev": true, @@ -7246,76 +7172,33 @@ "bundle-name": "^3.0.0", "default-browser-id": "^3.0.0", "execa": "^7.1.1", - "titleize": "^3.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser-id": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "bplist-parser": "^0.2.0", - "untildify": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser/node_modules/execa": { - "version": "7.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^4.3.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^3.0.7", - "strip-final-newline": "^3.0.0" + "titleize": "^3.0.0" }, "engines": { - "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + "node": ">=14.16" }, "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/default-browser/node_modules/human-signals": { - "version": "4.3.1", + "node_modules/default-browser-id": { + "version": "3.0.0", "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=14.18.0" - } - }, - "node_modules/default-gateway": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-7.2.2.tgz", - "integrity": "sha512-AD7TrdNNPXRZIGw63dw+lnGmT4v7ggZC5NHNJgAYWm5njrwoze1q5JSAW9YuLy2tjnoLUG/r8FEB93MCh9QJPg==", - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "execa": "^7.1.1" + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" }, "engines": { - "node": ">= 16" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/default-gateway/node_modules/execa": { + "node_modules/default-browser/node_modules/execa": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", - "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dev": true, "license": "MIT", "dependencies": { "cross-spawn": "^7.0.3", @@ -7335,10 +7218,9 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/default-gateway/node_modules/human-signals": { + "node_modules/default-browser/node_modules/human-signals": { "version": "4.3.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", - "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=14.18.0" @@ -8858,12 +8740,6 @@ "es5-ext": "~0.10.14" } }, - "node_modules/event-iterator": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-2.0.0.tgz", - "integrity": "sha512-KGft0ldl31BZVV//jj+IAIGCxkvvUkkON+ScH6zfoX+l+omX6001ggyRSpI0Io2Hlro0ThXotswCtfzS8UkIiQ==", - "license": "MIT" - }, "node_modules/event-target-shim": { "version": "5.0.1", "license": "MIT", @@ -9566,6 +9442,7 @@ }, "node_modules/get-stream": { "version": "6.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -10237,12 +10114,12 @@ } }, "node_modules/interface-datastore": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.3.2.tgz", - "integrity": "sha512-R3NLts7pRbJKc3qFdQf+u40hK8XWc0w4Qkx3OFEstC80VoaDUABY/dXA2EJPhtNC+bsrf41Ehvqb6+pnIclyRA==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-9.0.2.tgz", + "integrity": "sha512-jebn+GV/5LTDDoyicNIB4D9O0QszpPqT09Z/MpEWvf3RekjVKpXJCDguM5Au2fwIFxFDAQMZe5bSla0jMamCNg==", "license": "Apache-2.0 OR MIT", "dependencies": { - "interface-store": "^6.0.0", + "interface-store": "^7.0.0", "uint8arrays": "^5.1.0" } }, @@ -10262,9 +10139,9 @@ } }, "node_modules/interface-store": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-6.0.3.tgz", - "integrity": "sha512-+WvfEZnFUhRwFxgz+QCQi7UC6o9AM0EHM9bpIe2Nhqb100NHCsTvNAn4eJgvgV2/tmLo1MP9nGxQKEcZTAueLA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-7.0.1.tgz", + "integrity": "sha512-OPRRUO3Cs6Jr/t98BrJLQp1jUTPgrRH0PqFfuNoPAqd+J7ABN1tjFVjQdaOBiybYJTS/AyBSZnZVWLPvp3dW3w==", "license": "Apache-2.0 OR MIT" }, "node_modules/internal-slot": { @@ -10549,6 +10426,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-network-error": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.3.0.tgz", + "integrity": "sha512-6oIwpsgRfnDiyEDLMay/GqCl3HoAtH5+RUKW29gYkL0QA+ipzpDLA16yQs7/RHCSu+BwgbJaOUqa4A99qNVQVw==", + "license": "MIT", + "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", @@ -10638,6 +10527,7 @@ }, "node_modules/is-stream": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" @@ -10908,33 +10798,6 @@ "integrity": "sha512-fz1oJJ36ciGnu2LntAlE6SA97bFZpW7Rnt0uEc1yazzR2nKokZLr8lIRtgnpex4NsmaBcvHF+Z9krljWFy/mmg==", "license": "Apache-2.0 OR MIT" }, - "node_modules/it-byte-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/it-byte-stream/-/it-byte-stream-1.1.1.tgz", - "integrity": "sha512-OIOb8PvK9ZV7MHvyxIDNyN3jmrxrJdx99G0RIYYb3Tzo1OWv+O1C6mfg7nnlDuuTQz2POYFXe87AShKAEl+POw==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "it-queueless-pushable": "^1.0.0", - "it-stream-types": "^2.0.2", - "uint8arraylist": "^2.4.8" - } - }, - "node_modules/it-byte-stream/node_modules/it-queueless-pushable": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/it-queueless-pushable/-/it-queueless-pushable-1.0.2.tgz", - "integrity": "sha512-BFIm48C4O8+i+oVEPQpZ70+CaAsVUircvZtZCrpG2Q64933aLp+tDmas1mTBwqVBfIUUlg09d+e6SWW1CBuykQ==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "p-defer": "^4.0.1", - "race-signal": "^1.1.3" - } - }, - "node_modules/it-byte-stream/node_modules/race-signal": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.1.3.tgz", - "integrity": "sha512-Mt2NznMgepLfORijhQMncE26IhkmjEphig+/1fKC0OtaKwys/gpvpmswSjoN01SS+VO951mj0L4VIDXdXsjnfA==", - "license": "Apache-2.0 OR MIT" - }, "node_modules/it-drain": { "version": "3.0.10", "resolved": "https://registry.npmjs.org/it-drain/-/it-drain-3.0.10.tgz", @@ -10950,12 +10813,6 @@ "it-peekable": "^3.0.0" } }, - "node_modules/it-first": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/it-first/-/it-first-3.0.9.tgz", - "integrity": "sha512-ZWYun273Gbl7CwiF6kK5xBtIKR56H1NoRaiJek2QzDirgen24u8XZ0Nk+jdnJSuCTPxC2ul1TuXKxu/7eK6NuA==", - "license": "Apache-2.0 OR MIT" - }, "node_modules/it-foreach": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/it-foreach/-/it-foreach-2.1.5.tgz", @@ -10972,9 +10829,9 @@ "license": "Apache-2.0 OR MIT" }, "node_modules/it-length-prefixed": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-9.1.1.tgz", - "integrity": "sha512-O88nBweT6M9ozsmok68/auKH7ik/slNM4pYbM9lrfy2z5QnpokW5SlrepHZDKtN71llhG2sZvd6uY4SAl+lAQg==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-10.0.1.tgz", + "integrity": "sha512-BhyluvGps26u9a7eQIpOI1YN7mFgi8lFwmiPi07whewbBARKAG9LE09Odc8s1Wtbt2MB6rNUrl7j9vvfXTJwdQ==", "license": "Apache-2.0 OR MIT", "dependencies": { "it-reader": "^6.0.1", @@ -10988,18 +10845,6 @@ "npm": ">=7.0.0" } }, - "node_modules/it-length-prefixed-stream": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/it-length-prefixed-stream/-/it-length-prefixed-stream-1.2.1.tgz", - "integrity": "sha512-FYqlxc2toUoK+aPO5r3KDBIUG1mOvk2DzmjQcsfLUTHRWMJP4Va9855tVzg/22Bj+VUUaT7gxBg7HmbiCxTK4w==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "it-byte-stream": "^1.0.0", - "it-stream-types": "^2.0.2", - "uint8-varint": "^2.0.4", - "uint8arraylist": "^2.4.8" - } - }, "node_modules/it-length-prefixed/node_modules/multiformats": { "version": "13.4.2", "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", @@ -11033,20 +10878,6 @@ "it-queueless-pushable": "^2.0.0" } }, - "node_modules/it-pair": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/it-pair/-/it-pair-2.0.6.tgz", - "integrity": "sha512-5M0t5RAcYEQYNG5BV7d7cqbdwbCAp5yLdzvkxsZmkuZsLbTdZzah6MQySYfaAQjNDCq6PUnDt0hqBZ4NwMfW6g==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "it-stream-types": "^2.0.1", - "p-defer": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/it-parallel": { "version": "3.0.13", "resolved": "https://registry.npmjs.org/it-parallel/-/it-parallel-3.0.13.tgz", @@ -11075,44 +10906,6 @@ "npm": ">=7.0.0" } }, - "node_modules/it-protobuf-stream": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/it-protobuf-stream/-/it-protobuf-stream-2.0.3.tgz", - "integrity": "sha512-Dus9qyylOSnC7l75/3qs6j3Fe9MCM2K5luXi9o175DYijFRne5FPucdOGIYdwaDBDQ4Oy34dNCuFobOpcusvEQ==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "abort-error": "^1.0.1", - "it-length-prefixed-stream": "^2.0.0", - "it-stream-types": "^2.0.2", - "uint8arraylist": "^2.4.8" - } - }, - "node_modules/it-protobuf-stream/node_modules/it-byte-stream": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/it-byte-stream/-/it-byte-stream-2.0.4.tgz", - "integrity": "sha512-8pS0OvkBYwQ206pRLgoLDAiHP6c8wYZJ1ig8KDmP5NOrzMxeH2Wv2ktXIjYHwdu7RPOsnxQb0vKo+O784L/m5g==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "abort-error": "^1.0.1", - "it-queueless-pushable": "^2.0.0", - "it-stream-types": "^2.0.2", - "race-signal": "^2.0.0", - "uint8arraylist": "^2.4.8" - } - }, - "node_modules/it-protobuf-stream/node_modules/it-length-prefixed-stream": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/it-length-prefixed-stream/-/it-length-prefixed-stream-2.0.4.tgz", - "integrity": "sha512-ugHDOQCkC2Dx2pQaJ+W4OIM6nZFBwlpgdQVVOfdX4c1Os47d6PMsfrkTrzRwZdBCMZb+JISZNP2gjU/DHN/z9A==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "abort-error": "^1.0.1", - "it-byte-stream": "^2.0.0", - "it-stream-types": "^2.0.2", - "uint8-varint": "^2.0.4", - "uint8arraylist": "^2.4.8" - } - }, "node_modules/it-pushable": { "version": "3.2.3", "license": "Apache-2.0 OR MIT", @@ -11179,38 +10972,6 @@ "integrity": "sha512-XMeUbnjOcgrhFXPUqa7H0VIjYSV/BvyxxjCp76QHVAFDJw2LmR1SHxUFiqyGeobgzJr7P2ZwSRRJQGn4D2BVlA==", "license": "Apache-2.0 OR MIT" }, - "node_modules/it-ws": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/it-ws/-/it-ws-6.1.5.tgz", - "integrity": "sha512-uWjMtpy5HqhSd/LlrlP3fhYrr7rUfJFFMABv0F5d6n13Q+0glhZthwUKpEAVhDrXY95Tb1RB5lLqqef+QbVNaw==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@types/ws": "^8.2.2", - "event-iterator": "^2.0.0", - "it-stream-types": "^2.0.1", - "uint8arrays": "^5.0.0", - "ws": "^8.4.0" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/it-ws/node_modules/multiformats": { - "version": "13.4.2", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.4.2.tgz", - "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", - "license": "Apache-2.0 OR MIT" - }, - "node_modules/it-ws/node_modules/uint8arrays": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", - "integrity": "sha512-vA6nFepEmlSKkMBnLBaUMVvAC4G3CTmO58C12y4sq6WPDOR7mOFYOi7GlrQ4djeSbP6JG9Pv9tJDM97PedRSww==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "multiformats": "^13.0.0" - } - }, "node_modules/iterator.prototype": { "version": "1.1.2", "dev": true, @@ -11535,74 +11296,50 @@ } }, "node_modules/libp2p": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-1.9.4.tgz", - "integrity": "sha512-OCMQqJ0Po8jhgb4CilWhI5EWhppn9ENdhg63PQL8Yi1tk2rOwJJt+NBec85AU18zBc0jv7Q6SgQRkzCefAuyIQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-3.1.2.tgz", + "integrity": "sha512-E14/IznfuJnmelwrsTIRqtds+XzbtIYdnfskv9ulmL+7fwM+7fsUl1z5wBlWFzPNs46t1MF9fPi9m1ytuzs2xw==", "license": "Apache-2.0 OR MIT", "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", + "@chainsafe/is-ip": "^2.1.0", + "@chainsafe/netmask": "^2.0.0", + "@libp2p/crypto": "^5.1.13", + "@libp2p/interface": "^3.1.0", + "@libp2p/interface-internal": "^3.0.9", + "@libp2p/logger": "^6.2.2", + "@libp2p/multistream-select": "^7.0.9", + "@libp2p/peer-collections": "^7.0.9", + "@libp2p/peer-id": "^6.0.4", + "@libp2p/peer-store": "^12.0.9", + "@libp2p/utils": "^7.0.9", "@multiformats/dns": "^1.0.6", - "@multiformats/multiaddr": "^12.2.3", - "@multiformats/multiaddr-matcher": "^1.2.1", + "@multiformats/multiaddr": "^13.0.1", + "@multiformats/multiaddr-matcher": "^3.0.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", + "datastore-core": "^11.0.1", + "interface-datastore": "^9.0.1", + "it-merge": "^3.0.12", + "it-parallel": "^3.0.13", + "main-event": "^1.0.1", + "multiformats": "^13.4.0", "p-defer": "^4.0.1", - "progress-events": "^1.0.0", - "race-event": "^1.3.0", - "race-signal": "^1.0.2", + "p-event": "^7.0.0", + "p-retry": "^7.0.0", + "progress-events": "^1.0.1", + "race-signal": "^2.0.0", "uint8arrays": "^5.1.0" } }, - "node_modules/libp2p/node_modules/@libp2p/interface-internal": { - "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==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@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" - } - }, - "node_modules/libp2p/node_modules/@libp2p/logger": { - "version": "4.0.20", - "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-4.0.20.tgz", - "integrity": "sha512-TTh2dhHsOTAlMPxSa9ncFPHa/0jTt+0AQxwHdlxg/OGLAgc9VRhnrhHUbJZp07Crcw4T/MOfS4KhjlxgqYgJRw==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "@libp2p/interface": "^1.7.0", - "@multiformats/multiaddr": "^12.2.3", - "interface-datastore": "^8.2.11", - "multiformats": "^13.1.0", - "weald": "^1.0.2" - } - }, - "node_modules/libp2p/node_modules/@libp2p/peer-collections": { - "version": "5.2.9", - "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-5.2.9.tgz", - "integrity": "sha512-8gBmzQlCWjjb+FSQBKK33T25Y5Df/8FWCXFtJDsprVxVUzDOQoibQJ5Tb4Y+mb96HUhNzoaRWVEamB78MMB3DA==", + "node_modules/libp2p/node_modules/@multiformats/multiaddr": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-13.0.1.tgz", + "integrity": "sha512-XToN915cnfr6Lr9EdGWakGJbPT0ghpg/850HvdC+zFX8XvpLZElwa8synCiwa8TuvKNnny6m8j8NVBNCxhIO3g==", "license": "Apache-2.0 OR MIT", "dependencies": { - "@libp2p/interface": "^1.7.0", - "@libp2p/peer-id": "^4.2.4", - "@libp2p/utils": "^5.4.9" + "@chainsafe/is-ip": "^2.0.1", + "multiformats": "^13.0.0", + "uint8-varint": "^2.0.1", + "uint8arrays": "^5.0.0" } }, "node_modules/libp2p/node_modules/multiformats": { @@ -11611,12 +11348,6 @@ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, - "node_modules/libp2p/node_modules/race-signal": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.1.3.tgz", - "integrity": "sha512-Mt2NznMgepLfORijhQMncE26IhkmjEphig+/1fKC0OtaKwys/gpvpmswSjoN01SS+VO951mj0L4VIDXdXsjnfA==", - "license": "Apache-2.0 OR MIT" - }, "node_modules/libp2p/node_modules/uint8arrays": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.1.0.tgz", @@ -11970,6 +11701,7 @@ }, "node_modules/merge-stream": { "version": "2.0.0", + "dev": true, "license": "MIT" }, "node_modules/merge2": { @@ -12020,6 +11752,7 @@ }, "node_modules/mimic-fn": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -12387,15 +12120,6 @@ "npm": ">=7.0.0" } }, - "node_modules/murmurhash3js-revisited": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz", - "integrity": "sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g==", - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/mute-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", @@ -12437,6 +12161,24 @@ "version": "2.14.0", "license": "MIT" }, + "node_modules/nanoid": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.6.tgz", + "integrity": "sha512-c7+7RQ+dMB5dPwwCp4ee1/iV/q2P6aK1mTZcfr1BTuVlyW9hJYiMPybJCcnBlQtuSmTIWNeazm/zqNoZSSElBg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.js" + }, + "engines": { + "node": "^18 || >=20" + } + }, "node_modules/napi-build-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", @@ -12752,6 +12494,7 @@ }, "node_modules/npm-run-path": { "version": "5.1.0", + "dev": true, "license": "MIT", "dependencies": { "path-key": "^4.0.0" @@ -12765,6 +12508,7 @@ }, "node_modules/npm-run-path/node_modules/path-key": { "version": "4.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -13179,6 +12923,7 @@ }, "node_modules/onetime": { "version": "6.0.0", + "dev": true, "license": "MIT", "dependencies": { "mimic-fn": "^4.0.0" @@ -13396,15 +13141,15 @@ } }, "node_modules/p-event": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-6.0.1.tgz", - "integrity": "sha512-Q6Bekk5wpzW5qIyUP4gdMEujObYstZl6DMMOSenwBvV0BlE5LkDwkjs5yHbZmdCEq2o4RJx4tE1vwxFVf2FG1w==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-7.0.1.tgz", + "integrity": "sha512-SI8GHTMMv6dAIMMHBG0g6PyZIEal+CCaKCje24NxkgEJrPvfdfEP0xXVoDC3OGxlfjM8qqSs/luTaobCkGdEUA==", "license": "MIT", "dependencies": { - "p-timeout": "^6.1.2" + "p-timeout": "^6.1.4" }, "engines": { - "node": ">=16.17" + "node": ">=20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -13454,6 +13199,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-retry": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-7.1.1.tgz", + "integrity": "sha512-J5ApzjyRkkf601HpEeykoiCvzHQjWxPAHhyjFcEUP2SWq0+35NKh8TLhpLw+Dkq5TZBFvUM6UigdE9hIVYTl5w==", + "license": "MIT", + "dependencies": { + "is-network-error": "^1.1.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-timeout": { "version": "6.1.4", "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.1.4.tgz", @@ -14218,6 +13978,18 @@ "integrity": "sha512-P31bLhE4ByBX/70QDXMutxnqgwrF1WUXea1O8DXuviAgkdbQ1iQMQotNgzJIBC9yUSn08u/acZrMUhgw7w6GpA==", "license": "Apache-2.0 OR MIT" }, + "node_modules/random-int": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/random-int/-/random-int-3.1.0.tgz", + "integrity": "sha512-h8CRz8cpvzj0hC/iH/1Gapgcl2TQ6xtnCpyOI5WvWfXf/yrDx2DOU+tD9rX23j36IF11xg1KqB9W11Z18JPMdw==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/randombytes": { "version": "2.1.0", "license": "MIT", @@ -14668,6 +14440,12 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/retimeable-signal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/retimeable-signal/-/retimeable-signal-1.0.1.tgz", + "integrity": "sha512-Cy26CYfbWnYu8HMoJeDhaMpW/EYFIbne3vMf6G9RSrOyWYXbPehja/BEdzpqmM84uy2bfBD7NPZhoQ4GZEtgvg==", + "license": "Apache-2.0 OR MIT" + }, "node_modules/retry": { "version": "0.13.1", "dev": true, @@ -15229,6 +15007,7 @@ }, "node_modules/signal-exit": { "version": "3.0.7", + "devOptional": true, "license": "ISC" }, "node_modules/simple-concat": { @@ -15543,15 +15322,6 @@ "node": ">=12" } }, - "node_modules/stream-to-it": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-to-it/-/stream-to-it-1.0.1.tgz", - "integrity": "sha512-AqHYAYPHcmvMrcLNgncE/q0Aj/ajP6A4qGhxP6EVn7K3YTNs0bJpJyk57wc2Heb7MUL64jurvmnmui8D9kjZgA==", - "license": "Apache-2.0 OR MIT", - "dependencies": { - "it-stream-types": "^2.0.1" - } - }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -15700,6 +15470,7 @@ }, "node_modules/strip-final-newline": { "version": "3.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=12" @@ -16452,6 +16223,18 @@ "dev": true, "license": "ISC" }, + "node_modules/unlimited-timeout": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unlimited-timeout/-/unlimited-timeout-0.1.0.tgz", + "integrity": "sha512-D4g+mxFeQGQHzCfnvij+R35ukJ0658Zzudw7j16p4tBBbNasKkKM4SocYxqhwT5xA7a9JYWDzKkEFyMlRi5sng==", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", diff --git a/package.json b/package.json index 073eeddbc..4697ca6b6 100644 --- a/package.json +++ b/package.json @@ -48,25 +48,25 @@ "changelog": "auto-changelog -p" }, "dependencies": { - "@chainsafe/libp2p-noise": "^15.1.0", - "@chainsafe/libp2p-yamux": "^6.0.2", + "@chainsafe/libp2p-noise": "^17.0.0", + "@chainsafe/libp2p-yamux": "^8.0.1", "@elastic/elasticsearch": "^8.14.0", - "@libp2p/autonat": "^2.0.0", - "@libp2p/bootstrap": "^10.1.1", - "@libp2p/circuit-relay-v2": "^1.1.1", - "@libp2p/crypto": "^4.1.5", - "@libp2p/dcutr": "^1.1.1", - "@libp2p/identify": "^2.1.1", - "@libp2p/kad-dht": "^12.1.1", - "@libp2p/mdns": "^10.1.1", - "@libp2p/peer-id": "^4.1.4", - "@libp2p/peer-id-factory": "^4.1.4", - "@libp2p/ping": "^1.1.1", - "@libp2p/pubsub": "^9.0.22", - "@libp2p/pubsub-peer-discovery": "^10.0.2", - "@libp2p/tcp": "^9.1.1", - "@libp2p/upnp-nat": "^1.2.1", - "@libp2p/websockets": "^8.1.1", + "@libp2p/autonat": "^3.0.9", + "@libp2p/bootstrap": "^12.0.10", + "@libp2p/circuit-relay-v2": "^4.1.2", + "@libp2p/crypto": "^5.1.13", + "@libp2p/dcutr": "^3.0.9", + "@libp2p/identify": "^4.0.9", + "@libp2p/kad-dht": "^16.1.2", + "@libp2p/mdns": "^12.0.10", + "@libp2p/peer-id": "^6.0.4", + "@libp2p/peer-id-factory": "^4.2.4", + "@libp2p/ping": "^3.0.9", + "@libp2p/pubsub": "^10.1.18", + "@libp2p/pubsub-peer-discovery": "^12.0.0", + "@libp2p/tcp": "^11.0.9", + "@libp2p/upnp-nat": "^4.0.9", + "@libp2p/websockets": "^10.1.2", "@multiformats/multiaddr": "^12.2.3", "@oceanprotocol/contracts": "^2.5.0", "@oceanprotocol/ddo-js": "^0.1.4", @@ -85,7 +85,7 @@ "ipaddr.js": "^2.3.0", "it-pipe": "^3.0.1", "jsonwebtoken": "^9.0.2", - "libp2p": "^1.8.0", + "libp2p": "^3.1.2", "lodash": "^4.17.21", "lzma-purejs-requirejs": "^1.0.0", "node-cron": "^3.0.3", diff --git a/src/OceanNode.ts b/src/OceanNode.ts index 9e7846c04..c75be8614 100644 --- a/src/OceanNode.ts +++ b/src/OceanNode.ts @@ -6,9 +6,6 @@ import { Database } from './components/database/index.js' import { Escrow } from './components/core/utils/escrow.js' import { CoreHandlersRegistry } from './components/core/handler/coreHandlersRegistry.js' import { OCEAN_NODE_LOGGER } from './utils/logging/common.js' -import { ReadableString } from './components/P2P/handleProtocolCommands.js' -import StreamConcat from 'stream-concat' -import { pipe } from 'it-pipe' import { GENERIC_EMOJIS, LOG_LEVELS_STR } from './utils/logging/Logger.js' import { BaseHandler } from './components/core/handler/handler.js' import { C2DEngines } from './components/c2d/compute_engines.js' @@ -147,57 +144,30 @@ export class OceanNode { } /** - * Use this method to direct calls to the node as node cannot dial into itself - * @param message command message - * @param sink transform function + * v3: Direct protocol command handler - no P2P, just call handler directly + * Returns {status, stream} without buffering + * @param message - JSON command string */ - async handleDirectProtocolCommand( - message: string, - sink: any - ): Promise { + async handleDirectProtocolCommand(message: string): Promise { OCEAN_NODE_LOGGER.logMessage('Incoming direct command for ocean peer', true) - let status = null - // let statusStream - let sendStream = null - let response: P2PCommandResponse = null - OCEAN_NODE_LOGGER.logMessage('Performing task: ' + message, true) try { const task = JSON.parse(message) const handler: BaseHandler = this.coreHandlers.getHandler(task.command) - if (handler === null) { - status = { - httpStatus: 501, - error: 'Unknown command or unexisting handler for command: ' + task.command - } - } else { - response = await handler.handle(task) - } - - if (response) { - // eslint-disable-next-line prefer-destructuring - status = response.status - sendStream = response.stream - } - const statusStream = new ReadableString(JSON.stringify(status)) - if (sendStream == null) { - pipe(statusStream, sink) - } else { - const combinedStream = new StreamConcat([statusStream, sendStream], { - highWaterMark: JSON.stringify(status).length - // the size of the buffer is important! - }) - pipe(combinedStream, sink) + if (!handler) { + return { + stream: null, + status: { + httpStatus: 501, + error: 'Unknown command or missing handler for: ' + task.command + } + } } - return ( - response || { - status, - stream: null - } - ) + // Return response directly without buffering + return await handler.handle(task) } catch (err) { OCEAN_NODE_LOGGER.logMessageWithEmoji( 'handleDirectProtocolCommands Error: ' + err.message, @@ -207,8 +177,8 @@ export class OceanNode { ) return { - status: { httpStatus: 500, error: err.message }, - stream: null + stream: null, + status: { httpStatus: 500, error: err.message } } } } diff --git a/src/components/Indexer/processors/BaseProcessor.ts b/src/components/Indexer/processors/BaseProcessor.ts index b8833b429..94bb097d9 100644 --- a/src/components/Indexer/processors/BaseProcessor.ts +++ b/src/components/Indexer/processors/BaseProcessor.ts @@ -22,7 +22,7 @@ import { getDatabase } from '../../../utils/database.js' import { INDEXER_LOGGER } from '../../../utils/logging/common.js' import { LOG_LEVELS_STR } from '../../../utils/logging/Logger.js' import { URLUtils } from '../../../utils/url.js' -import { streamToString } from '../../../utils/util.js' +import { streamToString, streamToUint8Array } from '../../../utils/util.js' import ERC721Template from '@oceanprotocol/contracts/artifacts/contracts/templates/ERC721Template.sol/ERC721Template.json' with { type: 'json' } import { toString as uint8ArrayToString } from 'uint8arrays/to-string' import ERC20Template from '@oceanprotocol/contracts/artifacts/contracts/templates/ERC20TemplateEnterprise.sol/ERC20TemplateEnterprise.json' with { type: 'json' } @@ -359,42 +359,7 @@ export abstract class BaseEventProcessor { } else { try { const p2pNode = await node.getP2PNode() - let isBinaryContent = false - const sink = async function (source: any) { - let first = true - for await (const chunk of source) { - if (first) { - first = false - try { - const str = uint8ArrayToString(chunk.subarray()) // Obs: we need to specify the length of the subarrays - const decoded = JSON.parse(str) - if ('headers' in decoded) { - if (str?.toLowerCase().includes('application/octet-stream')) { - isBinaryContent = true - } - } - if (decoded.httpStatus !== 200) { - INDEXER_LOGGER.logMessage( - `Error in sink method : ${decoded.httpStatus} errro: ${decoded.error}` - ) - throw new Error('Error in sink method', decoded.error) - } - } catch (e) { - INDEXER_LOGGER.logMessage( - `Error in sink method } error: ${e.message}` - ) - throw new Error(`Error in sink method ${e.message}`) - } - } else { - if (isBinaryContent) { - return chunk.subarray() - } else { - const str = uint8ArrayToString(chunk.subarray()) - return str - } - } - } - } + const message = { command: PROTOCOL_COMMANDS.DECRYPT_DDO, transactionId: txId, @@ -406,12 +371,20 @@ export abstract class BaseEventProcessor { signature, nonce } - const response = await p2pNode.sendTo( - decryptorURL, - JSON.stringify(message), - sink - ) - ddo = JSON.parse(await streamToString(response.stream as Readable)) + + const response = await p2pNode.sendTo(decryptorURL, JSON.stringify(message)) + + if (response.status.httpStatus !== 200) { + throw new Error(`Decrypt failed: ${response.status.error}`) + } + + if (!response.stream) { + throw new Error('No data received from decrypt') + } + + // Convert stream to Uint8Array + const data = await streamToUint8Array(response.stream as Readable) + ddo = JSON.parse(uint8ArrayToString(data)) } catch (error) { const message = `Node exception on decrypt DDO. Status: ${error.message}` INDEXER_LOGGER.log(LOG_LEVELS_STR.LEVEL_ERROR, message) diff --git a/src/components/P2P/handleProtocolCommands.ts b/src/components/P2P/handleProtocolCommands.ts index 507234d19..09317cb6c 100644 --- a/src/components/P2P/handleProtocolCommands.ts +++ b/src/components/P2P/handleProtocolCommands.ts @@ -1,18 +1,18 @@ -import { pipe } from 'it-pipe' import { Readable } from 'stream' import { toString as uint8ArrayToString } from 'uint8arrays/to-string' +import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' import { P2P_LOGGER } from '../../utils/logging/common.js' import { Command } from '../../@types/commands.js' import { P2PCommandResponse } from '../../@types/OceanNode' import { GENERIC_EMOJIS, LOG_LEVELS_STR } from '../../utils/logging/Logger.js' -import StreamConcat from 'stream-concat' import { BaseHandler } from '../core/handler/handler.js' import { getConfiguration } from '../../utils/index.js' import { checkGlobalConnectionsRateLimit, checkRequestsRateLimit } from '../../utils/validators.js' +import type { Stream } from '@libp2p/interface' export class ReadableString extends Readable { private sent = false @@ -31,182 +31,119 @@ export class ReadableString extends Readable { } } -// close the stream after sending data, libp2p will handle stream status -async function closeStreamConnection(connection: any, remotePeer: string) { - if (connection) { - try { - P2P_LOGGER.debug('Closing connection to remote peer:' + remotePeer) - await connection.close() - } catch (e) { - P2P_LOGGER.error(`Error closing connection for peer ${remotePeer}: ${e.message}`) - } - } -} - -export async function handleProtocolCommands(otherPeerConnection: any) { - const { remotePeer, remoteAddr } = otherPeerConnection.connection +export async function handleProtocolCommands(stream: Stream, connection: any) { + const { remotePeer, remoteAddr } = connection - // only write if stream is in 'open' status - const connectionStatus = otherPeerConnection.connection.status P2P_LOGGER.logMessage('Incoming connection from peer ' + remotePeer, true) P2P_LOGGER.logMessage('Using ' + remoteAddr, true) - let status = null - let task: Command - let statusStream - let sendStream = null - - const buildWrongCommandStatus = function (errorCode: number, message: string) { - status = { - httpStatus: errorCode, - error: message + const sendErrorAndClose = async (httpStatus: number, error: string) => { + try { + const status = { httpStatus, error } + stream.send(uint8ArrayFromString(JSON.stringify(status))) + await stream.close() + } catch (e) { + P2P_LOGGER.error(`Error sending error response: ${e.message}`) + try { + stream.abort(e as Error) + } catch {} } - return status } + // Rate limiting and deny list checks const configuration = await getConfiguration() - // check deny list configs const { denyList } = configuration - if (denyList.peers.length > 0) { - if (denyList.peers.includes(remotePeer.toString())) { - P2P_LOGGER.warn( - `Incoming request denied to peer: ${remotePeer} (peer its on deny list)` - ) - - if (connectionStatus === 'open') { - statusStream = new ReadableString( - JSON.stringify(buildWrongCommandStatus(403, 'Unauthorized request')) - ) - try { - await pipe(statusStream, otherPeerConnection.stream.sink) - } catch (e) { - P2P_LOGGER.error(e) - } - } - await closeStreamConnection(otherPeerConnection.connection, remotePeer) - return - } + + if (denyList.peers.includes(remotePeer.toString())) { + P2P_LOGGER.warn(`Incoming request denied to peer: ${remotePeer} (peer on deny list)`) + await sendErrorAndClose(403, 'Unauthorized request') + return } - // check connections rate limit - const now = Date.now() + const now = Date.now() const rateLimitCheck = checkRequestsRateLimit(remoteAddr, configuration, now) if (!rateLimitCheck.valid) { P2P_LOGGER.warn( `Incoming request denied to peer: ${remotePeer} (rate limit exceeded)` ) - if (connectionStatus === 'open') { - statusStream = new ReadableString( - JSON.stringify(buildWrongCommandStatus(403, 'Rate limit exceeded')) - ) - try { - await pipe(statusStream, otherPeerConnection.stream.sink) - } catch (e) { - P2P_LOGGER.error(e) - } - } - await closeStreamConnection(otherPeerConnection.connection, remotePeer) + await sendErrorAndClose(403, 'Rate limit exceeded') return } - // check global rate limits (not ip related) const connectionsRateValidation = checkGlobalConnectionsRateLimit(configuration, now) if (!connectionsRateValidation.valid) { P2P_LOGGER.warn( `Exceeded limit of connections per minute ${configuration.maxConnections}: ${connectionsRateValidation.error}` ) - if (connectionStatus === 'open') { - statusStream = new ReadableString( - JSON.stringify(buildWrongCommandStatus(403, 'Rate limit exceeded')) - ) - try { - await pipe(statusStream, otherPeerConnection.stream.sink) - } catch (e) { - P2P_LOGGER.error(e) - } - } - await closeStreamConnection(otherPeerConnection.connection, remotePeer) + await sendErrorAndClose(403, 'Rate limit exceeded') return } + // v3 streams are AsyncIterable + let task: Command try { - // eslint-disable-next-line no-unreachable-loop - for await (const chunk of otherPeerConnection.stream.source) { + for await (const chunk of stream) { try { const str = uint8ArrayToString(chunk.subarray()) task = JSON.parse(str) as Command } catch (e) { - if (connectionStatus === 'open') { - statusStream = new ReadableString( - JSON.stringify(buildWrongCommandStatus(400, 'Invalid command')) - ) - await pipe(statusStream, otherPeerConnection.stream.sink) - } - - await closeStreamConnection(otherPeerConnection.connection, remotePeer) + await sendErrorAndClose(400, 'Invalid command') return } } - if (!task) { - P2P_LOGGER.error('Invalid or missing task/command data!') - if (connectionStatus === 'open') { - statusStream = new ReadableString( - JSON.stringify(buildWrongCommandStatus(400, 'Invalid command')) - ) - await pipe(statusStream, otherPeerConnection.stream.sink) - } - - await closeStreamConnection(otherPeerConnection.connection, remotePeer) - return - } } catch (err) { P2P_LOGGER.log( LOG_LEVELS_STR.LEVEL_ERROR, `Unable to process P2P command: ${err.message}` ) - await closeStreamConnection(otherPeerConnection.connection, remotePeer) + await sendErrorAndClose(400, 'Invalid command') + return + } + + if (!task) { + P2P_LOGGER.error('Invalid or missing task/command data!') + await sendErrorAndClose(400, 'Invalid command') return } P2P_LOGGER.logMessage('Performing P2P task: ' + JSON.stringify(task), true) - // we get the handler from the running instance - // no need to create a new instance of Handler on every request + + // Get and execute handler const handler: BaseHandler = this.getCoreHandlers().getHandler(task.command) - let response: P2PCommandResponse = null - if (handler === null) { - status = { httpStatus: 501, error: `No handler found for command: ${task.command}` } - } else { - try { - // who is calling this handler? - handler.getOceanNode().setRemoteCaller(remotePeer.toString()) - response = await handler.handle(task) - if (response) { - // eslint-disable-next-line prefer-destructuring - status = response.status - sendStream = response.stream - } - statusStream = new ReadableString(JSON.stringify(status)) - - if (connectionStatus === 'open') { - if (sendStream == null) { - await pipe(statusStream, otherPeerConnection.stream.sink) - await closeStreamConnection(otherPeerConnection.connection, remotePeer) - } else { - const combinedStream = new StreamConcat([statusStream, sendStream], { - highWaterMark: JSON.stringify(status).length // important for reading chunks correctly on sink! + if (!handler) { + await sendErrorAndClose(501, `No handler found for command: ${task.command}`) + return + } + + try { + handler.getOceanNode().setRemoteCaller(remotePeer.toString()) + const response: P2PCommandResponse = await handler.handle(task) + + // Send status first + stream.send(uint8ArrayFromString(JSON.stringify(response.status))) + + // Stream data chunks without buffering, with backpressure support + if (response.stream) { + for await (const chunk of response.stream as Readable) { + const bytes = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk) + + // Handle backpressure - if send returns false, wait for drain + if (!stream.send(bytes)) { + await stream.onDrain({ + signal: AbortSignal.timeout(30000) // 30 second timeout for drain }) - await pipe(combinedStream, otherPeerConnection.stream.sink) - // Don't close for data streams - sender closes when done reading } } - } catch (err) { - P2P_LOGGER.logMessageWithEmoji( - 'handleProtocolCommands Error: ' + err.message, - true, - GENERIC_EMOJIS.EMOJI_CROSS_MARK, - LOG_LEVELS_STR.LEVEL_ERROR - ) - await closeStreamConnection(otherPeerConnection.connection, remotePeer) } + + await stream.close() + } catch (err) { + P2P_LOGGER.logMessageWithEmoji( + 'handleProtocolCommands Error: ' + err.message, + true, + GENERIC_EMOJIS.EMOJI_CROSS_MARK, + LOG_LEVELS_STR.LEVEL_ERROR + ) + await sendErrorAndClose(500, err.message) } } diff --git a/src/components/P2P/index.ts b/src/components/P2P/index.ts index 781142275..857ca9c95 100644 --- a/src/components/P2P/index.ts +++ b/src/components/P2P/index.ts @@ -1,23 +1,24 @@ // import diff from 'hyperdiff' -import { P2PCommandResponse } from '../../@types/index' import EventEmitter from 'node:events' import lodash from 'lodash' import { handleProtocolCommands } from './handlers.js' import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' +import { toString as uint8ArrayToString } from 'uint8arrays/to-string' +import type { Stream } from '@libp2p/interface' import { bootstrap } from '@libp2p/bootstrap' import { noise } from '@chainsafe/libp2p-noise' import { mdns } from '@libp2p/mdns' import { yamux } from '@chainsafe/libp2p-yamux' import { peerIdFromString } from '@libp2p/peer-id' -import { pipe } from 'it-pipe' // import { pubsubPeerDiscovery } from '@libp2p/pubsub-peer-discovery' import { tcp } from '@libp2p/tcp' import { webSockets } from '@libp2p/websockets' import { circuitRelayTransport, circuitRelayServer } from '@libp2p/circuit-relay-v2' import { createLibp2p, Libp2p } from 'libp2p' +import type { AddressManager, TransportManager } from '@libp2p/interface-internal' import { identify, identifyPush } from '@libp2p/identify' import { autoNAT } from '@libp2p/autonat' import { uPnPNAT } from '@libp2p/upnp-nat' @@ -61,7 +62,7 @@ type DDOCache = { let index = 0 export class OceanP2P extends EventEmitter { - _libp2p: any + _libp2p: Libp2p _topic: string _options: any _peers: any[] @@ -162,6 +163,26 @@ export class OceanP2P extends EventEmitter { try { const peerInfo = details.detail P2P_LOGGER.debug('Discovered new peer:' + peerInfo.id.toString()) + + // v2/v3: autodialer was removed - we implement custom dial logic + const currentConnections = this._libp2p.getConnections().length + const { minConnections, maxConnections } = this._config.p2pConfig + + // Only dial if we're below minConnections or have room for more + if (currentConnections < minConnections || currentConnections < maxConnections) { + const existingConnections = this._libp2p.getConnections(peerInfo.id) + if (existingConnections.length === 0) { + this._libp2p + .dial(peerInfo.id, { + signal: AbortSignal.timeout(10000) + }) + .catch((err: Error) => { + P2P_LOGGER.debug( + `Failed to dial discovered peer ${peerInfo.id}: ${err.message}` + ) + }) + } + } } catch (e) { // no panic if it failed // console.error(e) @@ -234,7 +255,7 @@ export class OceanP2P extends EventEmitter { P2P_LOGGER.info(`Starting P2P Node with peerID: ${this._publicAddress}`) this._publicKey = config.keys.publicKey - this._privateKey = config.keys.privateKey + this._privateKey = config.keys.privateKey.raw /** @type {import('libp2p').Libp2pOptions} */ // start with some default, overwrite based on config later const bindInterfaces = [] @@ -337,33 +358,24 @@ export class OceanP2P extends EventEmitter { let transports = [] P2P_LOGGER.info('Enabling P2P Transports: websockets, tcp, circuitRelay') - transports = [ - webSockets(), - tcp(), - circuitRelayTransport({ - discoverRelays: config.p2pConfig.circuitRelays - }) - ] + // relay discovery is now automatic through the network's RandomWalk component + transports = [webSockets(), tcp(), circuitRelayTransport()] let options = { addresses, - peerId: config.keys.peerId, + privateKey: config.keys.privateKey, transports, streamMuxers: [yamux()], - connectionEncryption: [ + connectionEncrypters: [ noise() // plaintext() ], services: servicesConfig, connectionManager: { - maxParallelDials: config.p2pConfig.connectionsMaxParallelDials, // 150 total parallel multiaddr dials - dialTimeout: config.p2pConfig.connectionsDialTimeout, // 10 second dial timeout per peer dial - minConnections: config.p2pConfig.minConnections, + maxParallelDials: config.p2pConfig.connectionsMaxParallelDials, + dialTimeout: config.p2pConfig.connectionsDialTimeout, maxConnections: config.p2pConfig.maxConnections, - autoDialPeerRetryThreshold: config.p2pConfig.autoDialPeerRetryThreshold, - autoDialConcurrency: config.p2pConfig.autoDialConcurrency, - maxPeerAddrsToDial: config.p2pConfig.maxPeerAddrsToDial, - autoDialInterval: config.p2pConfig.autoDialInterval + maxPeerAddrsToDial: config.p2pConfig.maxPeerAddrsToDial } } if (config.p2pConfig.bootstrapNodes && config.p2pConfig.bootstrapNodes.length > 0) { @@ -443,13 +455,23 @@ export class OceanP2P extends EventEmitter { // } } - async getNetworkingStats() { + getNetworkingStats() { const ret: any = {} - ret.binds = await this._libp2p.components.addressManager.getListenAddrs() - ret.listen = await this._libp2p.components.transportManager.getAddrs() - ret.observing = await this._libp2p.components.addressManager.getObservedAddrs() - ret.announce = await this._libp2p.components.addressManager.getAnnounceAddrs() - ret.connections = await this._libp2p.getConnections() + ret.announce = this._libp2p.getMultiaddrs() + ret.connections = this._libp2p.getConnections() + + const libp2pInternal = this._libp2p as Libp2p & { + components: { + addressManager: AddressManager + transportManager: TransportManager + } + } + if (libp2pInternal.components) { + ret.binds = libp2pInternal.components.addressManager.getListenAddrs() + ret.listen = libp2pInternal.components.transportManager.getAddrs() + ret.observing = libp2pInternal.components.addressManager.getObservedAddrs() + } + return ret } @@ -506,11 +528,9 @@ export class OceanP2P extends EventEmitter { // UPDATE: no need to slice 4 bytes here, actually we need those on client side to verify the node id and perform the encryption of the keys + iv // See config.ts => getPeerIdFromPrivateKey() - const pubKey = Buffer.from(peerId.publicKey).toString('hex') // no need to do .subarray(4).toString('hex') + const pubKey = Buffer.from(peerId.publicKey.raw).toString('hex') // no need to do .subarray(4).toString('hex') const peer = await this._libp2p.peerStore.get(peerId) - // write the publicKey as well - peer.publicKey = pubKey // Note: this is a 'compressed' version of the publicKey, we need to decompress it on client side (not working with bellow attempts) // otherwise the encryption will fail due to public key size mismatch @@ -519,12 +539,43 @@ export class OceanP2P extends EventEmitter { // Buffer.from(decompressedKey).toString('hex') // in any case is not working (it crashes here) - return peer + return { + ...peer, + publicKey: pubKey + } } catch (e) { return null } } + // we should have peer multiaddrs + // but there is a catch + // when dialing multiaddrs, either all of them have peerId, or none.. + // so decide which one to use + normalizeMultiaddrs(peerName: string, multiaddrs: Multiaddr[]): Multiaddr[] { + let finalmultiaddrs: Multiaddr[] = [] + const finalmultiaddrsWithAddress: Multiaddr[] = [] + const finalmultiaddrsWithoutAddress: Multiaddr[] = [] + for (const x of multiaddrs) { + if (x.toString().includes(peerName)) finalmultiaddrsWithAddress.push(x) + else { + let sd = x.toString() + if (x.toString().includes('p2p-circuit')) { + // because a p2p-circuit should always include peerId, if it's missing we will add it + sd = sd + '/p2p/' + peerName + finalmultiaddrsWithAddress.push(multiaddr(sd)) + } else { + finalmultiaddrsWithoutAddress.push(multiaddr(sd)) + } + } + } + if (finalmultiaddrsWithAddress.length > finalmultiaddrsWithoutAddress.length) + finalmultiaddrs = finalmultiaddrsWithAddress + else finalmultiaddrs = finalmultiaddrsWithoutAddress + + return finalmultiaddrs + } + async getPeerMultiaddrs( peerName: string, searchPeerStore: boolean = true, @@ -545,9 +596,19 @@ export class OceanP2P extends EventEmitter { }) if (peerData) { for (const x of peerData.addresses) { - multiaddrs.push(x.multiaddr) + // v3: Convert to local Multiaddr type to avoid type mismatch + multiaddrs.push(multiaddr(x.multiaddr.toString())) } } + + // If we have a connection, multiaddrs from peerStore are valid + const connection = await this._libp2p.dial(multiaddrs) + if ( + connection.remotePeer.toString() === peerId.toString() && + connection.status === 'open' + ) { + return this.normalizeMultiaddrs(peerName, multiaddrs) + } } catch (e) { // console.log(e) } @@ -560,7 +621,8 @@ export class OceanP2P extends EventEmitter { }) if (peerData) { for (const index in peerData.multiaddrs) { - multiaddrs.push(peerData.multiaddrs[index]) + // v3: Convert to local Multiaddr type to avoid type mismatch + multiaddrs.push(multiaddr(peerData.multiaddrs[index].toString())) } } } catch (e) { @@ -568,30 +630,7 @@ export class OceanP2P extends EventEmitter { } } - // now we should have peer multiaddrs - // but there is a catch - // when dialing multiaddrs, either all of them have peerId, or none.. - // so decide which one to use - let finalmultiaddrs: Multiaddr[] = [] - const finalmultiaddrsWithAddress: Multiaddr[] = [] - const finalmultiaddrsWithoutAddress: Multiaddr[] = [] - for (const x of multiaddrs) { - if (x.toString().includes(peerName)) finalmultiaddrsWithAddress.push(x) - else { - let sd = x.toString() - if (x.toString().includes('p2p-circuit')) { - // because a p2p-circuit should always include peerId, if it's missing we will add it - sd = sd + '/p2p/' + peerName - finalmultiaddrsWithAddress.push(multiaddr(sd)) - } else { - finalmultiaddrsWithoutAddress.push(multiaddr(sd)) - } - } - } - if (finalmultiaddrsWithAddress.length > finalmultiaddrsWithoutAddress.length) - finalmultiaddrs = finalmultiaddrsWithAddress - else finalmultiaddrs = finalmultiaddrsWithoutAddress - return finalmultiaddrs + return this.normalizeMultiaddrs(peerName, multiaddrs) } async findPeerInDht(peerName: string, timeout?: number) { @@ -613,98 +652,86 @@ export class OceanP2P extends EventEmitter { async sendTo( peerName: string, message: string, - sink: any, multiAddrs?: string[] - ): Promise { + ): Promise<{ status: any; stream?: AsyncIterable }> { P2P_LOGGER.logMessage('SendTo() node ' + peerName + ' task: ' + message, true) - const response: P2PCommandResponse = { - status: { httpStatus: 200, error: '' }, - stream: null - } - let peerId: any + let peerId try { peerId = peerIdFromString(peerName) } catch (e) { P2P_LOGGER.logMessageWithEmoji( - 'Invalid peer (for id): ' + peerId, + 'Invalid peer (for id): ' + peerName, true, GENERIC_EMOJIS.EMOJI_CROSS_MARK, LOG_LEVELS_STR.LEVEL_ERROR ) - response.status.httpStatus = 404 - response.status.error = 'Invalid peer' - return response + return { status: { httpStatus: 404, error: 'Invalid peer' } } } - let multiaddrs: Multiaddr[] = [] + let multiaddrs: Multiaddr[] = [] if (!multiAddrs || multiAddrs.length < 1) { - // if they are no forced multiaddrs, try to find node multiaddr from peerStore/dht multiaddrs = await this.getPeerMultiaddrs(peerName) } else { - // just used what we were instructed to use for (const addr of multiAddrs) { multiaddrs.push(multiaddr(addr)) } } + if (multiaddrs.length < 1) { - response.status.httpStatus = 404 - response.status.error = `Cannot find any address to dial for peer: ${peerId}` - P2P_LOGGER.error(response.status.error) - return response + const error = `Cannot find any address to dial for peer: ${peerId}` + P2P_LOGGER.error(error) + return { status: { httpStatus: 404, error } } } - let stream - // dial/connect to the target node + let stream: Stream try { const options = { signal: AbortSignal.timeout(10000), priority: 100, - runOnTransientConnection: true + runOnLimitedConnection: true } const connection = await this._libp2p.dial(multiaddrs, options) if (connection.remotePeer.toString() !== peerId.toString()) { - response.status.httpStatus = 404 - response.status.error = `Invalid peer on the other side: ${connection.remotePeer.toString()}` - P2P_LOGGER.error(response.status.error) - return response + const error = `Invalid peer on the other side: ${connection.remotePeer.toString()}` + P2P_LOGGER.error(error) + return { status: { httpStatus: 404, error } } } stream = await connection.newStream(this._protocol, options) } catch (e) { - response.status.httpStatus = 404 - response.status.error = `Cannot connect to peer ${peerId}: ${e.message}` - P2P_LOGGER.error(response.status.error) - return response + const error = `Cannot connect to peer ${peerId}: ${e.message}` + P2P_LOGGER.error(error) + return { status: { httpStatus: 404, error } } } - if (stream) { - response.stream = stream - try { - await pipe( - // Source data - [uint8ArrayFromString(message)], - // Write to the stream, and pass its output to the next function - stream, - // this is the anayze function - // doubler as any, - // Sink function - sink - ) - } catch (err) { - P2P_LOGGER.error( - `Cannot connect to peer - Unable to send P2P message: ${err.message}` - ) - response.status.httpStatus = 500 - response.status.error = `Cannot connect to peer - Unable to send P2P message: ${err.message}` - response.stream = null - } - } else { - response.status.httpStatus = 404 - response.status.error = 'Unable to get remote P2P stream (null)' - P2P_LOGGER.error(response.status.error) + if (!stream) { + return { status: { httpStatus: 404, error: 'Unable to get remote P2P stream' } } } - return response + try { + // Send message and close write side + stream.send(uint8ArrayFromString(message)) + await stream.close() + + // Read and parse status from first chunk + const iterator = stream[Symbol.asyncIterator]() + const { done, value } = await iterator.next() + + if (done || !value) { + return { status: { httpStatus: 500, error: 'No response from peer' } } + } + + const status = JSON.parse(uint8ArrayToString(value.subarray())) + + // Return status and remaining stream + return { status, stream: { [Symbol.asyncIterator]: () => iterator } } + } catch (err) { + P2P_LOGGER.error(`P2P communication error: ${err.message}`) + try { + stream.abort(err as Error) + } catch {} + return { status: { httpStatus: 500, error: `P2P error: ${err.message}` } } + } } // when the target is this node @@ -781,8 +808,9 @@ export class OceanP2P extends EventEmitter { P2P_LOGGER.debug('Advertising "' + did + `" as CID:` + cid) const x = (await this.getAllOceanPeers()).length if (x > 0) { - const multiAddrs = this._libp2p.components.addressManager.getAddresses() + const multiAddrs = this._libp2p.getMultiaddrs() // console.log('multiaddrs: ', multiAddrs) + // @ts-ignore ignore the type mismatch this._libp2p.contentRouting.provide(cid, multiAddrs).catch((err: any) => { P2P_LOGGER.error(`Error advertising DDO: ${err}`) }) @@ -832,6 +860,7 @@ export class OceanP2P extends EventEmitter { const cid = await cidFromRawString(input) const peersFound = [] try { + // @ts-ignore ignore the type mismatch const f = await this._libp2p.contentRouting.findProviders(cid, { queryFuncTimeout: timeout || 20000 // 20 seconds // on timeout the query ends with an abort signal => CodeError: Query aborted @@ -842,7 +871,10 @@ export class OceanP2P extends EventEmitter { } catch (e) { P2P_LOGGER.error('getProvidersForString()' + e.message) } - return peersFound + return peersFound.map((peer) => ({ + id: peer.id.toString(), + multiaddrs: peer.multiaddrs + })) } // cache a ddos object diff --git a/src/components/core/handler/ddoHandler.ts b/src/components/core/handler/ddoHandler.ts index 6573514e1..967f0a5c9 100644 --- a/src/components/core/handler/ddoHandler.ts +++ b/src/components/core/handler/ddoHandler.ts @@ -11,7 +11,7 @@ import { } from '../utils/findDdoHandler.js' import { toString as uint8ArrayToString } from 'uint8arrays/to-string' import { GENERIC_EMOJIS, LOG_LEVELS_STR } from '../../../utils/logging/Logger.js' -import { sleep, readStream } from '../../../utils/util.js' +import { sleep, readStream, streamToUint8Array } from '../../../utils/util.js' import { CORE_LOGGER } from '../../../utils/logging/common.js' import { Blockchain } from '../../../utils/blockchain.js' import { ethers, isAddress } from 'ethers' @@ -516,7 +516,6 @@ export class FindDdoHandler extends CommandHandler { } // otherwise we need to contact other providers and get DDO from them // ids of available providers - const providerIds: string[] = [] let processed = 0 let toProcess = 0 @@ -532,76 +531,48 @@ export class FindDdoHandler extends CommandHandler { updatedCache = true } - // sink fn - const sink = async function (source: any) { - const chunks: string[] = [] - let first = true + const processDDOResponse = async (peer: string, data: Uint8Array) => { try { - for await (const chunk of source) { - if (first) { - first = false - const str = uint8ArrayToString(chunk.subarray()) // Obs: we need to specify the length of the subarrays - const decoded = JSON.parse(str) - if (decoded.httpStatus !== 200) { - processed++ - break - } - } else { - const str = uint8ArrayToString(chunk.subarray()) - chunks.push(str) + const ddo: any = JSON.parse(uint8ArrayToString(data)) + const isResponseLegit = await checkIfDDOResponseIsLegit(ddo) + + if (isResponseLegit) { + const ddoInfo: FindDDOResponse = { + id: ddo.id, + lastUpdateTx: ddo.indexedMetadata.event.txid, + lastUpdateTime: ddo.metadata.updated, + provider: peer } - } // end for chunk - - const ddo: any = JSON.parse(chunks.toString()) - - chunks.length = 0 - // process it - if (providerIds.length > 0) { - const peer = providerIds.pop() - const isResponseLegit = await checkIfDDOResponseIsLegit(ddo) - if (isResponseLegit) { - const ddoInfo: FindDDOResponse = { - id: ddo.id, - lastUpdateTx: ddo.indexedMetadata.event.txid, - lastUpdateTime: ddo.metadata.updated, - provider: peer - } - resultList.push(ddoInfo) - - CORE_LOGGER.logMessage( - `Succesfully processed DDO info, id: ${ddo.id} from remote peer: ${peer}`, - true - ) + resultList.push(ddoInfo) + + CORE_LOGGER.logMessage( + `Successfully processed DDO info, id: ${ddo.id} from remote peer: ${peer}`, + true + ) + + // Update cache + const ddoCache = p2pNode.getDDOCache() + const localValue = ddoCache.dht.get(ddo.id) + if ( + !localValue || + new Date(ddoInfo.lastUpdateTime) > new Date(localValue.lastUpdateTime) + ) { + ddoCache.dht.set(ddo.id, ddoInfo) + } + updatedCache = true - // is it cached? - const ddoCache = p2pNode.getDDOCache() - if (ddoCache.dht.has(ddo.id)) { - const localValue: FindDDOResponse = ddoCache.dht.get(ddo.id) - if ( - new Date(ddoInfo.lastUpdateTime) > new Date(localValue.lastUpdateTime) - ) { - // update cached version - ddoCache.dht.set(ddo.id, ddoInfo) - } - } else { - // just add it to the list - ddoCache.dht.set(ddo.id, ddoInfo) - } - updatedCache = true - // also store it locally on db - if (configuration.hasIndexer) { - const ddoExistsLocally = await node.getDatabase().ddo.retrieve(ddo.id) - if (!ddoExistsLocally) { - p2pNode.storeAndAdvertiseDDOS([ddo]) - } + // Store locally if indexer is enabled + if (configuration.hasIndexer) { + const ddoExistsLocally = await node.getDatabase().ddo.retrieve(ddo.id) + if (!ddoExistsLocally) { + p2pNode.storeAndAdvertiseDDOS([ddo]) } - } else { - CORE_LOGGER.warn( - `Cannot confirm validity of ${ddo.id} fetch from remote node, skipping it...` - ) } + } else { + CORE_LOGGER.warn( + `Cannot confirm validity of ${ddo.id} from remote node, skipping...` + ) } - processed++ } catch (err) { CORE_LOGGER.logMessageWithEmoji( 'FindDDO: Error on sink function: ' + err.message, @@ -609,10 +580,9 @@ export class FindDdoHandler extends CommandHandler { GENERIC_EMOJIS.EMOJI_CROSS_MARK, LOG_LEVELS_STR.LEVEL_ERROR ) - processed++ } + processed++ } - // end sink // if something goes really bad then exit after 60 secs const fnTimeout = setTimeout(() => { @@ -651,27 +621,22 @@ export class FindDdoHandler extends CommandHandler { id: task.id, command: PROTOCOL_COMMANDS.GET_DDO } - // NOTE: do not push to response until we verify that it is legitimate - providerIds.push(peer) try { - // problem here is that even if we get the P2PCommandResponse right after await(), we still don't know - // exactly when the chunks are written/processed/received on the sink function - // so, better to wait/sleep some small amount of time before proceeding to the next one - const response: P2PCommandResponse = await p2pNode.sendTo( - peer, - JSON.stringify(getCommand), - sink - ) - if (response.status.httpStatus !== 200) { - providerIds.pop() // move to the next one + const response = await p2pNode.sendTo(peer, JSON.stringify(getCommand)) + + if (response.status.httpStatus === 200 && response.stream) { + // Convert stream to Uint8Array for processing + const data = await streamToUint8Array(response.stream as Readable) + await processDDOResponse(peer, data) + } else { processed++ } } catch (innerException) { - providerIds.pop() // ignore this one processed++ } // 'sleep 5 seconds...' + CORE_LOGGER.logMessage( `Sleeping for: ${MAX_WAIT_TIME_SECONDS_GET_DDO} seconds, while getting DDO info remote peer...`, true diff --git a/src/components/core/handler/downloadHandler.ts b/src/components/core/handler/downloadHandler.ts index 92aa2d7ea..7615a82bd 100644 --- a/src/components/core/handler/downloadHandler.ts +++ b/src/components/core/handler/downloadHandler.ts @@ -108,7 +108,7 @@ export async function handleDownloadUrlCommand( // we parse the string into the object again const encryptedObject = ethCrypto.cipher.parse(task.aes_encrypted_key) // get the key from configuration - const nodePrivateKey = Buffer.from(config.keys.privateKey).toString('hex') + const nodePrivateKey = Buffer.from(config.keys.privateKey.raw).toString('hex') const decrypted = await ethCrypto.decryptWithPrivateKey( nodePrivateKey, encryptedObject diff --git a/src/components/core/handler/p2p.ts b/src/components/core/handler/p2p.ts index c0ff41625..fa87f367d 100644 --- a/src/components/core/handler/p2p.ts +++ b/src/components/core/handler/p2p.ts @@ -132,7 +132,7 @@ export class GetP2PNetworkStatsHandler extends CommandHandler { try { const config = await getConfiguration() if (config.p2pConfig.enableNetworkStats) { - const stats = await this.getOceanNode().getP2PNode().getNetworkingStats() + const stats = this.getOceanNode().getP2PNode().getNetworkingStats() return { stream: Readable.from(JSON.stringify(stats, null, 4)), status: { httpStatus: 200 } diff --git a/src/components/core/utils/feesHandler.ts b/src/components/core/utils/feesHandler.ts index 92d356731..450aafc4a 100644 --- a/src/components/core/utils/feesHandler.ts +++ b/src/components/core/utils/feesHandler.ts @@ -452,7 +452,7 @@ export async function checkFee( */ export async function getProviderWallet(chainId?: string): Promise { return new ethers.Wallet( - Buffer.from((await getConfiguration()).keys.privateKey).toString('hex') + Buffer.from((await getConfiguration()).keys.privateKey.raw).toString('hex') ) } export async function getProviderWalletAddress(): Promise { @@ -460,7 +460,7 @@ export async function getProviderWalletAddress(): Promise { } export async function getProviderKey(): Promise { - return Buffer.from((await getConfiguration()).keys.privateKey).toString('hex') + return Buffer.from((await getConfiguration()).keys.privateKey.raw).toString('hex') } /** diff --git a/src/components/httpRoutes/commands.ts b/src/components/httpRoutes/commands.ts index 6256def36..746d4caf7 100644 --- a/src/components/httpRoutes/commands.ts +++ b/src/components/httpRoutes/commands.ts @@ -1,17 +1,64 @@ /* eslint-disable no-unreachable */ import express, { Request, Response } from 'express' -import { P2PCommandResponse } from '../../@types' import { toString as uint8ArrayToString } from 'uint8arrays/to-string' import { HTTP_LOGGER } from '../../utils/logging/common.js' import { hasP2PInterface } from '../../utils/config.js' import { validateCommandParameters } from './validateCommands.js' +import { Readable } from 'stream' + +function mapChunkToBuffer(chunk: any): Buffer | Uint8Array { + if (typeof chunk === 'string') { + return Buffer.from(chunk) + } + + if (Buffer.isBuffer(chunk)) { + return chunk + } + + if (typeof chunk === 'object' && 'subarray' in chunk) { + return chunk.subarray() + } + + return Buffer.from(JSON.stringify(chunk)) +} + +async function streamToResponse( + res: Response, + stream: any, + isBinaryContent: boolean +): Promise { + if (!stream) { + HTTP_LOGGER.error('streamToResponse called with null/undefined stream') + throw new Error('Stream is null or undefined') + } + + try { + for await (const chunk of stream) { + if (!chunk) { + continue + } + + const data = mapChunkToBuffer(chunk) + if (isBinaryContent) { + res.write(data) + } else { + res.write(uint8ArrayToString(data)) + } + } + } catch (err) { + HTTP_LOGGER.error(`Stream error: ${err.message}`) + throw err + } +} export const directCommandRoute = express.Router() directCommandRoute.post( '/directCommand', express.json(), async (req: Request, res: Response): Promise => { + let closedResponse = false + try { const validate = validateCommandParameters(req.body, []) if (!validate.valid) { @@ -19,115 +66,76 @@ directCommandRoute.post( return } - let closedResponse = false - - // detect connection closed res.on('close', () => { if (!closedResponse) { HTTP_LOGGER.error('TCP connection was closed before we could send a response!') } closedResponse = true }) - let isBinaryContent = false - const sink = async function (source: any) { - let first = true - for await (const chunk of source) { - if (first) { - first = false - try { - const str = uint8ArrayToString(chunk.subarray()) // Obs: we need to specify the length of the subarrays - const decoded = JSON.parse(str) - - res.status(decoded.httpStatus) - if ('headers' in decoded) { - res.header(decoded.headers) - // when streaming binary data we cannot convert to plain string, specially if encrypted data - if (str?.toLowerCase().includes('application/octet-stream')) { - isBinaryContent = true - } - } - } catch (e) { - res.status(500) - res.write(uint8ArrayToString(chunk.subarray())) - closedResponse = true - res.end() - HTTP_LOGGER.error(e.message) - } - } else { - try { - if (isBinaryContent) { - // Binary content, could be encrypted - res.write(chunk.subarray()) - } else { - const str = uint8ArrayToString(chunk.subarray()) - res.write(str) - } - } catch (e) { - HTTP_LOGGER.error(e.message) - } - } - } - closedResponse = true - res.end() - } HTTP_LOGGER.logMessage('Sending command : ' + JSON.stringify(req.body), true) - // TODO NOTES: We are sending all "/directCommand" requests to the P2P component as "req.oceanNode.getP2PNode()" - // even if we do not need any P2P functionality at all (as all our handlers are "inside" P2P) - // All ends up here => "handleProtocolCommands()" or here => "handleDirectProtocolCommands()", where we do not have - // any access to main OceanNode, neither Provider or Indexer components - // probably the handlers should be on the OceanNode level, and if they need P2P connectivity we pass them the getP2PNode() - // (we kinda do it already on most handlers anyway) - - let response: P2PCommandResponse = null - // send to this peer (we might not need P2P connectivity) - if ( + const isLocalCommand = !hasP2PInterface || !req.body.node || - req.oceanNode.getP2PNode().isTargetPeerSelf(req.body.node) - ) { - // send to this node - response = await req.oceanNode.handleDirectProtocolCommand( - JSON.stringify(req.body), - sink + req.oceanNode.getP2PNode()?.isTargetPeerSelf(req.body.node) + + if (isLocalCommand) { + // Local command - call handler directly + const response = await req.oceanNode.handleDirectProtocolCommand( + JSON.stringify(req.body) ) - // UPDATED: we can just call the handler directly here, once we have them - // moving some of the logic from "handleProtocolCommands()" and "handleDirectProtocolCommands()" to the OceanNode - // These actions do not need P2P connections directly + + res.status(response.status.httpStatus) + if (response.status.headers) { + res.header(response.status.headers) + } + + const isBinaryContent = + response.status.headers?.['content-type'] + ?.toLowerCase() + .includes('application/octet-stream') || false + + if (response.stream) { + await streamToResponse(res, response.stream as Readable, isBinaryContent) + } else if (response.status.error) { + res.write(response.status.error) + } + + closedResponse = true + res.end() } else if (hasP2PInterface) { - // send to another peer (Only here we need P2P networking) - response = await req.oceanNode + // Remote command - use P2P sendTo + const response = await req.oceanNode .getP2PNode() - .sendTo( - req.body.node as string, - JSON.stringify(req.body), - sink, - req.body.multiAddrs - ) - } else { - response = { - stream: null, - status: { - httpStatus: 400, - error: 'Invalid or Non Existing P2P configuration' - } + .sendTo(req.body.node as string, JSON.stringify(req.body), req.body.multiAddrs) + + res.status(response.status.httpStatus) + if (response.status.headers) { + res.header(response.status.headers) } - } - // only if response was not already sent - if (response.stream == null && !closedResponse) { - try { - res.statusMessage = response.status.error - res.status(response.status.httpStatus).send(response.status.error) - closedResponse = true - res.end() - } catch (e) { - HTTP_LOGGER.error(e.message) + const isBinaryContent = + response.status.headers?.['content-type'] + ?.toLowerCase() + .includes('application/octet-stream') || false + + if (response.stream) { + await streamToResponse(res, response.stream as Readable, isBinaryContent) + } else if (response.status.error) { + res.write(response.status.error) } + + closedResponse = true + res.end() + } else { + res.status(400).send('Invalid or Non Existing P2P configuration') + closedResponse = true + res.end() } } catch (err) { HTTP_LOGGER.error(err.message) + res.status(500).send(err.message) } } ) diff --git a/src/utils/config/builder.ts b/src/utils/config/builder.ts index f606fec9e..aafd0482c 100644 --- a/src/utils/config/builder.ts +++ b/src/utils/config/builder.ts @@ -3,8 +3,8 @@ import type { C2DClusterInfo, C2DDockerConfig } from '../../@types/C2D/C2D.js' import type { RPCS } from '../../@types/blockchain.js' import type { FeeTokens } from '../../@types/Fees.js' import { C2DClusterType } from '../../@types/C2D/C2D.js' -import { keys } from '@libp2p/crypto' -import { createFromPrivKey } from '@libp2p/peer-id-factory' +import { privateKeyFromRaw } from '@libp2p/crypto/keys' +import { peerIdFromPrivateKey } from '@libp2p/peer-id' import { Wallet } from 'ethers' import fs from 'fs' import os from 'os' @@ -84,17 +84,13 @@ function preprocessConfigData(data: any): void { } } -export async function getPeerIdFromPrivateKey( - privateKey: string -): Promise { - const key = new keys.supportedKeys.secp256k1.Secp256k1PrivateKey( - hexStringToByteArray(privateKey.slice(2)) - ) +export function getPeerIdFromPrivateKey(privateKey: string): OceanNodeKeys { + const key = privateKeyFromRaw(hexStringToByteArray(privateKey.slice(2))) return { - peerId: await createFromPrivKey(key), - publicKey: key.public.bytes, - privateKey: (key as any)._key, + peerId: peerIdFromPrivateKey(key), + publicKey: key.publicKey.raw, + privateKey: key, ethAddress: new Wallet(privateKey.substring(2)).address } } @@ -212,7 +208,7 @@ export function loadConfigFromFile(configPath?: string): OceanNodeConfig { return config } -export async function buildMergedConfig(): Promise { +export function buildMergedConfig(): OceanNodeConfig { const baseConfig = loadConfigFromFile() const privateKey = process.env.PRIVATE_KEY if (!privateKey || privateKey.length !== 66) { @@ -225,7 +221,7 @@ export async function buildMergedConfig(): Promise { throw new Error('Invalid PRIVATE_KEY') } - const keys = await getPeerIdFromPrivateKey(privateKey) + const keys = getPeerIdFromPrivateKey(privateKey) const { env } = process const envOverrides: Record = { keys } @@ -283,7 +279,7 @@ export async function getConfiguration( isStartup: boolean = false ): Promise { if (!previousConfiguration || forceReload) { - previousConfiguration = await buildMergedConfig() + previousConfiguration = buildMergedConfig() } if (!previousConfiguration.codeHash) { diff --git a/src/utils/crypt.ts b/src/utils/crypt.ts index daa755b2f..8912bac05 100644 --- a/src/utils/crypt.ts +++ b/src/utils/crypt.ts @@ -19,11 +19,11 @@ export async function encrypt( // use first 16 bytes of public key as an initialisation vector const initVector = publicKey.subarray(0, 16) // creates cipher object, with the given algorithm, key and initialization vector - const cipher = crypto.createCipheriv('aes-256-cbc', privateKey, initVector) + const cipher = crypto.createCipheriv('aes-256-cbc', privateKey.raw, initVector) // encoding is ignored because we are working with bytes and want to return a buffer encryptedData = Buffer.concat([cipher.update(data), cipher.final()]) } else if (algorithm === EncryptMethod.ECIES) { - const sk = new eciesjs.PrivateKey(privateKey) + const sk = new eciesjs.PrivateKey(privateKey.raw) // get public key from Elliptic curve encryptedData = eciesjs.encrypt(sk.publicKey.toHex(), data) } @@ -47,12 +47,12 @@ export async function decrypt( const initVector = publicKey.subarray(0, 16) // creates decipher object, with the given algorithm, key and initialization vector - const decipher = crypto.createDecipheriv('aes-256-cbc', privateKey, initVector) + const decipher = crypto.createDecipheriv('aes-256-cbc', privateKey.raw, initVector) // encoding is ignored because we are working with bytes and want to return a buffer decryptedData = Buffer.concat([decipher.update(data), decipher.final()]) } else if (algorithm === EncryptMethod.ECIES) { - const sk = new eciesjs.PrivateKey(privateKey) + const sk = new eciesjs.PrivateKey(privateKey.raw) decryptedData = eciesjs.decrypt(sk.secret, data) } return decryptedData diff --git a/src/utils/util.ts b/src/utils/util.ts index a6c4b1339..16c73fb85 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -81,6 +81,14 @@ export function fetchEventFromTransaction( } } +export async function streamToUint8Array(stream: Readable): Promise { + const chunks: Buffer[] = [] + for await (const chunk of stream) { + chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk)) + } + return new Uint8Array(Buffer.concat(chunks)) +} + // Helper function to read from a stream export function readStream(stream: Stream): Promise { return new Promise((resolve, reject) => {