-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathmessages-tendermint.proto
128 lines (114 loc) · 4.1 KB
/
messages-tendermint.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
syntax = "proto2";
// Sugar for easier handling in Java
option java_package = "com.shapeshift.keepkey.lib.protobuf";
option java_outer_classname = "KeepKeyMessageTendermint";
import "types.proto";
/**
* Request: Address at the specified index
* @start
* @next TendermintAddress
*/
message TendermintGetAddress {
repeated uint32 address_n = 1; // BIP-32 path. For compatibility with other
// wallets, must be m/44'/148'/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
optional string address_prefix = 4; // prefix to prepend to generated address
optional string chain_name = 5; // Name of chain. Ex: cosmos
}
/**
* Response: Address for the given index
* @end
*/
message TendermintAddress {
optional string address =
1; // Address Bech32 encoded with the prefix specified in a preceding
// TendermintGetAddress message
}
/**
* Request: ask device to sign Tendermint transaction
* @start
* @next TendermintSignedTx
*/
message TendermintSignTx {
repeated uint32 address_n = 1; // BIP-32 path. For compatibility with other
// wallets, must be m/44'/118'/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 'tthor'
optional string denom =
10; // Full denomination, followed by minimum resolution denomination. Ex:
// [BTC, SAT], [ATOM, uATOM], etc.
optional uint64 decimals =
11; // Decimal precision Ex: 8 if minimum unit is 1.0e-8 coins.
optional string chain_name = 12; // Name of chain. Ex: cosmos
optional string message_type_prefix =
13; // Prefix for use in message type field. Ex "cosmos-sdk" in "{type:
// cosmos-sdk/MsgSend"
}
message TendermintMsgRequest {}
message TendermintMsgAck {
optional TendermintMsgSend send = 1;
optional TendermintMsgDelegate delegate = 2;
optional TendermintMsgUndelegate undelegate = 3;
optional TendermintMsgRedelegate redelegate = 4;
optional TendermintMsgRewards rewards = 5;
optional TendermintMsgIBCTransfer ibc_transfer = 6;
optional string denom = 7; // Name of chain. Ex: cosmos
optional string chain_name = 8; // Name of chain. Ex: cosmos
optional string message_type_prefix = 9; // Name of chain. Ex: cosmos
}
message TendermintMsgSend {
optional string from_address = 6;
optional string to_address = 7;
optional uint64 amount = 8 [jstype = JS_STRING];
optional OutputAddressType address_type = 9;
reserved 10;
}
message TendermintMsgDelegate {
optional string delegator_address = 1;
optional string validator_address = 2;
optional uint64 amount = 3 [ jstype = JS_STRING ];
}
message TendermintMsgUndelegate {
optional string delegator_address = 1;
optional string validator_address = 2;
optional uint64 amount = 3 [ jstype = JS_STRING ];
}
message TendermintMsgRedelegate {
optional string delegator_address = 1;
optional string validator_src_address = 2;
optional string validator_dst_address = 3;
optional uint64 amount = 4 [ jstype = JS_STRING ];
}
message TendermintMsgRewards {
optional string delegator_address = 1;
optional string validator_address = 2;
optional uint64 amount = 3 [ jstype = JS_STRING ];
}
message TendermintMsgIBCTransfer {
optional string receiver = 1;
optional string sender = 2;
optional string source_channel = 3;
optional string source_port = 4;
optional string revision_height = 5;
optional string revision_number = 6;
optional string denom = 7;
}
/**
* Response: signature for transaction
* @end
*/
message TendermintSignedTx {
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 Tendermint network
}