Repository navigation
Expand file tree
/
Copy pathNULS.proto
More file actions
67 lines (59 loc) · 1.42 KB
/
Copy pathNULS.proto
File metadata and controls
67 lines (59 loc) · 1.42 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
syntax = "proto3";
package TW.NULS.Proto;
option java_package = "wallet.core.jni.proto";
message TransactionCoinFrom {
string from_address = 1;
uint32 assets_chainid = 2;
uint32 assets_id = 3;
//tranaction out amount (256-bit number)
bytes id_amount = 4;
//8 bytes
bytes nonce = 5;
//lock status: 1 locked; 0 unlocked
uint32 locked = 6;
}
message TransactionCoinTo {
string to_address = 1;
uint32 assets_chainid = 2;
uint32 assets_id = 3;
// tranaction amount (256-bit number)
bytes id_amount = 4;
uint32 lock_time = 5;
}
message Signature {
uint32 pkey_len = 1;
bytes public_key = 2;
uint32 sig_len = 3;
bytes signature = 4;
}
message Transaction {
uint32 type = 1;
uint32 timestamp = 2;
string remark = 3;
bytes tx_data = 4;
//CoinFrom
TransactionCoinFrom input = 5;
//CoinTo
TransactionCoinTo output = 6;
Signature tx_sigs = 7;
uint32 hash = 8;
}
// Input data necessary to create a signed order.
message SigningInput {
bytes private_key = 1;
string from = 2;
string to = 3;
bytes amount = 4;
uint32 chain_id = 5;
uint32 idassets_id = 6;
//The last 8 bytes of latest transaction hash
bytes nonce = 7;
string remark = 8;
// Account balance
bytes balance = 9;
// time, accurate to the second
uint32 timestamp = 10;
}
message SigningOutput {
bytes encoded = 1;
}