38 lines
973 B
TypeScript
Raw Normal View History

2022-06-17 10:48:15 +10:00
import React from "react";
import ReactDOM from "react-dom";
import { LightNodeProvider, ContentPairProvider } from "@waku/react";
import { wakuDnsDiscovery, enrTree } from "@waku/dns-discovery";
import { wakuPeerExchangeDiscovery } from "@waku/peer-exchange";
2022-06-17 10:48:15 +10:00
import "./index.css";
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";
const NODE_OPTIONS = {
libp2p: {
peerDiscovery: [
wakuDnsDiscovery([enrTree.PROD], {
store: 1,
filter: 2,
lightPush: 2,
}),
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
>
<ContentPairProvider contentTopic={CONTENT_TOPIC}>
<App />
</ContentPairProvider>
</LightNodeProvider>
2022-06-17 10:48:15 +10:00
</React.StrictMode>,
document.getElementById("root")
);