/
transaction.proto
114 lines (97 loc) · 2.04 KB
/
transaction.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
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
113
114
syntax = "proto3";
option go_package = "./pb";
package pb;
message UnsignedTx {
Payload payload = 1;
uint64 nonce = 2;
int64 fee = 3;
bytes attributes = 4;
}
message Transaction {
UnsignedTx unsigned_tx = 1;
repeated Program programs = 2;
}
message Program {
bytes code = 1;
bytes parameter = 2;
}
enum PayloadType {
COINBASE_TYPE = 0;
TRANSFER_ASSET_TYPE = 1;
SIG_CHAIN_TXN_TYPE = 2;
REGISTER_NAME_TYPE = 3;
TRANSFER_NAME_TYPE = 4;
DELETE_NAME_TYPE = 5;
SUBSCRIBE_TYPE = 6;
UNSUBSCRIBE_TYPE = 7;
GENERATE_ID_TYPE = 8;
NANO_PAY_TYPE = 9;
ISSUE_ASSET_TYPE = 10;
GENERATE_ID_2_TYPE = 11;
}
message Payload {
PayloadType type = 1;
bytes data = 2;
}
message Coinbase {
bytes sender = 1;
bytes recipient = 2;
int64 amount = 3;
}
message SigChainTxn {
bytes sig_chain = 1;
bytes submitter = 2;
}
message RegisterName {
bytes registrant = 1;
string name = 2;
int64 registration_fee = 3;
}
message TransferName {
string name = 1;
bytes registrant = 2;
bytes recipient = 3;
}
message DeleteName {
bytes registrant = 1;
string name = 2;
}
message Subscribe {
bytes subscriber = 1;
string identifier = 2;
string topic = 3;
uint32 bucket = 4 [deprecated = true];
uint32 duration = 5;
bytes meta = 6;
}
message Unsubscribe {
bytes subscriber = 1;
string identifier = 2;
string topic = 3;
}
message TransferAsset {
bytes sender = 1;
bytes recipient = 2;
int64 amount = 3;
}
message GenerateID {
bytes public_key = 1;
int64 registration_fee = 2;
bytes sender = 3;
int32 version = 4;
}
message NanoPay {
bytes sender = 1;
bytes recipient = 2;
uint64 id = 3;
int64 amount = 4;
uint32 txn_expiration = 5;
uint32 nano_pay_expiration = 6;
}
message IssueAsset {
bytes sender = 1;
string name = 2;
string symbol = 3;
int64 total_supply = 4;
uint32 precision = 5;
}