From b4b9fad7fa4fb4e0c0aa4ebb56d8b29ffb62fb0e Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Wed, 31 Jul 2024 17:11:26 +0300 Subject: [PATCH] remove mplex --- package-lock.json | 29 ----------------------------- package.json | 1 - src/components/P2P/index.ts | 3 +-- 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/package-lock.json b/package-lock.json index a3e5a0313..39badfff1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,6 @@ "@libp2p/interface-address-manager": "^3.0.1", "@libp2p/kad-dht": "^12.1.1", "@libp2p/mdns": "^10.1.1", - "@libp2p/mplex": "^10.1.1", "@libp2p/peer-id": "^4.1.4", "@libp2p/peer-id-factory": "^4.1.4", "@libp2p/ping": "^1.1.1", @@ -3088,34 +3087,6 @@ "multiformats": "^13.0.0" } }, - "node_modules/@libp2p/mplex": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/@libp2p/mplex/-/mplex-10.1.1.tgz", - "integrity": "sha512-W2s9rC9CvvrWHKnAnSY+MVAO989KTr73ZuEpzn4LKATTmWxDFVISWehZ5i5t7cBDlX4c7vlYYeY8tSI1VBSkDw==", - "dependencies": { - "@libp2p/interface": "^1.6.0", - "@libp2p/utils": "^5.4.5", - "it-pipe": "^3.0.1", - "it-pushable": "^3.2.3", - "it-stream-types": "^2.0.1", - "uint8-varint": "^2.0.4", - "uint8arraylist": "^2.4.8", - "uint8arrays": "^5.1.0" - } - }, - "node_modules/@libp2p/mplex/node_modules/multiformats": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.1.1.tgz", - "integrity": "sha512-JiptvwMmlxlzIlLLwhCi/srf/nk409UL0eUBr0kioRJq15hqqKyg68iftrBvhCRjR6Rw4fkNnSc4ZJXJDuta/Q==" - }, - "node_modules/@libp2p/mplex/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/multistream-select": { "version": "5.1.13", "resolved": "https://registry.npmjs.org/@libp2p/multistream-select/-/multistream-select-5.1.13.tgz", diff --git a/package.json b/package.json index cecdfa217..dc1f2008c 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ "@libp2p/interface-address-manager": "^3.0.1", "@libp2p/kad-dht": "^12.1.1", "@libp2p/mdns": "^10.1.1", - "@libp2p/mplex": "^10.1.1", "@libp2p/peer-id": "^4.1.4", "@libp2p/peer-id-factory": "^4.1.4", "@libp2p/ping": "^1.1.1", diff --git a/src/components/P2P/index.ts b/src/components/P2P/index.ts index 029c24f59..931bd9b1e 100644 --- a/src/components/P2P/index.ts +++ b/src/components/P2P/index.ts @@ -16,7 +16,6 @@ import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string' import { bootstrap } from '@libp2p/bootstrap' import { noise } from '@chainsafe/libp2p-noise' import { mdns } from '@libp2p/mdns' -import { mplex } from '@libp2p/mplex' import { yamux } from '@chainsafe/libp2p-yamux' import { peerIdFromString } from '@libp2p/peer-id' import { pipe } from 'it-pipe' @@ -322,7 +321,7 @@ export class OceanP2P extends EventEmitter { }, peerId: config.keys.peerId, transports, - streamMuxers: [yamux(), mplex()], + streamMuxers: [yamux()], connectionEncryption: [ noise() // plaintext()