-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathmessages-thorchain.proto
79 lines (67 loc) · 2.27 KB
/
messages-thorchain.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
syntax = "proto2";
/**
* WARNING: Make sure Thorchain messages align with the tendermint messages
*/
// Sugar for easier handling in Java
option java_package = "com.keepkey.deviceprotocol";
option java_outer_classname = "KeepKeyMessageThorchain";
import "types.proto";
/**
* Request: Address at the specified index
* @start
* @next ThorchainAddress
*/
message ThorchainGetAddress {
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 ThorchainAddress {
optional string address = 1; // Address Bech32 encoded with 'thor' prefix (or 'tthor' for testnet)
}
/**
* Request: ask device to sign Thorchain transaction
* @start
* @next ThorchainSignedTx
*/
message ThorchainSignTx {
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 'tthor'
}
message ThorchainMsgRequest {}
message ThorchainMsgAck {
optional ThorchainMsgSend send = 1;
optional ThorchainMsgDeposit deposit = 2;
}
message ThorchainMsgSend {
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 ThorchainMsgDeposit {
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 ThorchainSignedTx {
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 Thorchain network
}