2022-06-17 10:48:15 +10:00
|
|
|
import React from "react";
|
|
|
|
|
import ReactDOM from "react-dom";
|
2023-02-28 00:36:17 +01:00
|
|
|
import { LightNodeProvider, ContentPairProvider } from "@waku/react";
|
2023-06-24 00:18:03 +02:00
|
|
|
import { wakuDnsDiscovery, enrTree } from "@waku/dns-discovery";
|
2023-02-28 00:36:17 +01:00
|
|
|
import { wakuPeerExchangeDiscovery } from "@waku/peer-exchange";
|
2022-06-17 10:48:15 +10:00
|
|
|
import "./index.css";
|
2023-08-02 17:59:37 +05:30
|
|
|
|
2022-06-17 10:48:15 +10:00
|
|
|
import App from "./App";
|
2023-08-03 13:23:17 +05:30
|
|
|
import { CONTENT_TOPIC } from "./config";
|
|
|
|
|
import { Protocols } from "@waku/interfaces";
|
2023-02-28 00:36:17 +01:00
|
|
|
|
|
|
|
|
const NODE_OPTIONS = {
|
|
|
|
|
libp2p: {
|
|
|
|
|
peerDiscovery: [
|
2023-08-01 17:30:22 +05:30
|
|
|
wakuDnsDiscovery([enrTree.PROD], {
|
2023-02-28 00:36:17 +01:00
|
|
|
store: 1,
|
|
|
|
|
filter: 2,
|
2023-06-24 00:18:03 +02:00
|
|
|
lightPush: 2,
|
2023-02-28 00:36:17 +01:00
|
|
|
}),
|
|
|
|
|
wakuPeerExchangeDiscovery(),
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
2022-06-17 10:48:15 +10:00
|
|
|
ReactDOM.render(
|
|
|
|
|
<React.StrictMode>
|
2023-08-03 13:23:17 +05:30
|
|
|
<LightNodeProvider
|
|
|
|
|
options={NODE_OPTIONS}
|
2023-08-03 17:27:42 +05:30
|
|
|
protocols={[Protocols.Store, Protocols.Filter, Protocols.LightPush]}
|
2023-08-03 13:23:17 +05:30
|
|
|
>
|
2023-08-02 17:59:37 +05:30
|
|
|
<ContentPairProvider contentTopic={CONTENT_TOPIC}>
|
|
|
|
|
<App />
|
|
|
|
|
</ContentPairProvider>
|
|
|
|
|
</LightNodeProvider>
|
2022-06-17 10:48:15 +10:00
|
|
|
</React.StrictMode>,
|
|
|
|
|
document.getElementById("root")
|
|
|
|
|
);
|