-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathmessages-mayachain.proto
86 lines (75 loc) · 2.33 KB
/
messages-mayachain.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
syntax = "proto2";
/**
* WARNING: Make sure Mayachain messages align with the tendermint messages
*/
// Sugar for easier handling in Java
option java_package = "com.keepkey.deviceprotocol";
option java_outer_classname = "KeepKeyMessageMayachain";
import "types.proto";
/**
* Request: Address at the specified index
* @start
* @next MayachainAddress
*/
message MayachainGetAddress {
repeated uint32 address_n = 1; // BIP-32 path. For compatibility with other
// wallets, must be m/44'/931'/index'
optional bool show_display =
2; // optionally show on display before sending the result
optional bool testnet =
3; // if true, return an address with the testnet prefix
}
/**
* Response: Address for the given index
* @end
*/
message MayachainAddress {
optional string address =
1; // Address Bech32 encoded with 'maya' prefix (or 'tmaya' for testnet)
}
/**
* Request: ask device to sign Mayachain transaction
* @start
* @next MayachainSignedTx
*/
message MayachainSignTx {
repeated uint32 address_n = 1; // BIP-32 path. For compatibility with other
// wallets, must be m/44'/931'/index'/0/0
optional uint64 account_number = 2 [ jstype = JS_STRING ];
optional string chain_id = 3;
optional uint32 fee_amount = 4;
optional uint32 gas = 5;
optional string memo = 6;
optional uint64 sequence = 7 [ jstype = JS_STRING ];
optional uint32 msg_count = 8;
optional bool testnet = 9; // if true, decode addresses with prefix 'tmaya'
}
message MayachainMsgRequest {}
message MayachainMsgAck {
optional MayachainMsgSend send = 1;
optional MayachainMsgDeposit deposit = 2;
}
message MayachainMsgSend {
optional string from_address = 6;
optional string to_address = 7;
optional uint64 amount = 8 [ jstype = JS_STRING ];
optional OutputAddressType address_type = 9;
reserved 10;
optional string denom = 11;
}
message MayachainMsgDeposit {
optional string asset = 1;
optional uint64 amount = 2 [ jstype = JS_STRING ];
optional string memo = 3;
optional string signer = 4;
}
/**
* Response: signature for transaction
* @end
*/
message MayachainSignedTx {
optional bytes public_key =
1; // public key for the private key used to sign data
optional bytes signature =
2; // signature suitable for sending to the Mayachain network
}