This commit is contained in:
Sasha 2025-07-17 17:08:48 +02:00
parent c66508f74f
commit 0cda71ad91
No known key found for this signature in database
3 changed files with 236 additions and 491 deletions

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@
"dependencies": {
"@libp2p/crypto": "^5.0.5",
"@multiformats/multiaddr": "^12.3.1",
"@waku/sdk": "0.0.32-4997440.0",
"@waku/sdk": "0.0.33-c24842a.0",
"libp2p": "^2.1.10",
"protobufjs": "^7.3.0",
"uint8arrays": "^5.1.0"

View File

@ -22,10 +22,6 @@ export async function getWakuNode(): Promise<LightNode> {
const node = await createLightNode({
defaultBootstrap: true,
// networkConfig: {
// clusterId: 42,
// shards: [0]
// },
discovery: {
dns: true,
peerExchange: true,
@ -39,11 +35,6 @@ export async function getWakuNode(): Promise<LightNode> {
(window as any).waku = node;
// await Promise.allSettled([
// node.dial("/dns4/waku-test.bloxy.one/tcp/8095/wss/p2p/16Uiu2HAmSZbDB7CusdRhgkD81VssRjQV5ZH13FbzCGcdnbbh6VwZ"),
// node.dial("/dns4/vps-aaa00d52.vps.ovh.ca/tcp/8000/wss/p2p/16Uiu2HAm9PftGgHZwWE3wzdMde4m3kT2eYJFXLZfGoSED3gysofk")
// ]);
await node.start();
await node.waitForPeers();
@ -58,13 +49,9 @@ export function getPeerId(): string | undefined {
export function createWakuEncoder() {
return createEncoder({
contentTopic: DEFAULT_CONTENT_TOPIC,
// pubsubTopicShardInfo: {
// clusterId: 42,
// shard: 0,
// }
});
}
export function createWakuDecoder() {
return createDecoder(DEFAULT_CONTENT_TOPIC/*, { clusterId: 42, shard: 0 }*/);
return createDecoder(DEFAULT_CONTENT_TOPIC);
}