-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlightstreamer.proto
64 lines (51 loc) · 1.53 KB
/
lightstreamer.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
syntax = "proto3";
package lightstreamer;
message Empty {}
message BlockID {
optional uint64 sequence = 1;
optional bytes hash = 2;
}
// BlockRange specifies a series of blocks from start to end inclusive.
// Both BlockIDs must be sequences; specification by hash is not yet supported.
message BlockRange {
BlockID start = 1;
BlockID end = 2;
}
message LightBlock {
uint32 protoVersion = 1; // the version of this wire format, for storage
uint64 sequence = 2; // the height of this block
bytes hash = 3; // the ID (hash) of this block, same as explorer
bytes previousBlockHash = 4; // the ID (hash) of this block's predecessor
uint64 timestamp = 5; // Unix epoch time when the block was mined
repeated LightTransaction transactions = 6; // zero or more compact transactions from this block
uint64 noteSize = 7; // the size of the notes tree after adding transactions from this block.
}
message LightTransaction {
uint64 index = 1; // do we need this field?
bytes hash = 2;
repeated LightSpend spends = 4;
repeated LightOutput outputs = 5;
}
message LightSpend {
bytes nf = 2;
}
message LightOutput {
bytes note = 1; // NoteEncrypted, serialized
}
message Transaction {
// built, encrypted transaction
bytes data = 1;
}
message SendResponse {
bytes hash = 1;
bool accepted = 2;
}
message ServerInfo {
string version = 1;
string vendor = 2;
string networkId = 3;
string nodeVersion = 4;
string nodeStatus = 5;
uint64 blockHeight = 6;
string blockHash = 7;
}