forked from CovenantSQL/CovenantSQL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.proto
More file actions
112 lines (93 loc) · 1.75 KB
/
Copy pathtypes.proto
File metadata and controls
112 lines (93 loc) · 1.75 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
syntax = "proto3";
package types;
message Signature {
string R = 1;
string S = 2;
}
message PublicKey {
bytes PublicKey = 1;
}
message Hash {
bytes Hash = 1;
}
message UtxoEntry {
bool IsCoinbase = 1;
bool FromMainChain = 2;
uint32 BlockHeight = 3;
map<uint32, Utxo> SparseOutputs = 4;
}
message Utxo {
UtxoHeader UtxoHeader = 1;
bool Spent = 2;
uint64 amount = 3;
}
message UtxoHeader {
int32 Version = 1;
Hash PrevTxHash = 2;
PublicKey Signee = 3;
Signature Signature = 4;
}
enum TxType {
QUERY = 0;
STORAGE = 1;
}
message Tx {
repeated Utxo UtxoIn = 1;
repeated Utxo UtxoOut = 2;
TxType type = 3;
string Content = 4;
}
message NodeID {
string NodeID = 1;
}
message AccountAddress {
string AccountAddress = 1;
}
message Header {
int32 Version = 1;
NodeID Producer = 2;
Hash Root = 3;
Hash Parent = 4;
Hash MerkleRoot = 5;
int64 Timestamp = 6;
}
message SignedHeader {
Header Header = 1;
Hash BlockHash = 2;
PublicKey Signee = 3;
Signature Signature = 4;
}
message State {
Hash Head = 1;
int32 Height = 2;
}
message BPTx {
Hash TxHash = 1;
BPTxData TxData = 2;
}
message BPTxData {
uint64 AccountNonce = 1;
AccountAddress Recipient = 2;
bytes Amount = 3;
bytes Payload = 4;
Signature Signature = 5;
PublicKey Signee = 6;
}
message BPHeader {
int32 Version = 1;
AccountAddress Producer = 2;
Hash Root = 3;
Hash Parent = 4;
Hash MerkleRoot = 5;
int64 Timestamp = 6;
}
message BPSignedHeader {
BPHeader Header = 1;
Hash BlockHash = 2;
PublicKey Signee = 3;
Signature Signature = 4;
}
message BPBlock {
BPSignedHeader Header = 1;
repeated BPTx Tx = 2;
}