diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1368672..0cf607e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Setup node 14 + - name: Setup node 16 uses: actions/setup-node@v1 with: - node-version: 14.x + node-version: 16.x - run: yarn install --frozen-lockfile - run: yarn build - run: DEBUG=communities:test* yarn test diff --git a/.yarn/cache/@chainsafe-libp2p-noise-npm-4.1.1-aae996d59d-97f3d4fe97.zip b/.yarn/cache/@chainsafe-libp2p-noise-npm-4.1.1-aae996d59d-97f3d4fe97.zip deleted file mode 100644 index fbf8db1f..00000000 Binary files a/.yarn/cache/@chainsafe-libp2p-noise-npm-4.1.1-aae996d59d-97f3d4fe97.zip and /dev/null differ diff --git a/.yarn/cache/@chainsafe-libp2p-noise-npm-5.0.2-0c7cce3163-9e462469eb.zip b/.yarn/cache/@chainsafe-libp2p-noise-npm-5.0.2-0c7cce3163-9e462469eb.zip new file mode 100644 index 00000000..800d4316 Binary files /dev/null and b/.yarn/cache/@chainsafe-libp2p-noise-npm-5.0.2-0c7cce3163-9e462469eb.zip differ diff --git a/.yarn/cache/@leichtgewicht-ip-codec-npm-2.0.3-536ebba640-5b6bee0481.zip b/.yarn/cache/@leichtgewicht-ip-codec-npm-2.0.3-536ebba640-5b6bee0481.zip new file mode 100644 index 00000000..6087e048 Binary files /dev/null and b/.yarn/cache/@leichtgewicht-ip-codec-npm-2.0.3-536ebba640-5b6bee0481.zip differ diff --git a/.yarn/cache/@multiformats-base-x-npm-4.0.1-a1a1c51d61-ecbf84bdd7.zip b/.yarn/cache/@multiformats-base-x-npm-4.0.1-a1a1c51d61-ecbf84bdd7.zip new file mode 100644 index 00000000..1189c191 Binary files /dev/null and b/.yarn/cache/@multiformats-base-x-npm-4.0.1-a1a1c51d61-ecbf84bdd7.zip differ diff --git a/.yarn/cache/@noble-ed25519-npm-1.5.3-a710a3d7ae-4aedb37f6c.zip b/.yarn/cache/@noble-ed25519-npm-1.5.3-a710a3d7ae-4aedb37f6c.zip new file mode 100644 index 00000000..d4ededa3 Binary files /dev/null and b/.yarn/cache/@noble-ed25519-npm-1.5.3-a710a3d7ae-4aedb37f6c.zip differ diff --git a/.yarn/cache/@noble-secp256k1-npm-1.5.2-61830d28b7-9514a9bb08.zip b/.yarn/cache/@noble-secp256k1-npm-1.5.2-61830d28b7-9514a9bb08.zip new file mode 100644 index 00000000..39955c7e Binary files /dev/null and b/.yarn/cache/@noble-secp256k1-npm-1.5.2-61830d28b7-9514a9bb08.zip differ diff --git a/.yarn/cache/@types-dns-packet-npm-5.2.4-44f2da8ae2-45a725a0a6.zip b/.yarn/cache/@types-dns-packet-npm-5.2.4-44f2da8ae2-45a725a0a6.zip new file mode 100644 index 00000000..fb01c165 Binary files /dev/null and b/.yarn/cache/@types-dns-packet-npm-5.2.4-44f2da8ae2-45a725a0a6.zip differ diff --git a/.yarn/cache/base64url-npm-3.0.1-4c171c4917-a77b2a3a52.zip b/.yarn/cache/base64url-npm-3.0.1-4c171c4917-a77b2a3a52.zip new file mode 100644 index 00000000..a4027ba8 Binary files /dev/null and b/.yarn/cache/base64url-npm-3.0.1-4c171c4917-a77b2a3a52.zip differ diff --git a/.yarn/cache/bigint-buffer-npm-1.1.5-785f4ccd92-d010c9f577.zip b/.yarn/cache/bigint-buffer-npm-1.1.5-785f4ccd92-d010c9f577.zip new file mode 100644 index 00000000..2f57ac7e Binary files /dev/null and b/.yarn/cache/bigint-buffer-npm-1.1.5-785f4ccd92-d010c9f577.zip differ diff --git a/.yarn/cache/dns-packet-npm-5.3.1-8f9567465f-196ff74a06.zip b/.yarn/cache/dns-packet-npm-5.3.1-8f9567465f-196ff74a06.zip new file mode 100644 index 00000000..7dc9d5f1 Binary files /dev/null and b/.yarn/cache/dns-packet-npm-5.3.1-8f9567465f-196ff74a06.zip differ diff --git a/.yarn/cache/dns-query-npm-0.8.0-205751fd8c-d93421c4cb.zip b/.yarn/cache/dns-query-npm-0.8.0-205751fd8c-d93421c4cb.zip new file mode 100644 index 00000000..74942018 Binary files /dev/null and b/.yarn/cache/dns-query-npm-0.8.0-205751fd8c-d93421c4cb.zip differ diff --git a/.yarn/cache/dns-socket-npm-4.2.2-2d13a1bfa6-d02b83ecc9.zip b/.yarn/cache/dns-socket-npm-4.2.2-2d13a1bfa6-d02b83ecc9.zip new file mode 100644 index 00000000..0dcf6b4a Binary files /dev/null and b/.yarn/cache/dns-socket-npm-4.2.2-2d13a1bfa6-d02b83ecc9.zip differ diff --git a/.yarn/cache/hi-base32-npm-0.5.1-75ccb27ef3-6655682b57.zip b/.yarn/cache/hi-base32-npm-0.5.1-75ccb27ef3-6655682b57.zip new file mode 100644 index 00000000..4dd62583 Binary files /dev/null and b/.yarn/cache/hi-base32-npm-0.5.1-75ccb27ef3-6655682b57.zip differ diff --git a/.yarn/cache/is-buffer-npm-2.0.5-17e563f277-764c9ad8b5.zip b/.yarn/cache/is-buffer-npm-2.0.5-17e563f277-764c9ad8b5.zip deleted file mode 100644 index 313ef275..00000000 Binary files a/.yarn/cache/is-buffer-npm-2.0.5-17e563f277-764c9ad8b5.zip and /dev/null differ diff --git a/.yarn/cache/it-pb-rpc-npm-0.1.11-67aa0d8ea3-c08f6fdd93.zip b/.yarn/cache/it-pb-rpc-npm-0.1.11-67aa0d8ea3-c08f6fdd93.zip deleted file mode 100644 index ef8377f3..00000000 Binary files a/.yarn/cache/it-pb-rpc-npm-0.1.11-67aa0d8ea3-c08f6fdd93.zip and /dev/null differ diff --git a/.yarn/cache/it-pb-rpc-npm-0.2.0-472ee3e2ec-c6b93eda2f.zip b/.yarn/cache/it-pb-rpc-npm-0.2.0-472ee3e2ec-c6b93eda2f.zip new file mode 100644 index 00000000..57ea1bd6 Binary files /dev/null and b/.yarn/cache/it-pb-rpc-npm-0.2.0-472ee3e2ec-c6b93eda2f.zip differ diff --git a/.yarn/cache/js-waku-npm-0.14.2-5d0743578f-afccd3327e.zip b/.yarn/cache/js-waku-npm-0.14.2-5d0743578f-afccd3327e.zip deleted file mode 100644 index 8584d278..00000000 Binary files a/.yarn/cache/js-waku-npm-0.14.2-5d0743578f-afccd3327e.zip and /dev/null differ diff --git a/.yarn/cache/js-waku-npm-0.16.0-e17cea8128-6bb6117399.zip b/.yarn/cache/js-waku-npm-0.16.0-e17cea8128-6bb6117399.zip new file mode 100644 index 00000000..8f88d964 Binary files /dev/null and b/.yarn/cache/js-waku-npm-0.16.0-e17cea8128-6bb6117399.zip differ diff --git a/.yarn/cache/libp2p-bootstrap-npm-0.13.0-4fd26b5457-d30d8800f7.zip b/.yarn/cache/libp2p-bootstrap-npm-0.13.0-4fd26b5457-d30d8800f7.zip deleted file mode 100644 index 030c3a4e..00000000 Binary files a/.yarn/cache/libp2p-bootstrap-npm-0.13.0-4fd26b5457-d30d8800f7.zip and /dev/null differ diff --git a/.yarn/cache/libp2p-bootstrap-npm-0.14.0-f03abc6795-54c42c087d.zip b/.yarn/cache/libp2p-bootstrap-npm-0.14.0-f03abc6795-54c42c087d.zip new file mode 100644 index 00000000..3f3fa2ca Binary files /dev/null and b/.yarn/cache/libp2p-bootstrap-npm-0.14.0-f03abc6795-54c42c087d.zip differ diff --git a/.yarn/cache/libp2p-crypto-npm-0.21.2-451a19028a-e03f8398db.zip b/.yarn/cache/libp2p-crypto-npm-0.21.2-451a19028a-e03f8398db.zip new file mode 100644 index 00000000..d96a3267 Binary files /dev/null and b/.yarn/cache/libp2p-crypto-npm-0.21.2-451a19028a-e03f8398db.zip differ diff --git a/.yarn/cache/libp2p-gossipsub-npm-0.11.4-8adacba0bc-285cd300cd.zip b/.yarn/cache/libp2p-gossipsub-npm-0.11.4-8adacba0bc-285cd300cd.zip deleted file mode 100644 index 27a45d07..00000000 Binary files a/.yarn/cache/libp2p-gossipsub-npm-0.11.4-8adacba0bc-285cd300cd.zip and /dev/null differ diff --git a/.yarn/cache/libp2p-gossipsub-npm-0.12.3-682c2eb3f7-e73f7a75d2.zip b/.yarn/cache/libp2p-gossipsub-npm-0.12.3-682c2eb3f7-e73f7a75d2.zip new file mode 100644 index 00000000..d4652baa Binary files /dev/null and b/.yarn/cache/libp2p-gossipsub-npm-0.12.3-682c2eb3f7-e73f7a75d2.zip differ diff --git a/.yarn/cache/libp2p-interfaces-npm-1.1.1-59a6b1d61b-2cac9dd5c2.zip b/.yarn/cache/libp2p-interfaces-npm-2.0.9-210d88df91-68f20f433f.zip similarity index 96% rename from .yarn/cache/libp2p-interfaces-npm-1.1.1-59a6b1d61b-2cac9dd5c2.zip rename to .yarn/cache/libp2p-interfaces-npm-2.0.9-210d88df91-68f20f433f.zip index 3fcf5144..5bf93f58 100644 Binary files a/.yarn/cache/libp2p-interfaces-npm-1.1.1-59a6b1d61b-2cac9dd5c2.zip and b/.yarn/cache/libp2p-interfaces-npm-2.0.9-210d88df91-68f20f433f.zip differ diff --git a/.yarn/cache/multibase-npm-4.0.6-e38a920e01-891ce47f50.zip b/.yarn/cache/multibase-npm-4.0.6-e38a920e01-891ce47f50.zip new file mode 100644 index 00000000..3e53ffba Binary files /dev/null and b/.yarn/cache/multibase-npm-4.0.6-e38a920e01-891ce47f50.zip differ diff --git a/.yarn/cache/multihashes-npm-4.0.3-66c3bf1aca-57c978aa53.zip b/.yarn/cache/multihashes-npm-4.0.3-66c3bf1aca-57c978aa53.zip new file mode 100644 index 00000000..e1baa44a Binary files /dev/null and b/.yarn/cache/multihashes-npm-4.0.3-66c3bf1aca-57c978aa53.zip differ diff --git a/.yarn/cache/node-forge-npm-1.2.1-d6686e8063-af4f88c3f6.zip b/.yarn/cache/node-forge-npm-1.2.1-d6686e8063-af4f88c3f6.zip new file mode 100644 index 00000000..94832403 Binary files /dev/null and b/.yarn/cache/node-forge-npm-1.2.1-d6686e8063-af4f88c3f6.zip differ diff --git a/.yarn/cache/peer-id-npm-0.16.0-86c8153548-35dfb887c6.zip b/.yarn/cache/peer-id-npm-0.16.0-86c8153548-35dfb887c6.zip new file mode 100644 index 00000000..80b36fa5 Binary files /dev/null and b/.yarn/cache/peer-id-npm-0.16.0-86c8153548-35dfb887c6.zip differ diff --git a/.yarn/cache/rlp-npm-2.2.7-4cb283b8fe-3db4dfe5c7.zip b/.yarn/cache/rlp-npm-2.2.7-4cb283b8fe-3db4dfe5c7.zip new file mode 100644 index 00000000..fd5be7d5 Binary files /dev/null and b/.yarn/cache/rlp-npm-2.2.7-4cb283b8fe-3db4dfe5c7.zip differ diff --git a/.yarn/cache/varint-npm-5.0.2-fcb43e79c5-e1a66bf9a6.zip b/.yarn/cache/varint-npm-5.0.2-fcb43e79c5-e1a66bf9a6.zip new file mode 100644 index 00000000..df72d840 Binary files /dev/null and b/.yarn/cache/varint-npm-5.0.2-fcb43e79c5-e1a66bf9a6.zip differ diff --git a/packages/react-chat-example/webpack.config.js b/packages/react-chat-example/webpack.config.js index 7a439987..4500adf3 100644 --- a/packages/react-chat-example/webpack.config.js +++ b/packages/react-chat-example/webpack.config.js @@ -36,7 +36,7 @@ module.exports = env => { exclude: /node_modules/, options: { loader: 'tsx', - target: 'es2018', + target: 'es2020', }, }, { @@ -58,7 +58,7 @@ module.exports = env => { optimization: { minimizer: [ new ESBuildMinifyPlugin({ - target: 'es2018', + target: 'es2020', }), ], }, diff --git a/packages/react-chat/package.json b/packages/react-chat/package.json index 128e7e4c..e27257e0 100644 --- a/packages/react-chat/package.json +++ b/packages/react-chat/package.json @@ -53,6 +53,7 @@ "emoji-mart": "^3.0.1", "html-entities": "^2.3.2", "js-sha3": "^0.8.0", + "js-waku": "^0.16.0", "react": "^17.0.2", "react-dom": "^17.0.2", "react-is": "^17.0.2", diff --git a/packages/react-chat/src/utils/createMessenger.ts b/packages/react-chat/src/utils/createMessenger.ts index ca8c1aac..53771707 100644 --- a/packages/react-chat/src/utils/createMessenger.ts +++ b/packages/react-chat/src/utils/createMessenger.ts @@ -1,14 +1,17 @@ import { Identity, Messenger } from "@waku/status-communities/dist/cjs"; -import { getBootstrapNodes, StoreCodec } from "js-waku"; +import { getNodesFromHostedJson } from "js-waku"; +import { Protocols } from "js-waku/build/main/lib/waku"; function createWakuOptions(env: string) { - let bootstrap: any = true; + let bootstrap: any = { default: true }; if (env === "test") { - bootstrap = getBootstrapNodes.bind({}, [ - "fleets", - "wakuv2.test", - "waku-websocket", - ]); + bootstrap = { + getPeers: getNodesFromHostedJson.bind({}, [ + "fleets", + "wakuv2.test", + "waku-websocket", + ]), + }; } return { bootstrap, @@ -29,13 +32,7 @@ export async function createMessenger( ) { const WAKU_OPTIONS = createWakuOptions(env); const messenger = await Messenger.create(identity, WAKU_OPTIONS); - await new Promise((resolve) => { - messenger.waku.libp2p.peerStore.on("change:protocols", ({ protocols }) => { - if (protocols.includes(StoreCodec)) { - resolve(""); - } - }); - }); + await messenger.waku.waitForRemotePeer([Protocols.Store]); return messenger; } diff --git a/packages/react-group-chat-example/webpack.config.js b/packages/react-group-chat-example/webpack.config.js index 7a439987..4500adf3 100644 --- a/packages/react-group-chat-example/webpack.config.js +++ b/packages/react-group-chat-example/webpack.config.js @@ -36,7 +36,7 @@ module.exports = env => { exclude: /node_modules/, options: { loader: 'tsx', - target: 'es2018', + target: 'es2020', }, }, { @@ -58,7 +58,7 @@ module.exports = env => { optimization: { minimizer: [ new ESBuildMinifyPlugin({ - target: 'es2018', + target: 'es2020', }), ], }, diff --git a/packages/status-communities/package.json b/packages/status-communities/package.json index 59a9e5f1..26a6f0c2 100644 --- a/packages/status-communities/package.json +++ b/packages/status-communities/package.json @@ -52,7 +52,7 @@ "ecies-geth": "^1.5.3", "elliptic": "^6.5.4", "js-sha3": "^0.8.0", - "js-waku": "^0.14.2", + "js-waku": "^0.16.0", "pbkdf2": "^3.1.2", "protobufjs": "^6.11.2", "secp256k1": "^4.0.2", diff --git a/packages/status-communities/src/community.spec.ts b/packages/status-communities/src/community.spec.ts index 21c3c5bb..d25285ea 100644 --- a/packages/status-communities/src/community.spec.ts +++ b/packages/status-communities/src/community.spec.ts @@ -14,29 +14,29 @@ describe("Community [live data]", () => { it("Retrieves community description For DappConnect Test from Waku prod fleet", async function () { this.timeout(20000); - const waku = await Waku.create({ bootstrap: true }); + const waku = await Waku.create({ bootstrap: { default: true } }); - await waku.waitForConnectedPeer(); + await waku.waitForRemotePeer(); const community = await Community.instantiateCommunity( - "0x0262c65c881f5a9f79343a26faaa02aad3af7c533d9445fb1939ed11b8bf4d2abd", + "0x02cf13719c8b836bebd4e430c497ee38e798a43e4d8c4760c34bbd9bf4f2434d26", waku ); const desc = community.description as CommunityDescription; expect(desc).to.not.be.undefined; - expect(desc.identity?.displayName).to.eq("DappConnect Test"); + expect(desc.identity?.displayName).to.eq("Test Community"); const descChats = Array.from(desc.chats.values()).map( (chat) => chat?.identity?.displayName ); - expect(descChats).to.include("foobar"); - expect(descChats).to.include("another-channel!"); + expect(descChats).to.include("Test Chat"); + expect(descChats).to.include("Additional Chat"); const chats = Array.from(community.chats.values()).map( (chat) => chat?.communityChat?.identity?.displayName ); - expect(chats).to.include("foobar"); - expect(chats).to.include("another-channel!"); + expect(chats).to.include("Test Chat"); + expect(chats).to.include("Additional Chat"); }); }); diff --git a/packages/status-communities/src/groupChats.ts b/packages/status-communities/src/groupChats.ts index fbf79170..ce85c818 100644 --- a/packages/status-communities/src/groupChats.ts +++ b/packages/status-communities/src/groupChats.ts @@ -1,4 +1,5 @@ import { Waku, WakuMessage } from "js-waku"; +import { DecryptionMethod } from "js-waku/build/main/lib/waku_message"; import { createSymKeyFromPassword } from "./encryption"; import { Identity } from "./identity"; @@ -262,7 +263,10 @@ export class GroupChats { await Promise.all( chat.members.map(async (member) => { if (!removeObserver) { - this.waku.relay.addDecryptionKey(member.symKey); + this.waku.relay.addDecryptionKey(member.symKey, { + method: DecryptionMethod.Symmetric, + contentTopics: [member.topic], + }); } this.waku.relay[observerFunction]( (message) => this.handleWakuChatMessage(message, chat, member.id), diff --git a/packages/status-communities/src/index.ts b/packages/status-communities/src/index.ts index ae1121c9..1ccede10 100644 --- a/packages/status-communities/src/index.ts +++ b/packages/status-communities/src/index.ts @@ -15,3 +15,4 @@ export { AudioContent, TextContent, } from "./wire/chat_message"; +export { getNodesFromHostedJson } from "js-waku"; diff --git a/packages/status-communities/src/messenger.spec.ts b/packages/status-communities/src/messenger.spec.ts index fe398880..24e488e9 100644 --- a/packages/status-communities/src/messenger.spec.ts +++ b/packages/status-communities/src/messenger.spec.ts @@ -1,5 +1,6 @@ import { expect } from "chai"; import debug from "debug"; +import { Protocols } from "js-waku/build/main/lib/waku"; import { Community } from "./community"; import { Identity } from "./identity"; @@ -28,27 +29,13 @@ describe("Messenger", () => { dbg("Create messengers"); [messengerAlice, messengerBob] = await Promise.all([ - Messenger.create(identityAlice, { bootstrap: false }), + Messenger.create(identityAlice, { bootstrap: {} }), Messenger.create(identityBob, { - bootstrap: false, + bootstrap: {}, libp2p: { addresses: { listen: ["/ip4/0.0.0.0/tcp/0/ws"] } }, }), ]); - const pubsubPromises = [ - new Promise((resolve) => - messengerAlice.waku.libp2p.pubsub.once( - "pubsub:subscription-change", - () => resolve(null) - ) - ), - new Promise((resolve) => - messengerBob.waku.libp2p.pubsub.once("pubsub:subscription-change", () => - resolve(null) - ) - ), - ]; - dbg("Connect messengers"); // Connect both messengers together for test purposes messengerAlice.waku.addPeerToAddressBook( @@ -56,8 +43,11 @@ describe("Messenger", () => { messengerBob.waku.libp2p.multiaddrs ); - dbg("Wait for pubsub connection"); - await Promise.all(pubsubPromises); + dbg("Wait for remote peer"); + await Promise.all([ + messengerAlice.waku.waitForRemotePeer([Protocols.Relay]), + messengerBob.waku.waitForRemotePeer([Protocols.Relay]), + ]); dbg("Messengers ready"); }); @@ -139,10 +129,12 @@ describe("Messenger [live data]", () => { dbg("Create messengers"); - messenger = await Messenger.create(identity, { bootstrap: true }); + messenger = await Messenger.create(identity, { + bootstrap: { default: true }, + }); dbg("Wait to be connected to a peer"); - await messenger.waku.waitForConnectedPeer(); + await messenger.waku.waitForRemotePeer(); dbg("Messengers ready"); }); @@ -150,7 +142,7 @@ describe("Messenger [live data]", () => { this.timeout(20_000); const community = await Community.instantiateCommunity( - "0x0262c65c881f5a9f79343a26faaa02aad3af7c533d9445fb1939ed11b8bf4d2abd", + "0x02cf13719c8b836bebd4e430c497ee38e798a43e4d8c4760c34bbd9bf4f2434d26", messenger.waku ); @@ -160,7 +152,7 @@ describe("Messenger [live data]", () => { const endTime = new Date(); const chat = Array.from(community.chats.values()).find( - (chat) => chat.communityChat?.identity?.displayName === "foobar" + (chat) => chat.communityChat?.identity?.displayName === "Test Chat" ); if (!chat) throw "Could not find foobar chat"; diff --git a/packages/status-communities/src/messenger.ts b/packages/status-communities/src/messenger.ts index 4e539352..2ebbd650 100644 --- a/packages/status-communities/src/messenger.ts +++ b/packages/status-communities/src/messenger.ts @@ -1,6 +1,7 @@ import debug from "debug"; import { Waku, WakuMessage } from "js-waku"; import { CreateOptions as WakuCreateOptions } from "js-waku/build/main/lib/waku"; +import { DecryptionMethod } from "js-waku/build/main/lib/waku_message"; import { Chat } from "./chat"; import { Identity } from "./identity"; @@ -36,7 +37,10 @@ export class Messenger { identity: Identity | undefined, wakuOptions?: WakuCreateOptions ): Promise { - const _wakuOptions = Object.assign({ bootstrap: true }, wakuOptions); + const _wakuOptions = Object.assign( + { bootstrap: { default: true } }, + wakuOptions + ); const waku = await Waku.create(_wakuOptions); return new Messenger(identity, waku); } @@ -76,7 +80,10 @@ export class Messenger { if (this.chatsById.has(chat.id)) throw `Failed to join chat, it is already joined: ${chat.id}`; - this.waku.addDecryptionKey(chat.symKey); + this.waku.addDecryptionKey(chat.symKey, { + method: DecryptionMethod.Symmetric, + contentTopics: [chat.contentTopic], + }); this.waku.relay.addObserver( (wakuMessage: WakuMessage) => { diff --git a/yarn.lock b/yarn.lock index a1febcb6..d8adc7c6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -171,25 +171,25 @@ __metadata: languageName: node linkType: hard -"@chainsafe/libp2p-noise@npm:^4.1.1": - version: 4.1.1 - resolution: "@chainsafe/libp2p-noise@npm:4.1.1" +"@chainsafe/libp2p-noise@npm:^5.0.0": + version: 5.0.2 + resolution: "@chainsafe/libp2p-noise@npm:5.0.2" dependencies: "@stablelib/chacha20poly1305": ^1.0.1 "@stablelib/hkdf": ^1.0.1 "@stablelib/sha256": ^1.0.1 "@stablelib/x25519": ^1.0.1 + bl: ^5.0.0 debug: ^4.3.1 it-buffer: ^0.1.3 it-length-prefixed: ^5.0.3 it-pair: ^1.0.0 - it-pb-rpc: ^0.1.11 + it-pb-rpc: ^0.2.0 it-pipe: ^1.1.0 - libp2p-crypto: ^0.19.7 - peer-id: ^0.15.3 + peer-id: ^0.16.0 protobufjs: ^6.11.2 uint8arrays: ^3.0.0 - checksum: 97f3d4fe97b460129149395851c09dbbf8d8be711f889b01725ba8330c45fddb7c31e0bc930b57284bb3c7299d07e2e5c2bdf82953266964b294e03bb5545196 + checksum: 9e462469ebc8eebcbba4f31c3424b862b5788bf0a627fd1e799cc5cc9caf10899e37e572004976b0e30d88836f713526f502617433cefeb57997903d1966ae29 languageName: node linkType: hard @@ -309,6 +309,13 @@ __metadata: languageName: node linkType: hard +"@leichtgewicht/ip-codec@npm:^2.0.1, @leichtgewicht/ip-codec@npm:^2.0.2": + version: 2.0.3 + resolution: "@leichtgewicht/ip-codec@npm:2.0.3" + checksum: 5b6bee0481c82ac05c748322e34ac68aa01757451b4f49f1ab9cc91e420a1ea4cd0fc4678251e6fa41d566a3e3683cca3e179fb767c87845286863ac98b54f15 + languageName: node + linkType: hard + "@motrix/nat-api@npm:^0.3.1": version: 0.3.2 resolution: "@motrix/nat-api@npm:0.3.2" @@ -323,6 +330,27 @@ __metadata: languageName: node linkType: hard +"@multiformats/base-x@npm:^4.0.1": + version: 4.0.1 + resolution: "@multiformats/base-x@npm:4.0.1" + checksum: ecbf84bdd7613fd795e4a41f20f3e8cc7df8bbee84690b7feed383d45a638ed228a80ff6f5c930373cbf24539f64857b66023ee3c1e914f6bac9995c76414a87 + languageName: node + linkType: hard + +"@noble/ed25519@npm:^1.5.1": + version: 1.5.3 + resolution: "@noble/ed25519@npm:1.5.3" + checksum: 4aedb37f6cac90f9a4ec19b2356bab5b9d42abe6a4f53dd5cf93c29c7e4acc038e78573b0078fc9ccb9bd520a3428265f4d04508036127adbd88f855094e755b + languageName: node + linkType: hard + +"@noble/secp256k1@npm:^1.3.0": + version: 1.5.2 + resolution: "@noble/secp256k1@npm:1.5.2" + checksum: 9514a9bb08275e25b9e4a2cde4d03823102a50e0ee31dde165ed9536f39aa1879b236cdf69c84b9267d73ce1a39bbb1d44457191dd57f963d0f9c3d038ccd28b + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -689,6 +717,15 @@ __metadata: languageName: node linkType: hard +"@types/dns-packet@npm:^5.2.0": + version: 5.2.4 + resolution: "@types/dns-packet@npm:5.2.4" + dependencies: + "@types/node": "*" + checksum: 45a725a0a633c07f1da19188a5906a51669a37d941752da06404a9bd0e5d551aacce5b6c92c0539f38f2e8bbda46c92560c9ba3ee2ef13761e974933ef888fe1 + languageName: node + linkType: hard + "@types/elliptic@npm:^6.4.14": version: 6.4.14 resolution: "@types/elliptic@npm:6.4.14" @@ -1337,6 +1374,7 @@ __metadata: eslint-plugin-react-hooks: ^4.3.0 html-entities: ^2.3.2 js-sha3: ^0.8.0 + js-waku: ^0.16.0 jsdom: ^16.7.0 jsdom-global: ^3.0.2 mocha: ^9.0.3 @@ -1433,7 +1471,7 @@ __metadata: eslint-plugin-functional: ^3.7.0 eslint-plugin-import: ^2.24.2 js-sha3: ^0.8.0 - js-waku: ^0.14.2 + js-waku: ^0.16.0 mocha: ^9.1.1 npm-run-all: ^4.1.5 pbkdf2: ^3.1.2 @@ -2254,6 +2292,13 @@ __metadata: languageName: node linkType: hard +"base64url@npm:^3.0.1": + version: 3.0.1 + resolution: "base64url@npm:3.0.1" + checksum: a77b2a3a526b3343e25be424de3ae0aa937d78f6af7c813ef9020ef98001c0f4e2323afcd7d8b2d2978996bf8c42445c3e9f60c218c622593e5fdfd54a3d6e18 + languageName: node + linkType: hard + "base@npm:^0.11.1": version: 0.11.2 resolution: "base@npm:0.11.2" @@ -2292,6 +2337,16 @@ __metadata: languageName: node linkType: hard +"bigint-buffer@npm:^1.1.5": + version: 1.1.5 + resolution: "bigint-buffer@npm:1.1.5" + dependencies: + bindings: ^1.3.0 + node-gyp: latest + checksum: d010c9f57758bcdaccb435d88b483ffcc95fe8bbc6e7fb3a44fb5221f29c894ffaf4a3c5a4a530e0e7d6608203c2cde9b79ee4f2386cd6d4462d1070bc8c9f4e + languageName: node + linkType: hard + "bignumber.js@npm:^9.0.1": version: 9.0.1 resolution: "bignumber.js@npm:9.0.1" @@ -2313,7 +2368,7 @@ __metadata: languageName: node linkType: hard -"bindings@npm:^1.5.0": +"bindings@npm:^1.3.0, bindings@npm:^1.5.0": version: 1.5.0 resolution: "bindings@npm:1.5.0" dependencies: @@ -3693,6 +3748,38 @@ __metadata: languageName: node linkType: hard +"dns-packet@npm:^5.2.4, dns-packet@npm:^5.3.0": + version: 5.3.1 + resolution: "dns-packet@npm:5.3.1" + dependencies: + "@leichtgewicht/ip-codec": ^2.0.1 + checksum: 196ff74a0669126cf5fc901a5849b72f625bd7a4cb163b3f4d41fbe19ed0b017cf7674daef5b0acbd448c094fcd795e501d7066f301be428e4acecfcf3c5f336 + languageName: node + linkType: hard + +"dns-query@npm:^0.8.0": + version: 0.8.0 + resolution: "dns-query@npm:0.8.0" + dependencies: + "@leichtgewicht/ip-codec": ^2.0.2 + "@types/dns-packet": ^5.2.0 + dns-packet: ^5.3.0 + dns-socket: ^4.2.2 + bin: + dns-query: bin/dns-query + checksum: d93421c4cb2bc661286cd60b15821294bb05597475ac4163ab8b443ffe092e874f33d2de4f56c3d8530d944988da8fba6091e9f5760828d7bdddfd821f7da39e + languageName: node + linkType: hard + +"dns-socket@npm:^4.2.2": + version: 4.2.2 + resolution: "dns-socket@npm:4.2.2" + dependencies: + dns-packet: ^5.2.4 + checksum: d02b83ecc9b0f1d2fc459f93c6390c768a8805002637d1f74113d623fa7b2478a695ade7761a0a847622781f5e6dd008a9a1469ac75a617bdf1b775f2156943c + languageName: node + linkType: hard + "dns-txt@npm:^2.0.2": version: 2.0.2 resolution: "dns-txt@npm:2.0.2" @@ -5427,6 +5514,13 @@ fsevents@~2.3.2: languageName: node linkType: hard +"hi-base32@npm:^0.5.1": + version: 0.5.1 + resolution: "hi-base32@npm:0.5.1" + checksum: 6655682b5796d75ed3068071e61d05a490e2086c4908af3b94a730059147b8a4a5e8870e656b828d0550dcc9988d8748bda54a53e428cbce28e0d7a785b2ffde + languageName: node + linkType: hard + "history@npm:^4.9.0": version: 4.10.1 resolution: "history@npm:4.10.1" @@ -6039,13 +6133,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"is-buffer@npm:^2.0.5": - version: 2.0.5 - resolution: "is-buffer@npm:2.0.5" - checksum: 764c9ad8b523a9f5a32af29bdf772b08eb48c04d2ad0a7240916ac2688c983bf5f8504bf25b35e66240edeb9d9085461f9b5dae1f3d2861c6b06a65fe983de42 - languageName: node - linkType: hard - "is-callable@npm:^1.1.4, is-callable@npm:^1.2.3, is-callable@npm:^1.2.4": version: 1.2.4 resolution: "is-callable@npm:1.2.4" @@ -6601,14 +6688,13 @@ fsevents@~2.3.2: languageName: node linkType: hard -"it-pb-rpc@npm:^0.1.11": - version: 0.1.11 - resolution: "it-pb-rpc@npm:0.1.11" +"it-pb-rpc@npm:^0.2.0": + version: 0.2.0 + resolution: "it-pb-rpc@npm:0.2.0" dependencies: - is-buffer: ^2.0.5 it-handshake: ^2.0.0 - it-length-prefixed: ^5.0.2 - checksum: c08f6fdd937d96b73828bb6d61ea275bea89e7f3b7ad681cc9ca5e1e3df56b5359909b1202e6a39549cf1485ee97d8ddd8e0aab9ab48dd41aed54720383c6ccf + it-length-prefixed: ^5.0.3 + checksum: c6b93eda2fdae800cf9dd7428fd87fafe718b67fbba45c5f5b5200724fcffda7d2f2d6c5e621935502d237405a8c70e1310fe9bc10eef308c66ee9ab5a5bcac2 languageName: node linkType: hard @@ -6713,27 +6799,33 @@ fsevents@~2.3.2: languageName: node linkType: hard -"js-waku@npm:^0.14.2": - version: 0.14.2 - resolution: "js-waku@npm:0.14.2" +"js-waku@npm:^0.16.0": + version: 0.16.0 + resolution: "js-waku@npm:0.16.0" dependencies: - "@chainsafe/libp2p-noise": ^4.1.1 + "@chainsafe/libp2p-noise": ^5.0.0 axios: ^0.21.1 + base64url: ^3.0.1 + bigint-buffer: ^1.1.5 debug: ^4.3.1 + dns-query: ^0.8.0 ecies-geth: ^1.5.2 + hi-base32: ^0.5.1 it-concat: ^2.0.0 it-length-prefixed: ^5.0.2 js-sha3: ^0.8.0 libp2p: ^0.32.4 - libp2p-bootstrap: ^0.13.0 - libp2p-gossipsub: ^0.11.1 + libp2p-bootstrap: ^0.14.0 + libp2p-gossipsub: ^0.12.1 libp2p-mplex: ^0.10.4 libp2p-websockets: ^0.16.1 multiaddr: ^10.0.1 + multihashes: ^4.0.3 protobufjs: ^6.8.8 + rlp: ^2.2.7 secp256k1: ^4.0.2 uuid: ^8.3.2 - checksum: afccd3327e66f7bee4d59f4abc1b1cd2fd41f44b4a1506b74659cd55ffd5b323254fcac0ac1c0bfb81164cbea4ca906182452c165f4820fe624b475376494cc1 + checksum: 6bb61173999e49d9fcc41b00dabfde12ae8f653f45076491a287746cb50c3cdf703e3b7aaa6f560d846241346124a57c9f114aca458b98fb66033206e24941fb languageName: node linkType: hard @@ -7036,19 +7128,19 @@ fsevents@~2.3.2: languageName: node linkType: hard -"libp2p-bootstrap@npm:^0.13.0": - version: 0.13.0 - resolution: "libp2p-bootstrap@npm:0.13.0" +"libp2p-bootstrap@npm:^0.14.0": + version: 0.14.0 + resolution: "libp2p-bootstrap@npm:0.14.0" dependencies: debug: ^4.3.1 mafmt: ^10.0.0 multiaddr: ^10.0.0 - peer-id: ^0.15.0 - checksum: d30d8800f7fc054f89527a4f6436614ddc75151415156a72d3d8c1adda17cfac7ccc0981b40f1e066445b97c93bdd995a5b276ba786a16ca7665ed64f99ef031 + peer-id: ^0.16.0 + checksum: 54c42c087dd698d96bc7b86df2657c73e4177b100bd105f33c33fc45342421546046776fa3f87f81f4dfaaefb7d4576cbc08c0d23fbc8195f52f6b7ca5665444 languageName: node linkType: hard -"libp2p-crypto@npm:^0.19.0, libp2p-crypto@npm:^0.19.4, libp2p-crypto@npm:^0.19.5, libp2p-crypto@npm:^0.19.7": +"libp2p-crypto@npm:^0.19.0, libp2p-crypto@npm:^0.19.4, libp2p-crypto@npm:^0.19.5": version: 0.19.7 resolution: "libp2p-crypto@npm:0.19.7" dependencies: @@ -7067,21 +7159,37 @@ fsevents@~2.3.2: languageName: node linkType: hard -"libp2p-gossipsub@npm:^0.11.1": - version: 0.11.4 - resolution: "libp2p-gossipsub@npm:0.11.4" +"libp2p-crypto@npm:^0.21.0": + version: 0.21.2 + resolution: "libp2p-crypto@npm:0.21.2" + dependencies: + "@noble/ed25519": ^1.5.1 + "@noble/secp256k1": ^1.3.0 + err-code: ^3.0.1 + iso-random-stream: ^2.0.0 + multiformats: ^9.4.5 + node-forge: ^1.2.1 + protobufjs: ^6.11.2 + uint8arrays: ^3.0.0 + checksum: e03f8398db3a2913374b6a4b13560aec0c8e2d244c80fa0b2f119600789c445b235be01987580262a91d63e590f0f1a185728ea4b8697e5d4dfc9ec6da5266d6 + languageName: node + linkType: hard + +"libp2p-gossipsub@npm:^0.12.1": + version: 0.12.3 + resolution: "libp2p-gossipsub@npm:0.12.3" dependencies: "@types/debug": ^4.1.5 debug: ^4.3.1 denque: ^1.5.0 err-code: ^3.0.1 it-pipe: ^1.1.0 - libp2p-interfaces: ^1.1.0 - peer-id: ^0.15.3 + libp2p-interfaces: ^2.0.1 + peer-id: ^0.16.0 protobufjs: ^6.11.2 time-cache: ^0.3.0 uint8arrays: ^3.0.0 - checksum: 285cd300cd05c3a7fe0c600604d77bd527fefb2b4765ff69cc35424ff8a61302b396124453da57f4e8d25c5eace063d2dadd232c5734321ca7deef5d58c76186 + checksum: e73f7a75d25c60bc887e297d7ce6668c45f0101c32209bceb60812981cc0a3fae44315284afb32d887d350a3cd179d949caa02e4d0c8aec651b2ae32ebf596ff languageName: node linkType: hard @@ -7106,25 +7214,24 @@ fsevents@~2.3.2: languageName: node linkType: hard -"libp2p-interfaces@npm:^1.1.0": - version: 1.1.1 - resolution: "libp2p-interfaces@npm:1.1.1" +"libp2p-interfaces@npm:^2.0.1": + version: 2.0.9 + resolution: "libp2p-interfaces@npm:2.0.9" dependencies: - abort-controller: ^3.0.0 abortable-iterator: ^3.0.0 debug: ^4.3.1 err-code: ^3.0.1 it-length-prefixed: ^5.0.2 it-pipe: ^1.1.0 it-pushable: ^1.4.2 - libp2p-crypto: ^0.19.5 + libp2p-crypto: ^0.21.0 multiaddr: ^10.0.0 multiformats: ^9.1.2 p-queue: ^6.6.2 - peer-id: ^0.15.0 + peer-id: ^0.16.0 protobufjs: ^6.10.2 uint8arrays: ^3.0.0 - checksum: 2cac9dd5c254ab7c23665a3639cf027686226897e7098834710a096a19745d2139099a95652bfd2011d43e183ce2d9b686224b42e48ad98d849f0a0d6f890115 + checksum: 68f20f433f62ec3e52120dc1148b1a3fe4582e968b9d2d9008c64eeeb73604551d31d7eb2f728c3e2fba9b3e0736ab1b62a9f66a0220d64c3315dff68113b7d3 languageName: node linkType: hard @@ -7888,6 +7995,15 @@ fsevents@~2.3.2: languageName: node linkType: hard +"multibase@npm:^4.0.1": + version: 4.0.6 + resolution: "multibase@npm:4.0.6" + dependencies: + "@multiformats/base-x": ^4.0.1 + checksum: 891ce47f509c6070d2306e7e00aef3ef41fbb50a848a1e1bec5e75ca63c5032015a436cf09e9e3939b5b2ca81e74804151eb410a388f10e9aabf7a2f5a35d272 + languageName: node + linkType: hard + "multicast-dns-service-types@npm:^1.1.0": version: 1.1.0 resolution: "multicast-dns-service-types@npm:1.1.0" @@ -7914,6 +8030,17 @@ fsevents@~2.3.2: languageName: node linkType: hard +"multihashes@npm:^4.0.3": + version: 4.0.3 + resolution: "multihashes@npm:4.0.3" + dependencies: + multibase: ^4.0.1 + uint8arrays: ^3.0.0 + varint: ^5.0.2 + checksum: 57c978aa53f7144f8a146a486aa6aea96a73f21058f48ab80a8c5542854197aa63d33aae42b005bed1bbba9f70958b60f3287d90f1a47cf13e8ea7d75d6b8e34 + languageName: node + linkType: hard + "multistream-select@npm:^2.0.0": version: 2.0.1 resolution: "multistream-select@npm:2.0.1" @@ -8103,6 +8230,13 @@ fsevents@~2.3.2: languageName: node linkType: hard +"node-forge@npm:^1.2.1": + version: 1.2.1 + resolution: "node-forge@npm:1.2.1" + checksum: af4f88c3f69362359f35f6a9e231b35c96d906eeb6e976fb92742afe7fcdd76439dc22b41ce3755389d171f6320756ec7505bdfa7b252466c091b8c519a22674 + languageName: node + linkType: hard + "node-gyp-build@npm:^4.2.0": version: 4.3.0 resolution: "node-gyp-build@npm:4.3.0" @@ -8956,7 +9090,7 @@ fsevents@~2.3.2: languageName: node linkType: hard -"peer-id@npm:^0.15.0, peer-id@npm:^0.15.3": +"peer-id@npm:^0.15.0": version: 0.15.3 resolution: "peer-id@npm:0.15.3" dependencies: @@ -8972,6 +9106,19 @@ fsevents@~2.3.2: languageName: node linkType: hard +"peer-id@npm:^0.16.0": + version: 0.16.0 + resolution: "peer-id@npm:0.16.0" + dependencies: + class-is: ^1.1.0 + libp2p-crypto: ^0.21.0 + multiformats: ^9.4.5 + protobufjs: ^6.10.2 + uint8arrays: ^3.0.0 + checksum: 35dfb887c6f00789702214488e1f97dd1713ed77909b7f9be13b20003aed64cc444bf15e6bd845c01d47f424856acca7fa1f0501b785f5cb6e6707e3f05b9f41 + languageName: node + linkType: hard + "pem-jwk@npm:^2.0.0": version: 2.0.0 resolution: "pem-jwk@npm:2.0.0" @@ -10009,6 +10156,17 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"rlp@npm:^2.2.7": + version: 2.2.7 + resolution: "rlp@npm:2.2.7" + dependencies: + bn.js: ^5.2.0 + bin: + rlp: bin/rlp + checksum: 3db4dfe5c793f40ac7e0be689a1f75d05e6f2ca0c66189aeb62adab8c436b857ab4420a419251ee60370d41d957a55698fc5e23ab1e1b41715f33217bc4bb558 + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -11812,6 +11970,13 @@ resolve@^2.0.0-next.3: languageName: node linkType: hard +"varint@npm:^5.0.2": + version: 5.0.2 + resolution: "varint@npm:5.0.2" + checksum: e1a66bf9a6cea96d1f13259170d4d41b845833acf3a9df990ea1e760d279bd70d5b1f4c002a50197efd2168a2fd43eb0b808444600fd4d23651e8d42fe90eb05 + languageName: node + linkType: hard + "varint@npm:^6.0.0": version: 6.0.0 resolution: "varint@npm:6.0.0"