Upgrade nim-waku

This commit is contained in:
Franck Royer 2021-04-08 22:32:36 +10:00
parent 3be57632f7
commit 5bc6173cb8
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
3 changed files with 5 additions and 4 deletions

@ -1 +1 @@
Subproject commit d1c1a0ca13e3aa2690a6550faca13210e1f46877
Subproject commit 5747ff5be00b7b99e61021c17a975761fbe151f3

View File

@ -4,6 +4,7 @@ package waku.v2;
message WakuMessageProto {
optional bytes payload = 1;
optional uint32 content_topic = 2;
optional string content_topic = 2;
optional uint32 version = 3;
optional double timestamp = 4;
}

View File

@ -4,13 +4,13 @@ import { Reader } from 'protobufjs/minimal';
// Protecting the user from protobuf oddities
import { WakuMessageProto } from '../proto/waku/v2/waku';
const DEFAULT_CONTENT_TOPIC = 1;
const DEFAULT_CONTENT_TOPIC = '/waku/2/default-content/proto';
const DEFAULT_VERSION = 0;
export class WakuMessage {
private constructor(
public payload?: Uint8Array,
public contentTopic?: number,
public contentTopic?: string,
public version?: number
) {}