-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccount.proto
More file actions
49 lines (41 loc) · 1.04 KB
/
account.proto
File metadata and controls
49 lines (41 loc) · 1.04 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
syntax = "proto3";
package mmn;
option go_package = "github.com/mezonai/mmn/proto;proto";
message GetAccountRequest {
string address = 1;
}
message GetAccountResponse {
string address = 1;
string balance = 2;
uint64 nonce = 3;
uint32 decimals = 4; // Number of fractional digits for amount formatting
}
message TxMeta {
string sender = 1; // sender address
string recipient = 2; // recipient address
string amount = 3; // amount
uint64 nonce = 4; // nonce
uint64 timestamp = 5;
enum Status {
PENDING = 0;
CONFIRMED = 1;
FINALIZED = 2;
FAILED = 3;
}
Status status = 6;
string extra_info = 7;
}
message GetCurrentNonceRequest {
string address = 1;
string tag = 2; // "latest" or "pending"
}
message GetCurrentNonceResponse {
string address = 1;
uint64 nonce = 2;
string tag = 3;
string error = 4;
}
service AccountService {
rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
rpc GetCurrentNonce (GetCurrentNonceRequest) returns (GetCurrentNonceResponse);
}