Merge pull request #169 from waku-org/chore/@waku-core-0.0.8

This commit is contained in:
fryorcraken.eth 2022-12-23 09:33:59 +11:00 committed by GitHub
commit 222629cc64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6594 additions and 43 deletions

View File

@ -7,8 +7,8 @@
"@testing-library/jest-dom": "^5.16.5", "@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0", "@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0", "@testing-library/user-event": "^13.5.0",
"@waku/core": "^0.0.6", "@waku/core": "^0.0.8",
"@waku/create": "^0.0.4", "@waku/create": "^0.0.6",
"protobufjs": "^7.1.2", "protobufjs": "^7.1.2",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,12 @@
import * as React from "react"; import * as React from "react";
import protobuf from "protobufjs"; import protobuf from "protobufjs";
import { createPrivacyNode } from "@waku/create"; import { createRelayNode } from "@waku/create";
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer"; import { waitForRemotePeer } from "@waku/core";
import { DecoderV0, EncoderV0 } from "@waku/core/lib/waku_message/version_0"; import { createDecoder, createEncoder } from "@waku/core";
const ContentTopic = `/js-waku-examples/1/chat/proto`; const ContentTopic = `/js-waku-examples/1/chat/proto`;
const Encoder = new EncoderV0(ContentTopic); const Encoder = createEncoder(ContentTopic);
const Decoder = new DecoderV0(ContentTopic); const Decoder = createDecoder(ContentTopic);
const SimpleChatMessage = new protobuf.Type("SimpleChatMessage") const SimpleChatMessage = new protobuf.Type("SimpleChatMessage")
.add(new protobuf.Field("timestamp", 1, "uint32")) .add(new protobuf.Field("timestamp", 1, "uint32"))
@ -25,7 +25,7 @@ function App() {
setWakuStatus("Starting"); setWakuStatus("Starting");
(async () => { (async () => {
const waku = await createPrivacyNode({ defaultBootstrap: true }); const waku = await createRelayNode({ defaultBootstrap: true });
setWaku(waku); setWaku(waku);
await waku.start(); await waku.start();