-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathtypes.proto
65 lines (52 loc) · 1.37 KB
/
types.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
65
syntax = "proto3";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option csharp_namespace = "Loom.Client.Protobuf";
// Blockchain Types
message BlockHeader {
string chain_id = 1 [(gogoproto.customname)="ChainID"];
int64 height = 2;
int64 time = 3;
int32 num_txs = 4;
BlockID last_block_id = 5 [(gogoproto.customname)="LastBlockID", (gogoproto.nullable)=false];
bytes last_commit_hash = 6;
bytes data_hash = 7;
bytes validators_hash = 8;
bytes app_hash = 9;
bytes current_hash = 10;
}
message BlockID {
bytes hash = 1;
PartSetHeader parts = 2 [(gogoproto.nullable)=false];
}
message PartSetHeader {
int32 total = 1;
bytes hash = 2;
}
message Validator {
bytes pub_key = 1;
int64 power = 2;
}
message Evidence {
bytes pub_key = 1;
int64 height = 2;
}
// Generic Loom data structures
message BigUInt {
bytes Value = 1 [(gogoproto.customtype) = "github.com/loomnetwork/go-loom/common.BigUInt", (gogoproto.nullable) = false];
}
message Address {
string chain_id = 1;
bytes local = 2 [(gogoproto.customtype) = "github.com/loomnetwork/go-loom/common.LocalAddress", (gogoproto.nullable) = false];
}
message Transaction {
uint32 id = 1;
bytes data = 2;
}
// Identifier for each known type of Transaction
enum TxID {
INVALID = 0;
DEPLOY = 1;
CALL = 2;
MIGRATION = 3;
ETHEREUM = 4;
}