-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use next version of libraries for light-js and noise-js (#60)
- Loading branch information
Showing
4 changed files
with
4,272 additions
and
8,065 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,12 +76,13 @@ <h2>Store</h2> | |
createDecoder, | ||
utf8ToBytes, | ||
bytesToUtf8, | ||
} from "https://unpkg.com/@waku/[email protected].24-070b625.0/bundle/index.js"; | ||
} from "https://unpkg.com/@waku/[email protected].25-fd60cc2.0/bundle/index.js"; | ||
import { | ||
enrTree, | ||
DnsNodeDiscovery, | ||
} from "https://unpkg.com/@waku/[email protected]/bundle/index.js"; | ||
import { messageHash } from "https://unpkg.com/@waku/[email protected]/bundle/index.js"; | ||
wakuDnsDiscovery, | ||
} from "https://unpkg.com/@waku/[email protected]/bundle/index.js"; | ||
import { messageHash } from "https://unpkg.com/@waku/[email protected]/bundle/index.js"; | ||
|
||
const peerIdDiv = document.getElementById("peer-id"); | ||
const remotePeerIdDiv = document.getElementById("remote-peer-id"); | ||
|
@@ -99,7 +100,7 @@ <h2>Store</h2> | |
|
||
const ContentTopic = "/js-waku-examples/1/chat/utf8"; | ||
const decoder = createDecoder(ContentTopic); | ||
const encoder = createEncoder({ contentTopic: ContentTopic }); | ||
const encoder = createEncoder({ contentTopic: ContentTopic}); | ||
// Each key is a unique identifier for the message. Each value is an obj { text, timestamp } | ||
let messages = {}; | ||
let unsubscribe; | ||
|
@@ -125,7 +126,12 @@ <h2>Store</h2> | |
} | ||
|
||
statusDiv.innerHTML = "<p>Creating Waku node.</p>"; | ||
const node = await createLightNode(); | ||
const node = await createLightNode({ | ||
shardInfo: { | ||
contentTopics: [ContentTopic] | ||
}, | ||
defaultBootstrap: true, | ||
}); | ||
|
||
statusDiv.innerHTML = "<p>Starting Waku node.</p>"; | ||
await node.start(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.