rm: peer-exchange and dns-discovery packages

This commit is contained in:
danisharora099 2023-09-12 00:31:23 +08:00
parent 5e240d0e3b
commit c67e69daba
No known key found for this signature in database
GPG Key ID: FBD2BF500037F135
3 changed files with 1 additions and 20 deletions

View File

@ -11,9 +11,7 @@
"@libp2p/bootstrap": "^8.0.0", "@libp2p/bootstrap": "^8.0.0",
"@livechat/ui-kit": "^0.5.0-24", "@livechat/ui-kit": "^0.5.0-24",
"@multiformats/multiaddr": "12.1.5", "@multiformats/multiaddr": "12.1.5",
"@waku/dns-discovery": "^0.0.17",
"@waku/interfaces": "^0.0.18", "@waku/interfaces": "^0.0.18",
"@waku/peer-exchange": "^0.0.16",
"@waku/react": "^0.0.5-effaf55", "@waku/react": "^0.0.5-effaf55",
"@waku/sdk": "^0.0.19", "@waku/sdk": "^0.0.19",
"process": "^0.11.10", "process": "^0.11.10",

View File

@ -6,9 +6,7 @@
"dependencies": { "dependencies": {
"@libp2p/bootstrap": "^8.0.0", "@libp2p/bootstrap": "^8.0.0",
"@waku/react": "^0.0.5-effaf55", "@waku/react": "^0.0.5-effaf55",
"@waku/dns-discovery": "^0.0.17",
"@waku/interfaces": "^0.0.18", "@waku/interfaces": "^0.0.18",
"@waku/peer-exchange": "^0.0.16",
"@livechat/ui-kit": "^0.5.0-24", "@livechat/ui-kit": "^0.5.0-24",
"@multiformats/multiaddr": "12.1.5", "@multiformats/multiaddr": "12.1.5",
"@waku/sdk": "^0.0.19", "@waku/sdk": "^0.0.19",

View File

@ -1,31 +1,16 @@
import React from "react"; import React from "react";
import ReactDOM from "react-dom"; import ReactDOM from "react-dom";
import { LightNodeProvider, ContentPairProvider } from "@waku/react"; import { LightNodeProvider, ContentPairProvider } from "@waku/react";
import { wakuDnsDiscovery, enrTree } from "@waku/dns-discovery";
import { wakuPeerExchangeDiscovery } from "@waku/peer-exchange";
import "./index.css"; import "./index.css";
import App from "./App"; import App from "./App";
import { CONTENT_TOPIC } from "./config"; import { CONTENT_TOPIC } from "./config";
import { Protocols } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces";
const NODE_OPTIONS = {
libp2p: {
peerDiscovery: [
wakuDnsDiscovery([enrTree.PROD], {
store: 1,
filter: 2,
lightPush: 2,
}),
wakuPeerExchangeDiscovery(),
],
},
};
ReactDOM.render( ReactDOM.render(
<React.StrictMode> <React.StrictMode>
<LightNodeProvider <LightNodeProvider
options={NODE_OPTIONS} options={{ defaultBootstrap: true }}
protocols={[Protocols.Store, Protocols.Filter, Protocols.LightPush]} protocols={[Protocols.Store, Protocols.Filter, Protocols.LightPush]}
> >
<ContentPairProvider contentTopic={CONTENT_TOPIC}> <ContentPairProvider contentTopic={CONTENT_TOPIC}>