14: Payloads are proto3 (#333)

This commit is contained in:
Oskar Thorén 2021-04-07 15:56:15 +08:00 committed by GitHub
parent 320c16c286
commit 420f90d86c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,14 +35,18 @@ Omitting it means the version is 0.
The `timestamp` field MAY be filled out to signify the time at which the message is generated by its sender. This field holds the Unix epoch time. Omitting it means the timestamp is unspecified.
## Protobuf
## Payloads
Payloads are implemented using [protocol buffers v3](https://developers.google.com/protocol-buffers/).
```protobuf
syntax = "proto3";
message WakuMessage {
optional bytes payload = 1;
optional uint32 contentTopic = 2;
optional uint32 version = 3;
optional double timestamp = 4;
bytes payload = 1;
uint32 contentTopic = 2;
uint32 version = 3;
double timestamp = 4;
}
```