From 3be6240bab83cf47242ce4fbdfaa922cd7e6e04c Mon Sep 17 00:00:00 2001 From: Isla Koenigsknecht Date: Mon, 23 Sep 2024 12:18:45 -0400 Subject: [PATCH] (Maybe) fix the ping issue and mild refactor for my sanity --- packages/backend/package-lock.json | 958 ++++++++---------- packages/backend/package.json | 5 +- .../connections-manager.service.ts | 3 +- .../backend/src/nest/libp2p/libp2p.service.ts | 34 +- .../backend/src/nest/libp2p/libp2p.types.ts | 3 +- .../backend/src/nest/libp2p/ping.service.ts | 126 +++ .../backend/src/nest/socket/socket.service.ts | 12 +- .../certificatesRequestsStore.ts | 2 +- .../certificates/certificates.store.ts | 2 +- .../src/nest/tor/tor-control.service.ts | 2 +- packages/backend/src/nest/tor/tor.service.ts | 4 +- packages/common/src/invitationCode.ts | 4 +- .../files/uploadFile/sendFileMessage.saga.ts | 2 +- 13 files changed, 593 insertions(+), 564 deletions(-) create mode 100644 packages/backend/src/nest/libp2p/ping.service.ts diff --git a/packages/backend/package-lock.json b/packages/backend/package-lock.json index 8b2d114b3b..0682c832da 100644 --- a/packages/backend/package-lock.json +++ b/packages/backend/package-lock.json @@ -12,17 +12,19 @@ "@chainsafe/libp2p-gossipsub": "13.2.0", "@chainsafe/libp2p-noise": "15.1.2", "@chainsafe/libp2p-yamux": "6.0.2", - "@helia/block-brokers": "2.0.2", + "@helia/block-brokers": "2.0.3", "@helia/unixfs": "3.0.1", "@ipld/dag-cbor": "^9.2.1", "@ipld/dag-pb": "^4.1.2", "@libp2p/crypto": "^3.0.4", + "@libp2p/echo": "^1.1.1", "@libp2p/identify": "^2.1.5", "@libp2p/interface": "^1.7.0", "@libp2p/kad-dht": "^12.1.5", "@libp2p/mplex": "^10.1.5", "@libp2p/peer-id": "^4.2.4", "@libp2p/peer-id-factory": "^4.2.4", + "@libp2p/ping": "1.1.6", "@libp2p/pnet": "1.0.0-3c8dd5bbf", "@libp2p/utils": "^5.4.9", "@libp2p/websockets": "^8.2.0", @@ -55,6 +57,7 @@ "https-proxy-agent": "^7.0.5", "image-size": "^1.0.1", "it-drain": "^3.0.7", + "it-pipe": "^3.0.1", "it-ws": "^6.1.5", "joi": "^17.8.1", "level": "^8.0.1", @@ -783,28 +786,6 @@ "npm": ">=7.0.0" } }, - "node_modules/@chainsafe/libp2p-gossipsub/node_modules/it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "dependencies": { - "it-pushable": "^3.2.3" - } - }, - "node_modules/@chainsafe/libp2p-gossipsub/node_modules/it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "dependencies": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@chainsafe/libp2p-gossipsub/node_modules/it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", @@ -1038,14 +1019,6 @@ "uint8arraylist": "^2.4.8" } }, - "node_modules/@chainsafe/libp2p-noise/node_modules/it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "dependencies": { - "it-pushable": "^3.2.3" - } - }, "node_modules/@chainsafe/libp2p-noise/node_modules/it-pair": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/it-pair/-/it-pair-2.0.6.tgz", @@ -1059,28 +1032,6 @@ "npm": ">=7.0.0" } }, - "node_modules/@chainsafe/libp2p-noise/node_modules/it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "dependencies": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@chainsafe/libp2p-noise/node_modules/it-pushable": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", - "integrity": "sha512-gzYnXYK8Y5t5b/BnJUr7glfQLO4U5vyb05gPx/TyTw+4Bv1zM9gFk4YsOrnulWefMewlphCjKkakFvj1y99Tcg==", - "dependencies": { - "p-defer": "^4.0.0" - } - }, "node_modules/@chainsafe/libp2p-noise/node_modules/it-queueless-pushable": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/it-queueless-pushable/-/it-queueless-pushable-1.0.0.tgz", @@ -1187,33 +1138,11 @@ "it-peekable": "^3.0.0" } }, - "node_modules/@chainsafe/libp2p-yamux/node_modules/it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "dependencies": { - "it-pushable": "^3.2.3" - } - }, "node_modules/@chainsafe/libp2p-yamux/node_modules/it-peekable": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "node_modules/@chainsafe/libp2p-yamux/node_modules/it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "dependencies": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@chainsafe/libp2p-yamux/node_modules/it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", @@ -1222,11 +1151,6 @@ "p-defer": "^4.0.0" } }, - "node_modules/@chainsafe/libp2p-yamux/node_modules/it-stream-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.2.tgz", - "integrity": "sha512-Rz/DEZ6Byn/r9+/SBCuJhpPATDF9D+dz5pbgSUyBsCDtza6wtNATrz/jz1gDyNanC3XdLboriHnOC925bZRBww==" - }, "node_modules/@chainsafe/libp2p-yamux/node_modules/uint8arraylist": { "version": "2.4.8", "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-2.4.8.tgz", @@ -1236,11 +1160,11 @@ } }, "node_modules/@helia/block-brokers": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@helia/block-brokers/-/block-brokers-2.0.2.tgz", - "integrity": "sha512-HfdOMF8eNmJq9wdoRTdX7FidgrjKk6yvvpu3FlCfIyY+ZCmJgCWEKYmn3GKmY8l82DlHzYwo1GYMOV4rdqREeA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@helia/block-brokers/-/block-brokers-2.0.3.tgz", + "integrity": "sha512-MlVlm7vWgQ/4Ga4/IVuKwhXIIHHQBr/+rfSxxPcO1Al30s+6SNSMDwwVKWY7tHNTOsnc9IC/bTURCwR/yBstrQ==", "dependencies": { - "@helia/interface": "^4.0.1", + "@helia/interface": "^4.1.0", "@libp2p/interface": "^1.1.4", "interface-blockstore": "^5.2.10", "ipfs-bitswap": "^20.0.2", @@ -1498,41 +1422,11 @@ "it-peekable": "^3.0.0" } }, - "node_modules/@helia/block-brokers/node_modules/it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "dependencies": { - "it-pushable": "^3.2.3" - } - }, "node_modules/@helia/block-brokers/node_modules/it-peekable": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "node_modules/@helia/block-brokers/node_modules/it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "dependencies": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@helia/block-brokers/node_modules/it-pushable": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", - "integrity": "sha512-gzYnXYK8Y5t5b/BnJUr7glfQLO4U5vyb05gPx/TyTw+4Bv1zM9gFk4YsOrnulWefMewlphCjKkakFvj1y99Tcg==", - "dependencies": { - "p-defer": "^4.0.0" - } - }, "node_modules/@helia/block-brokers/node_modules/it-reader": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/it-reader/-/it-reader-6.0.4.tgz", @@ -2058,14 +1952,6 @@ "it-peekable": "^3.0.0" } }, - "node_modules/@helia/unixfs/node_modules/it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "dependencies": { - "it-pushable": "^3.2.3" - } - }, "node_modules/@helia/unixfs/node_modules/it-parallel": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/it-parallel/-/it-parallel-3.0.8.tgz", @@ -2087,20 +1973,6 @@ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "node_modules/@helia/unixfs/node_modules/it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "dependencies": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@helia/unixfs/node_modules/it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", @@ -2109,11 +1981,6 @@ "p-defer": "^4.0.0" } }, - "node_modules/@helia/unixfs/node_modules/it-stream-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.2.tgz", - "integrity": "sha512-Rz/DEZ6Byn/r9+/SBCuJhpPATDF9D+dz5pbgSUyBsCDtza6wtNATrz/jz1gDyNanC3XdLboriHnOC925bZRBww==" - }, "node_modules/@helia/unixfs/node_modules/merge-options": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", @@ -2583,6 +2450,46 @@ "uint8arrays": "^5.0.1" } }, + "node_modules/@libp2p/echo": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@libp2p/echo/-/echo-1.1.5.tgz", + "integrity": "sha512-7iYH1AtbGLbTV6jpEdl1nt70fBR3078KRGCyZiqh4swIZGZnusa9bdA4xfB8uIZnSI1hcPPKyJAxrxBRPJkSdw==", + "dependencies": { + "@libp2p/interface": "^1.7.0", + "@libp2p/interface-internal": "^1.3.4", + "it-pipe": "^3.0.1" + } + }, + "node_modules/@libp2p/echo/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==", + "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/echo/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==", + "dependencies": { + "@libp2p/interface": "^1.7.0", + "@libp2p/peer-id": "^4.2.4", + "@libp2p/utils": "^5.4.9" + } + }, + "node_modules/@libp2p/echo/node_modules/uint8arraylist": { + "version": "2.4.8", + "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-2.4.8.tgz", + "integrity": "sha512-vc1PlGOzglLF0eae1M8mLRTBivsvrGsdmJ5RbK3e+QRvRLOZfZhQROTwH/OfyF3+ZVUg9/8hE8bmKP2CvP9quQ==", + "dependencies": { + "uint8arrays": "^5.0.1" + } + }, "node_modules/@libp2p/identify": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@libp2p/identify/-/identify-2.1.5.tgz", @@ -3079,20 +2986,6 @@ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "node_modules/@libp2p/kad-dht/node_modules/it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "dependencies": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@libp2p/kad-dht/node_modules/it-protobuf-stream": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/it-protobuf-stream/-/it-protobuf-stream-1.1.5.tgz", @@ -3239,28 +3132,6 @@ "uint8arrays": "^5.1.0" } }, - "node_modules/@libp2p/mplex/node_modules/it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "dependencies": { - "it-pushable": "^3.2.3" - } - }, - "node_modules/@libp2p/mplex/node_modules/it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "dependencies": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@libp2p/mplex/node_modules/it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", @@ -3407,6 +3278,140 @@ "uint8arrays": "^5.0.1" } }, + "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==", + "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", + "uint8arrays": "^5.1.0" + } + }, + "node_modules/@libp2p/ping/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==", + "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" + } + }, + "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==", + "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==", + "dependencies": { + "@libp2p/interface": "^1.7.0", + "@libp2p/peer-id": "^4.2.4", + "@libp2p/utils": "^5.4.9" + } + }, + "node_modules/@libp2p/ping/node_modules/@noble/curves": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", + "dependencies": { + "@noble/hashes": "1.5.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@libp2p/ping/node_modules/@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@libp2p/ping/node_modules/asn1js": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", + "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "dependencies": { + "pvtsutils": "^1.3.2", + "pvutils": "^1.1.3", + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@libp2p/ping/node_modules/it-first": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/it-first/-/it-first-3.0.6.tgz", + "integrity": "sha512-ExIewyK9kXKNAplg2GMeWfgjUcfC1FnUXz/RPfAvIXby+w7U4b3//5Lic0NV03gXT8O/isj5Nmp6KiY0d45pIQ==" + }, + "node_modules/@libp2p/ping/node_modules/protons-runtime": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-5.5.0.tgz", + "integrity": "sha512-EsALjF9QsrEk6gbCx3lmfHxVN0ah7nG3cY7GySD4xf4g8cr7g543zB88Foh897Sr1RQJ9yDCUsoT1i1H/cVUFA==", + "dependencies": { + "uint8-varint": "^2.0.2", + "uint8arraylist": "^2.4.3", + "uint8arrays": "^5.0.1" + } + }, + "node_modules/@libp2p/ping/node_modules/pvtsutils": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", + "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", + "dependencies": { + "tslib": "^2.6.1" + } + }, + "node_modules/@libp2p/ping/node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" + }, + "node_modules/@libp2p/ping/node_modules/uint8-varint": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-2.0.4.tgz", + "integrity": "sha512-FwpTa7ZGA/f/EssWAb5/YV6pHgVF1fViKdW8cWaEarjB8t7NyofSWBdOTyFPaGuUG4gx3v1O3PQ8etsiOs3lcw==", + "dependencies": { + "uint8arraylist": "^2.0.0", + "uint8arrays": "^5.0.0" + } + }, + "node_modules/@libp2p/ping/node_modules/uint8arraylist": { + "version": "2.4.8", + "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-2.4.8.tgz", + "integrity": "sha512-vc1PlGOzglLF0eae1M8mLRTBivsvrGsdmJ5RbK3e+QRvRLOZfZhQROTwH/OfyF3+ZVUg9/8hE8bmKP2CvP9quQ==", + "dependencies": { + "uint8arrays": "^5.0.1" + } + }, "node_modules/@libp2p/pnet": { "version": "1.0.0-3c8dd5bbf", "resolved": "https://registry.npmjs.org/@libp2p/pnet/-/pnet-1.0.0-3c8dd5bbf.tgz", @@ -3508,14 +3513,6 @@ "it-peekable": "^3.0.0" } }, - "node_modules/@libp2p/pnet/node_modules/it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "dependencies": { - "it-pushable": "^3.2.3" - } - }, "node_modules/@libp2p/pnet/node_modules/it-pair": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/it-pair/-/it-pair-2.0.6.tgz", @@ -3534,20 +3531,6 @@ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "node_modules/@libp2p/pnet/node_modules/it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "dependencies": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/@libp2p/pnet/node_modules/it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", @@ -8569,41 +8552,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "node_modules/@orbitdb/core/node_modules/it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "dependencies": { - "it-pushable": "^3.2.3" - } - }, - "node_modules/@orbitdb/core/node_modules/it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "dependencies": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/@orbitdb/core/node_modules/it-pushable": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", - "integrity": "sha512-gzYnXYK8Y5t5b/BnJUr7glfQLO4U5vyb05gPx/TyTw+4Bv1zM9gFk4YsOrnulWefMewlphCjKkakFvj1y99Tcg==", - "dependencies": { - "p-defer": "^4.0.0" - } - }, - "node_modules/@orbitdb/core/node_modules/it-stream-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.2.tgz", - "integrity": "sha512-Rz/DEZ6Byn/r9+/SBCuJhpPATDF9D+dz5pbgSUyBsCDtza6wtNATrz/jz1gDyNanC3XdLboriHnOC925bZRBww==" - }, "node_modules/@orbitdb/core/node_modules/lru": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/lru/-/lru-3.1.0.tgz", @@ -11581,20 +11529,6 @@ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "node_modules/datastore-level/node_modules/it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "dependencies": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/datastore-level/node_modules/it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", @@ -11611,11 +11545,6 @@ "it-all": "^3.0.0" } }, - "node_modules/datastore-level/node_modules/it-stream-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.2.tgz", - "integrity": "sha512-Rz/DEZ6Byn/r9+/SBCuJhpPATDF9D+dz5pbgSUyBsCDtza6wtNATrz/jz1gDyNanC3XdLboriHnOC925bZRBww==" - }, "node_modules/datastore-level/node_modules/it-take": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/it-take/-/it-take-3.0.6.tgz", @@ -15109,20 +15038,6 @@ "uint8arrays": "^5.1.0" } }, - "node_modules/helia/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==", - "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", - "uint8arrays": "^5.1.0" - } - }, "node_modules/helia/node_modules/@libp2p/tcp": { "version": "9.1.6", "resolved": "https://registry.npmjs.org/@libp2p/tcp/-/tcp-9.1.6.tgz", @@ -18481,20 +18396,6 @@ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "node_modules/helia/node_modules/it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "dependencies": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/helia/node_modules/it-protobuf-stream": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/it-protobuf-stream/-/it-protobuf-stream-1.1.5.tgz", @@ -22400,6 +22301,41 @@ "resolved": "https://registry.npmjs.org/it-drain/-/it-drain-3.0.7.tgz", "integrity": "sha512-vy6S1JKjjHSIFHgBpLpD1zhkCRl3z1zYWUxE14+kAYf+BL9ssWSFImJfhl361IIcwr0ofw8etzg11VqqB+ntUA==" }, + "node_modules/it-pipe": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", + "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", + "dependencies": { + "it-merge": "^3.0.0", + "it-pushable": "^3.1.2", + "it-stream-types": "^2.0.1" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/it-pipe/node_modules/it-merge": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", + "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", + "dependencies": { + "it-pushable": "^3.2.3" + } + }, + "node_modules/it-pipe/node_modules/it-pushable": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", + "integrity": "sha512-gzYnXYK8Y5t5b/BnJUr7glfQLO4U5vyb05gPx/TyTw+4Bv1zM9gFk4YsOrnulWefMewlphCjKkakFvj1y99Tcg==", + "dependencies": { + "p-defer": "^4.0.0" + } + }, + "node_modules/it-pipe/node_modules/it-stream-types": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.2.tgz", + "integrity": "sha512-Rz/DEZ6Byn/r9+/SBCuJhpPATDF9D+dz5pbgSUyBsCDtza6wtNATrz/jz1gDyNanC3XdLboriHnOC925bZRBww==" + }, "node_modules/it-ws": { "version": "6.1.5", "resolved": "https://registry.npmjs.org/it-ws/-/it-ws-6.1.5.tgz", @@ -26004,20 +25940,6 @@ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "node_modules/libp2p/node_modules/it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "dependencies": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - }, - "engines": { - "node": ">=16.0.0", - "npm": ">=7.0.0" - } - }, "node_modules/libp2p/node_modules/it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", @@ -30833,24 +30755,6 @@ "uint8arrays": "^5.0.1" } }, - "it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "requires": { - "it-pushable": "^3.2.3" - } - }, - "it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "requires": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - } - }, "it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", @@ -31044,14 +30948,6 @@ "uint8arraylist": "^2.4.8" } }, - "it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "requires": { - "it-pushable": "^3.2.3" - } - }, "it-pair": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/it-pair/-/it-pair-2.0.6.tgz", @@ -31061,24 +30957,6 @@ "p-defer": "^4.0.0" } }, - "it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "requires": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - } - }, - "it-pushable": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", - "integrity": "sha512-gzYnXYK8Y5t5b/BnJUr7glfQLO4U5vyb05gPx/TyTw+4Bv1zM9gFk4YsOrnulWefMewlphCjKkakFvj1y99Tcg==", - "requires": { - "p-defer": "^4.0.0" - } - }, "it-queueless-pushable": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/it-queueless-pushable/-/it-queueless-pushable-1.0.0.tgz", @@ -31179,29 +31057,11 @@ "it-peekable": "^3.0.0" } }, - "it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "requires": { - "it-pushable": "^3.2.3" - } - }, "it-peekable": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "requires": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - } - }, "it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", @@ -31210,11 +31070,6 @@ "p-defer": "^4.0.0" } }, - "it-stream-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.2.tgz", - "integrity": "sha512-Rz/DEZ6Byn/r9+/SBCuJhpPATDF9D+dz5pbgSUyBsCDtza6wtNATrz/jz1gDyNanC3XdLboriHnOC925bZRBww==" - }, "uint8arraylist": { "version": "2.4.8", "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-2.4.8.tgz", @@ -31226,11 +31081,11 @@ } }, "@helia/block-brokers": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@helia/block-brokers/-/block-brokers-2.0.2.tgz", - "integrity": "sha512-HfdOMF8eNmJq9wdoRTdX7FidgrjKk6yvvpu3FlCfIyY+ZCmJgCWEKYmn3GKmY8l82DlHzYwo1GYMOV4rdqREeA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@helia/block-brokers/-/block-brokers-2.0.3.tgz", + "integrity": "sha512-MlVlm7vWgQ/4Ga4/IVuKwhXIIHHQBr/+rfSxxPcO1Al30s+6SNSMDwwVKWY7tHNTOsnc9IC/bTURCwR/yBstrQ==", "requires": { - "@helia/interface": "^4.0.1", + "@helia/interface": "^4.1.0", "@libp2p/interface": "^1.1.4", "interface-blockstore": "^5.2.10", "ipfs-bitswap": "^20.0.2", @@ -31439,37 +31294,11 @@ "it-peekable": "^3.0.0" } }, - "it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "requires": { - "it-pushable": "^3.2.3" - } - }, "it-peekable": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "requires": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - } - }, - "it-pushable": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", - "integrity": "sha512-gzYnXYK8Y5t5b/BnJUr7glfQLO4U5vyb05gPx/TyTw+4Bv1zM9gFk4YsOrnulWefMewlphCjKkakFvj1y99Tcg==", - "requires": { - "p-defer": "^4.0.0" - } - }, "it-reader": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/it-reader/-/it-reader-6.0.4.tgz", @@ -31917,14 +31746,6 @@ "it-peekable": "^3.0.0" } }, - "it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "requires": { - "it-pushable": "^3.2.3" - } - }, "it-parallel": { "version": "3.0.8", "resolved": "https://registry.npmjs.org/it-parallel/-/it-parallel-3.0.8.tgz", @@ -31946,16 +31767,6 @@ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "requires": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - } - }, "it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", @@ -31964,11 +31775,6 @@ "p-defer": "^4.0.0" } }, - "it-stream-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.2.tgz", - "integrity": "sha512-Rz/DEZ6Byn/r9+/SBCuJhpPATDF9D+dz5pbgSUyBsCDtza6wtNATrz/jz1gDyNanC3XdLboriHnOC925bZRBww==" - }, "merge-options": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", @@ -32326,6 +32132,48 @@ } } }, + "@libp2p/echo": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@libp2p/echo/-/echo-1.1.5.tgz", + "integrity": "sha512-7iYH1AtbGLbTV6jpEdl1nt70fBR3078KRGCyZiqh4swIZGZnusa9bdA4xfB8uIZnSI1hcPPKyJAxrxBRPJkSdw==", + "requires": { + "@libp2p/interface": "^1.7.0", + "@libp2p/interface-internal": "^1.3.4", + "it-pipe": "^3.0.1" + }, + "dependencies": { + "@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==", + "requires": { + "@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" + } + }, + "@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==", + "requires": { + "@libp2p/interface": "^1.7.0", + "@libp2p/peer-id": "^4.2.4", + "@libp2p/utils": "^5.4.9" + } + }, + "uint8arraylist": { + "version": "2.4.8", + "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-2.4.8.tgz", + "integrity": "sha512-vc1PlGOzglLF0eae1M8mLRTBivsvrGsdmJ5RbK3e+QRvRLOZfZhQROTwH/OfyF3+ZVUg9/8hE8bmKP2CvP9quQ==", + "requires": { + "uint8arrays": "^5.0.1" + } + } + } + }, "@libp2p/identify": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@libp2p/identify/-/identify-2.1.5.tgz", @@ -32784,16 +32632,6 @@ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "requires": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - } - }, "it-protobuf-stream": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/it-protobuf-stream/-/it-protobuf-stream-1.1.5.tgz", @@ -32919,24 +32757,6 @@ "uint8arrays": "^5.1.0" }, "dependencies": { - "it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "requires": { - "it-pushable": "^3.2.3" - } - }, - "it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "requires": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - } - }, "it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", @@ -33072,6 +32892,127 @@ } } }, + "@libp2p/ping": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@libp2p/ping/-/ping-1.1.6.tgz", + "integrity": "sha512-tzTL0BzS1JaHE8v4PhRZ5K8wQQQcTMXM/0baCkLTLIaSMe1fzhj+KHbFNoUrY3yni4yfsVY1uR0qchhc1/J9qg==", + "requires": { + "@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", + "uint8arrays": "^5.1.0" + }, + "dependencies": { + "@libp2p/crypto": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-4.1.9.tgz", + "integrity": "sha512-8Cf2VKh0uC/rQLvTLSloIOMqUvf4jsSTHXgjWQRf47lDNJlNNI0wSv2S6gakT72GZsRV/jCjYwKPqRlsa5S0iA==", + "requires": { + "@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" + } + }, + "@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==", + "requires": { + "@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" + } + }, + "@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==", + "requires": { + "@libp2p/interface": "^1.7.0", + "@libp2p/peer-id": "^4.2.4", + "@libp2p/utils": "^5.4.9" + } + }, + "@noble/curves": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", + "requires": { + "@noble/hashes": "1.5.0" + } + }, + "@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==" + }, + "asn1js": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.5.tgz", + "integrity": "sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==", + "requires": { + "pvtsutils": "^1.3.2", + "pvutils": "^1.1.3", + "tslib": "^2.4.0" + } + }, + "it-first": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/it-first/-/it-first-3.0.6.tgz", + "integrity": "sha512-ExIewyK9kXKNAplg2GMeWfgjUcfC1FnUXz/RPfAvIXby+w7U4b3//5Lic0NV03gXT8O/isj5Nmp6KiY0d45pIQ==" + }, + "protons-runtime": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-5.5.0.tgz", + "integrity": "sha512-EsALjF9QsrEk6gbCx3lmfHxVN0ah7nG3cY7GySD4xf4g8cr7g543zB88Foh897Sr1RQJ9yDCUsoT1i1H/cVUFA==", + "requires": { + "uint8-varint": "^2.0.2", + "uint8arraylist": "^2.4.3", + "uint8arrays": "^5.0.1" + } + }, + "pvtsutils": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.5.tgz", + "integrity": "sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==", + "requires": { + "tslib": "^2.6.1" + } + }, + "tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==" + }, + "uint8-varint": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-2.0.4.tgz", + "integrity": "sha512-FwpTa7ZGA/f/EssWAb5/YV6pHgVF1fViKdW8cWaEarjB8t7NyofSWBdOTyFPaGuUG4gx3v1O3PQ8etsiOs3lcw==", + "requires": { + "uint8arraylist": "^2.0.0", + "uint8arrays": "^5.0.0" + } + }, + "uint8arraylist": { + "version": "2.4.8", + "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-2.4.8.tgz", + "integrity": "sha512-vc1PlGOzglLF0eae1M8mLRTBivsvrGsdmJ5RbK3e+QRvRLOZfZhQROTwH/OfyF3+ZVUg9/8hE8bmKP2CvP9quQ==", + "requires": { + "uint8arrays": "^5.0.1" + } + } + } + }, "@libp2p/pnet": { "version": "1.0.0-3c8dd5bbf", "resolved": "https://registry.npmjs.org/@libp2p/pnet/-/pnet-1.0.0-3c8dd5bbf.tgz", @@ -33158,14 +33099,6 @@ "it-peekable": "^3.0.0" } }, - "it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "requires": { - "it-pushable": "^3.2.3" - } - }, "it-pair": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/it-pair/-/it-pair-2.0.6.tgz", @@ -33180,16 +33113,6 @@ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "requires": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - } - }, "it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", @@ -36835,37 +36758,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "it-merge": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", - "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", - "requires": { - "it-pushable": "^3.2.3" - } - }, - "it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "requires": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - } - }, - "it-pushable": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", - "integrity": "sha512-gzYnXYK8Y5t5b/BnJUr7glfQLO4U5vyb05gPx/TyTw+4Bv1zM9gFk4YsOrnulWefMewlphCjKkakFvj1y99Tcg==", - "requires": { - "p-defer": "^4.0.0" - } - }, - "it-stream-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.2.tgz", - "integrity": "sha512-Rz/DEZ6Byn/r9+/SBCuJhpPATDF9D+dz5pbgSUyBsCDtza6wtNATrz/jz1gDyNanC3XdLboriHnOC925bZRBww==" - }, "lru": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/lru/-/lru-3.1.0.tgz", @@ -39273,16 +39165,6 @@ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "requires": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - } - }, "it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", @@ -39299,11 +39181,6 @@ "it-all": "^3.0.0" } }, - "it-stream-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.2.tgz", - "integrity": "sha512-Rz/DEZ6Byn/r9+/SBCuJhpPATDF9D+dz5pbgSUyBsCDtza6wtNATrz/jz1gDyNanC3XdLboriHnOC925bZRBww==" - }, "it-take": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/it-take/-/it-take-3.0.6.tgz", @@ -41864,20 +41741,6 @@ "uint8arrays": "^5.1.0" } }, - "@libp2p/ping": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@libp2p/ping/-/ping-1.1.6.tgz", - "integrity": "sha512-tzTL0BzS1JaHE8v4PhRZ5K8wQQQcTMXM/0baCkLTLIaSMe1fzhj+KHbFNoUrY3yni4yfsVY1uR0qchhc1/J9qg==", - "requires": { - "@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", - "uint8arrays": "^5.1.0" - } - }, "@libp2p/tcp": { "version": "9.1.6", "resolved": "https://registry.npmjs.org/@libp2p/tcp/-/tcp-9.1.6.tgz", @@ -44437,16 +44300,6 @@ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "requires": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - } - }, "it-protobuf-stream": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/it-protobuf-stream/-/it-protobuf-stream-1.1.5.tgz", @@ -47431,6 +47284,39 @@ "resolved": "https://registry.npmjs.org/it-drain/-/it-drain-3.0.7.tgz", "integrity": "sha512-vy6S1JKjjHSIFHgBpLpD1zhkCRl3z1zYWUxE14+kAYf+BL9ssWSFImJfhl361IIcwr0ofw8etzg11VqqB+ntUA==" }, + "it-pipe": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", + "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", + "requires": { + "it-merge": "^3.0.0", + "it-pushable": "^3.1.2", + "it-stream-types": "^2.0.1" + }, + "dependencies": { + "it-merge": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.5.tgz", + "integrity": "sha512-2l7+mPf85pyRF5pqi0dKcA54E5Jm/2FyY5GsOaN51Ta0ipC7YZ3szuAsH8wOoB6eKY4XsU4k2X+mzPmFBMayEA==", + "requires": { + "it-pushable": "^3.2.3" + } + }, + "it-pushable": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", + "integrity": "sha512-gzYnXYK8Y5t5b/BnJUr7glfQLO4U5vyb05gPx/TyTw+4Bv1zM9gFk4YsOrnulWefMewlphCjKkakFvj1y99Tcg==", + "requires": { + "p-defer": "^4.0.0" + } + }, + "it-stream-types": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.2.tgz", + "integrity": "sha512-Rz/DEZ6Byn/r9+/SBCuJhpPATDF9D+dz5pbgSUyBsCDtza6wtNATrz/jz1gDyNanC3XdLboriHnOC925bZRBww==" + } + } + }, "it-ws": { "version": "6.1.5", "resolved": "https://registry.npmjs.org/it-ws/-/it-ws-6.1.5.tgz", @@ -50121,16 +50007,6 @@ "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.5.tgz", "integrity": "sha512-JWQOGMt6rKiPcY30zUVMR4g6YxkpueTwHVE7CMs/aGqCf4OydM6w+7ZM3PvmO1e0TocjuR4aL8xyZWR46cTqCQ==" }, - "it-pipe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz", - "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==", - "requires": { - "it-merge": "^3.0.0", - "it-pushable": "^3.1.2", - "it-stream-types": "^2.0.1" - } - }, "it-pushable": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz", diff --git a/packages/backend/package.json b/packages/backend/package.json index 6b9bd40aab..4ca182f6f2 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -118,24 +118,27 @@ "get-port": "^5.1.1", "helia": "4.0.2", "@helia/unixfs": "3.0.1", - "@helia/block-brokers": "2.0.2", + "@helia/block-brokers": "2.0.3", "http-server": "^0.12.3", "https-proxy-agent": "^7.0.5", "image-size": "^1.0.1", "@ipld/dag-cbor": "^9.2.1", "@ipld/dag-pb": "^4.1.2", "it-drain": "^3.0.7", + "it-pipe": "^3.0.1", "it-ws": "^6.1.5", "joi": "^17.8.1", "level": "^8.0.1", "libp2p": "^1.7.0", "@libp2p/crypto": "^3.0.4", + "@libp2p/echo": "^1.1.1", "@libp2p/identify": "^2.1.5", "@libp2p/interface": "^1.7.0", "@libp2p/kad-dht": "^12.1.5", "@libp2p/mplex": "^10.1.5", "@libp2p/peer-id": "^4.2.4", "@libp2p/peer-id-factory": "^4.2.4", + "@libp2p/ping": "1.1.6", "@libp2p/pnet": "1.0.0-3c8dd5bbf", "@libp2p/utils": "^5.4.9", "@libp2p/websockets": "^8.2.0", diff --git a/packages/backend/src/nest/connections-manager/connections-manager.service.ts b/packages/backend/src/nest/connections-manager/connections-manager.service.ts index 9e24231df8..7b28dbe779 100644 --- a/packages/backend/src/nest/connections-manager/connections-manager.service.ts +++ b/packages/backend/src/nest/connections-manager/connections-manager.service.ts @@ -63,6 +63,7 @@ import { ServiceState, TorInitState } from './connections-manager.types' import { DateTime } from 'luxon' import { createLogger } from '../common/logger' import { createFromJSON } from '@libp2p/peer-id-factory' +import { PeerId } from '@libp2p/interface' @Injectable() export class ConnectionsManagerService extends EventEmitter implements OnModuleInit { @@ -599,7 +600,7 @@ export class ConnectionsManagerService extends EventEmitter implements OnModuleI const onionAddress = await this.spawnTorHiddenService(community.id, network) - const peerId = await createFromJSON(network.peerId) + const peerId: PeerId = await createFromJSON(network.peerId) const peers = community.peerList this.logger.info(`Launching community ${community.id}: payload peers: ${peers}`) diff --git a/packages/backend/src/nest/libp2p/libp2p.service.ts b/packages/backend/src/nest/libp2p/libp2p.service.ts index 06122a11f7..0992334569 100644 --- a/packages/backend/src/nest/libp2p/libp2p.service.ts +++ b/packages/backend/src/nest/libp2p/libp2p.service.ts @@ -1,30 +1,38 @@ import { gossipsub } from '@chainsafe/libp2p-gossipsub' import { noise } from '@chainsafe/libp2p-noise' -import { kadDHT } from '@libp2p/kad-dht' -import { mplex } from '@libp2p/mplex' import { yamux } from '@chainsafe/libp2p-yamux' -import { type Libp2p } from '@libp2p/interface' + +import { echo } from '@libp2p/echo' +import { identify, identifyPush } from '@libp2p/identify' +import { kadDHT } from '@libp2p/kad-dht' +import { CodeError, ERR_INVALID_MESSAGE, ERR_TIMEOUT, PeerId, type Libp2p } from '@libp2p/interface' import { preSharedKey } from '@libp2p/pnet' import { peerIdFromString } from '@libp2p/peer-id' -import { identify, identifyPush } from '@libp2p/identify' +import { ping } from '@libp2p/ping' +import * as filters from '@libp2p/websockets/filters' +import { createLibp2p } from 'libp2p' + import { multiaddr } from '@multiformats/multiaddr' import { Inject, Injectable } from '@nestjs/common' -import { createLibp2pAddress, createLibp2pListenAddress } from '@quiet/common' -import { ConnectionProcessInfo, type NetworkDataPayload, PeerId, SocketActionTypes, type UserData } from '@quiet/types' -import { getUsersAddresses } from '../common/utils' + import crypto from 'crypto' import { EventEmitter } from 'events' import { Agent } from 'https' -import { createLibp2p } from 'libp2p' import { DateTime } from 'luxon' import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' import { toString as uint8ArrayToString } from 'uint8arrays/to-string' +import { pipe } from 'it-pipe' + +import { createLibp2pAddress, createLibp2pListenAddress } from '@quiet/common' +import { ConnectionProcessInfo, type NetworkDataPayload, SocketActionTypes, type UserData } from '@quiet/types' + +import { getUsersAddresses } from '../common/utils' import { SERVER_IO_PROVIDER, SOCKS_PROXY_AGENT } from '../const' import { ServerIoProviderTypes } from '../types' import { webSockets } from '../websocketOverTor' import { Libp2pConnectedPeer, Libp2pEvents, Libp2pNodeParams } from './libp2p.types' import { createLogger } from '../common/logger' -import * as filters from '@libp2p/websockets/filters' +import { bitswap } from '@helia/block-brokers' const KEY_LENGTH = 32 export const LIBP2P_PSK_METADATA = '/key/swarm/psk/1.0.0/\n/base16/\n' @@ -215,6 +223,10 @@ export class Libp2pService extends EventEmitter { }, peerId: params.peerId, addresses: { listen: params.listenAddresses }, + connectionMonitor: { + abortConnectionOnPingFailure: false, + pingInterval: 60_000, + }, connectionProtector: preSharedKey({ psk: params.psk }), streamMuxers: [yamux()], connectionEncryption: [noise()], @@ -232,10 +244,12 @@ export class Libp2pService extends EventEmitter { dht: kadDHT({ allowQueryWithZeroPeers: true, }), + echo: echo(), pubsub: gossipsub({ // neccessary to run a single peer allowPublishToZeroTopicPeers: true, fallbackToFloodsub: true, + // emitSelf: false, doPX: true, }), identify: identify(), @@ -243,7 +257,7 @@ export class Libp2pService extends EventEmitter { }, }) } catch (err) { - this.logger.error('Create libp2p:', err) + this.logger.error('Error while creating instance of libp2p', err) throw err } this.libp2pInstance = libp2p diff --git a/packages/backend/src/nest/libp2p/libp2p.types.ts b/packages/backend/src/nest/libp2p/libp2p.types.ts index 72f5c55293..f13f3927f8 100644 --- a/packages/backend/src/nest/libp2p/libp2p.types.ts +++ b/packages/backend/src/nest/libp2p/libp2p.types.ts @@ -1,3 +1,4 @@ +import { PeerId } from '@libp2p/interface' import { Agent } from 'http' export enum Libp2pEvents { @@ -7,7 +8,7 @@ export enum Libp2pEvents { } export interface Libp2pNodeParams { - peerId: any + peerId: PeerId listenAddresses: string[] agent: Agent localAddress: string diff --git a/packages/backend/src/nest/libp2p/ping.service.ts b/packages/backend/src/nest/libp2p/ping.service.ts new file mode 100644 index 0000000000..60728f103d --- /dev/null +++ b/packages/backend/src/nest/libp2p/ping.service.ts @@ -0,0 +1,126 @@ +// import { randomBytes } from '@libp2p/crypto'; +// import { CodeError, ERR_INVALID_MESSAGE, ERR_TIMEOUT } from '@libp2p/interface'; +// import first from 'it-first'; +// import { pipe } from 'it-pipe'; +// import { Components } from 'libp2p/dist/src/components.js'; +// import { equals as uint8ArrayEquals } from 'uint8arrays/equals'; +// import { PROTOCOL_PREFIX, PROTOCOL_NAME, PING_LENGTH, PROTOCOL_VERSION, TIMEOUT, MAX_INBOUND_STREAMS, MAX_OUTBOUND_STREAMS, ERR_WRONG_PING_ACK } from './constants.js'; +// export class PingService { +// protocol; +// components; +// started; +// timeout; +// maxInboundStreams; +// maxOutboundStreams; +// runOnTransientConnection; +// log; +// constructor(components: Components, init = {}) { +// this.components = components; +// this.log = components.logger.forComponent('libp2p:ping'); +// this.started = false; +// this.protocol = `/${init.protocolPrefix ?? PROTOCOL_PREFIX}/${PROTOCOL_NAME}/${PROTOCOL_VERSION}`; +// this.timeout = init.timeout ?? TIMEOUT; +// this.maxInboundStreams = init.maxInboundStreams ?? MAX_INBOUND_STREAMS; +// this.maxOutboundStreams = init.maxOutboundStreams ?? MAX_OUTBOUND_STREAMS; +// this.runOnTransientConnection = init.runOnTransientConnection ?? true; +// this.handleMessage = this.handleMessage.bind(this); +// } +// [Symbol.toStringTag] = '@libp2p/ping'; +// async start() { +// await this.components.registrar.handle(this.protocol, this.handleMessage, { +// maxInboundStreams: this.maxInboundStreams, +// maxOutboundStreams: this.maxOutboundStreams, +// runOnTransientConnection: this.runOnTransientConnection +// }); +// this.started = true; +// } +// async stop() { +// await this.components.registrar.unhandle(this.protocol); +// this.started = false; +// } +// isStarted() { +// return this.started; +// } +// /** +// * A handler to register with Libp2p to process ping messages +// */ +// handleMessage(data) { +// this.log('incoming ping from %p', data.connection.remotePeer); +// const { stream } = data; +// const start = Date.now(); +// const signal = AbortSignal.timeout(this.timeout); +// signal.addEventListener('abort', () => { +// stream?.abort(new CodeError('ping timeout', ERR_TIMEOUT)); +// }); +// void pipe(stream, async function* (source) { +// let received = 0; +// for await (const buf of source) { +// received += buf.byteLength; +// if (received > PING_LENGTH) { +// stream?.abort(new CodeError('Too much data received', ERR_INVALID_MESSAGE)); +// return; +// } +// yield buf; +// } +// }, stream) +// .catch(err => { +// this.log.error('incoming ping from %p failed with error', data.connection.remotePeer, err); +// stream?.abort(err); +// }) +// .finally(() => { +// const ms = Date.now() - start; +// this.log('incoming ping from %p complete in %dms', data.connection.remotePeer, ms); +// }); +// } +// /** +// * Ping a given peer and wait for its response, getting the operation latency. +// */ +// async ping(peer, options = {}) { +// this.log('pinging %p', peer); +// const start = Date.now(); +// const data = randomBytes(PING_LENGTH); +// const connection = await this.components.connectionManager.openConnection(peer, options); +// let stream; +// let onAbort = () => { }; +// if (options.signal == null) { +// const signal = AbortSignal.timeout(this.timeout); +// options = { +// ...options, +// signal +// }; +// } +// try { +// stream = await connection.newStream(this.protocol, { +// ...options, +// runOnTransientConnection: this.runOnTransientConnection +// }); +// onAbort = () => { +// stream?.abort(new CodeError('ping timeout', ERR_TIMEOUT)); +// }; +// // make stream abortable +// options.signal?.addEventListener('abort', onAbort, { once: true }); +// const result = await pipe([data], stream, async (source) => first(source)); +// const ms = Date.now() - start; +// if (result == null) { +// throw new CodeError(`Did not receive a ping ack after ${ms}ms`, ERR_WRONG_PING_ACK); +// } +// if (!uint8ArrayEquals(data, result.subarray())) { +// throw new CodeError(`Received wrong ping ack after ${ms}ms`, ERR_WRONG_PING_ACK); +// } +// this.log('ping %p complete in %dms', connection.remotePeer, ms); +// return ms; +// } +// catch (err) { +// this.log.error('error while pinging %p', connection.remotePeer, err); +// stream?.abort(err); +// throw err; +// } +// finally { +// options.signal?.removeEventListener('abort', onAbort); +// if (stream != null) { +// await stream.close(); +// } +// } +// } +// } +// //# sourceMappingURL=ping.js.map diff --git a/packages/backend/src/nest/socket/socket.service.ts b/packages/backend/src/nest/socket/socket.service.ts index e1c61e5df8..72a3ab235d 100644 --- a/packages/backend/src/nest/socket/socket.service.ts +++ b/packages/backend/src/nest/socket/socket.service.ts @@ -216,7 +216,10 @@ export class SocketService extends EventEmitter implements OnModuleInit { public getConnections = (): Promise => { return new Promise(resolve => { this.serverIoProvider.server.getConnections((err, count) => { - if (err) throw new Error(err.message) + if (err) { + this.logger.error(`Error occurred while getting connection`, err) + throw new Error(`Error occurred while getting connection: ${err.message}`) + } resolve(count) }) }) @@ -267,7 +270,12 @@ export class SocketService extends EventEmitter implements OnModuleInit { } this.serverIoProvider.io.close(err => { - if (err) throw new Error(err.message) + if (err) { + this.logger.error(`Error occurred while closing data server on port ${this.configOptions.socketIOPort}`, err) + throw new Error( + `Error occurred while closing data server on port ${this.configOptions.socketIOPort}: ${err.message}` + ) + } this.logger.info('Data server closed') resolve() }) diff --git a/packages/backend/src/nest/storage/certifacteRequests/certificatesRequestsStore.ts b/packages/backend/src/nest/storage/certifacteRequests/certificatesRequestsStore.ts index f066e10edf..68a99ed216 100644 --- a/packages/backend/src/nest/storage/certifacteRequests/certificatesRequestsStore.ts +++ b/packages/backend/src/nest/storage/certifacteRequests/certificatesRequestsStore.ts @@ -64,7 +64,7 @@ export class CertificatesRequestsStore extends EventStoreBase { await parsedCsr.verify() await this.validateCsrFormat(csr) } catch (err) { - this.logger.error('Failed to validate user CSR:', csr, err?.message) + this.logger.error('Failed to validate user CSR:', csr, err) return false } return true diff --git a/packages/backend/src/nest/storage/certificates/certificates.store.ts b/packages/backend/src/nest/storage/certificates/certificates.store.ts index e7feee2388..6f779bee92 100644 --- a/packages/backend/src/nest/storage/certificates/certificates.store.ts +++ b/packages/backend/src/nest/storage/certificates/certificates.store.ts @@ -90,7 +90,7 @@ export class CertificatesStore extends EventStoreBase { await this.validateCertificateAuthority(certificate) await this.validateCertificateFormat(certificate) } catch (err) { - this.logger.error('Failed to validate user certificate:', certificate, err?.message) + this.logger.error('Failed to validate user certificate:', certificate, err) return false } return true diff --git a/packages/backend/src/nest/tor/tor-control.service.ts b/packages/backend/src/nest/tor/tor-control.service.ts index a5a7cdb084..3afb0298ba 100644 --- a/packages/backend/src/nest/tor/tor-control.service.ts +++ b/packages/backend/src/nest/tor/tor-control.service.ts @@ -38,7 +38,7 @@ export class TorControl { this.connection.once('error', err => { this.disconnect() - reject(new Error(`Connection via Tor control failed: ${err.message}`)) + reject(new Error(`Connection via Tor control failed: ${err}`)) }) this.connection.once('data', (data: any) => { diff --git a/packages/backend/src/nest/tor/tor.service.ts b/packages/backend/src/nest/tor/tor.service.ts index 63e679d503..971afff48c 100644 --- a/packages/backend/src/nest/tor/tor.service.ts +++ b/packages/backend/src/nest/tor/tor.service.ts @@ -196,7 +196,7 @@ export class Tor extends EventEmitter implements OnModuleInit { try { process.kill(Number(id.trim())) } catch (e) { - this.logger.error(`Tried killing hanging tor process with id ${id}. Failed. Reason: ${e.message}`) + this.logger.error(`Tried killing hanging tor process with id ${id}. Failed`, e) } } } @@ -273,7 +273,7 @@ export class Tor extends EventEmitter implements OnModuleInit { }) this.process.on('error', err => { - this.logger.error(`Tor process. Error occurred: ${err.message}`) + this.logger.error(`Tor process. Error occurred`, err) }) this.process.stdout.on('data', (data: any) => { diff --git a/packages/common/src/invitationCode.ts b/packages/common/src/invitationCode.ts index fece23d08e..d22af5e490 100644 --- a/packages/common/src/invitationCode.ts +++ b/packages/common/src/invitationCode.ts @@ -85,7 +85,7 @@ const parseDeepUrl = ({ url, expectedProtocol = `${DEEP_URL_SCHEME}:` }: ParseDe try { validUrl = new URL(_url) } catch (e) { - logger.error(`Could not retrieve invitation code from deep url '${url}'. Reason: ${e.message}`) + logger.error(`Could not retrieve invitation code from deep url '${url}'`, e) throw e } if (!validUrl || validUrl.protocol !== expectedProtocol) { @@ -277,7 +277,7 @@ const isParamValid = (param: string, value: string) => { try { new URL(value) } catch (e) { - logger.error(e.message) + logger.error(`Error while URL encoding ${value}`, e) return false } return true diff --git a/packages/state-manager/src/sagas/files/uploadFile/sendFileMessage.saga.ts b/packages/state-manager/src/sagas/files/uploadFile/sendFileMessage.saga.ts index 957a60d8a0..c1ef577338 100644 --- a/packages/state-manager/src/sagas/files/uploadFile/sendFileMessage.saga.ts +++ b/packages/state-manager/src/sagas/files/uploadFile/sendFileMessage.saga.ts @@ -26,7 +26,7 @@ export function* sendFileMessageSaga( filePath = decodeURIComponent(filePath.startsWith(fileProtocol) ? filePath.slice(fileProtocol.length) : filePath) tmpPath = tmpPath ? decodeURIComponent(tmpPath.slice(fileProtocol.length)) : undefined } catch (e) { - logger.error(`Can't send file with path ${filePath}, Details: ${e.message}`) + logger.error(`Can't send file with path ${filePath}`, e) return }