bump to @waku/core 0.0.10
This commit is contained in:
parent
362e307594
commit
22ec6ae33b
File diff suppressed because it is too large
Load Diff
|
@ -8,7 +8,7 @@
|
||||||
"@testing-library/react": "^13.4.0",
|
"@testing-library/react": "^13.4.0",
|
||||||
"@testing-library/user-event": "^14.4.3",
|
"@testing-library/user-event": "^14.4.3",
|
||||||
"@waku/byte-utils": "^0.0.2",
|
"@waku/byte-utils": "^0.0.2",
|
||||||
"@waku/core": "^0.0.6",
|
"@waku/core": "^0.0.10",
|
||||||
"@waku/create": "^0.0.4",
|
"@waku/create": "^0.0.4",
|
||||||
"protobufjs": "^7.1.2",
|
"protobufjs": "^7.1.2",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
"web-vitals": "^2.1.4"
|
"web-vitals": "^2.1.4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "PORT=3002 react-scripts start",
|
"start": "GENERATE_SOURCEMAP=false PORT=3002 react-scripts start",
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"test": "exit 0",
|
"test": "exit 0",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import protobuf from "protobufjs";
|
import protobuf from "protobufjs";
|
||||||
import { createLightNode } from "@waku/create";
|
import { createLightNode } from "@waku/create";
|
||||||
import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer";
|
import { waitForRemotePeer } from "@waku/core";
|
||||||
import { DecoderV0 } from "@waku/core/lib/waku_message/version_0";
|
import { Decoder } from "@waku/core/lib/message/version_0";
|
||||||
import { bytesToUtf8 } from "@waku/byte-utils";
|
import { bytesToUtf8 } from "@waku/byte-utils";
|
||||||
|
|
||||||
const ContentTopic = "/toy-chat/2/huilong/proto";
|
const ContentTopic = "/toy-chat/2/huilong/proto";
|
||||||
const Decoder = new DecoderV0(ContentTopic);
|
const decoder = new Decoder(ContentTopic);
|
||||||
|
|
||||||
const ProtoChatMessage = new protobuf.Type("ChatMessage")
|
const ProtoChatMessage = new protobuf.Type("ChatMessage")
|
||||||
.add(new protobuf.Field("timestamp", 1, "uint64"))
|
.add(new protobuf.Field("timestamp", 1, "uint64"))
|
||||||
|
@ -56,7 +56,7 @@ function App() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
for await (const messagesPromises of waku.store.queryGenerator(
|
for await (const messagesPromises of waku.store.queryGenerator(
|
||||||
[Decoder],
|
[decoder],
|
||||||
{
|
{
|
||||||
timeFilter: { startTime, endTime: new Date() },
|
timeFilter: { startTime, endTime: new Date() },
|
||||||
pageDirection: "forward",
|
pageDirection: "forward",
|
||||||
|
|
Loading…
Reference in New Issue