@libp2p/floodsub 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,52 @@
1
+ syntax = "proto3";
2
+
3
+ message RPC {
4
+ repeated SubOpts subscriptions = 1;
5
+ repeated Message messages = 2;
6
+ optional ControlMessage control = 3;
7
+
8
+ message SubOpts {
9
+ optional bool subscribe = 1; // subscribe or unsubcribe
10
+ optional string topic = 2;
11
+ }
12
+
13
+ message Message {
14
+ optional bytes from = 1;
15
+ optional bytes data = 2;
16
+ optional bytes sequenceNumber = 3;
17
+ optional string topic = 4;
18
+ optional bytes signature = 5;
19
+ optional bytes key = 6;
20
+ }
21
+ }
22
+
23
+ message ControlMessage {
24
+ repeated ControlIHave ihave = 1;
25
+ repeated ControlIWant iwant = 2;
26
+ repeated ControlGraft graft = 3;
27
+ repeated ControlPrune prune = 4;
28
+ }
29
+
30
+ message ControlIHave {
31
+ optional string topic = 1;
32
+ repeated bytes messageIDs = 2;
33
+ }
34
+
35
+ message ControlIWant {
36
+ repeated bytes messageIDs = 1;
37
+ }
38
+
39
+ message ControlGraft {
40
+ optional string topic = 1;
41
+ }
42
+
43
+ message ControlPrune {
44
+ optional string topic = 1;
45
+ repeated PeerInfo peers = 2;
46
+ optional uint64 backoff = 3;
47
+ }
48
+
49
+ message PeerInfo {
50
+ optional bytes peerID = 1;
51
+ optional bytes signedPeerRecord = 2;
52
+ }