Debian Codegraph @

monero/src/device_trezor/trezor/protob/messages-common.proto

raw
1 syntax = "proto2";
2 package hw.trezor.messages.common;
3
4 // Sugar for easier handling in Java
5 option java_package = "com.satoshilabs.trezor.lib.protobuf";
6 option java_outer_classname = "TrezorMessageCommon";
7
8 /**
9 * Response: Success of the previous request
10 * @end
11 */
12 message Success {
13 optional string message = 1; // human readable description of action or request-specific payload
14 }
15
16 /**
17 * Response: Failure of the previous request
18 * @end
19 */
20 message Failure {
21 optional FailureType code = 1; // computer-readable definition of the error state
22 optional string message = 2; // human-readable message of the error state
23 enum FailureType {
24 Failure_UnexpectedMessage = 1;
25 Failure_ButtonExpected = 2;
26 Failure_DataError = 3;
27 Failure_ActionCancelled = 4;
28 Failure_PinExpected = 5;
29 Failure_PinCancelled = 6;
30 Failure_PinInvalid = 7;
31 Failure_InvalidSignature = 8;
32 Failure_ProcessError = 9;
33 Failure_NotEnoughFunds = 10;
34 Failure_NotInitialized = 11;
35 Failure_PinMismatch = 12;
36 Failure_WipeCodeMismatch = 13;
37 Failure_FirmwareError = 99;
38 }
39 }
40
41 /**
42 * Response: Device is waiting for HW button press.
43 * @auxstart
44 * @next ButtonAck
45 */
46 message ButtonRequest {
47 optional ButtonRequestType code = 1;
48 /**
49 * Type of button request
50 */
51 enum ButtonRequestType {
52 ButtonRequest_Other = 1;
53 ButtonRequest_FeeOverThreshold = 2;
54 ButtonRequest_ConfirmOutput = 3;
55 ButtonRequest_ResetDevice = 4;
56 ButtonRequest_ConfirmWord = 5;
57 ButtonRequest_WipeDevice = 6;
58 ButtonRequest_ProtectCall = 7;
59 ButtonRequest_SignTx = 8;
60 ButtonRequest_FirmwareCheck = 9;
61 ButtonRequest_Address = 10;
62 ButtonRequest_PublicKey = 11;
63 ButtonRequest_MnemonicWordCount = 12;
64 ButtonRequest_MnemonicInput = 13;
65 _Deprecated_ButtonRequest_PassphraseType = 14 [deprecated=true];
66 ButtonRequest_UnknownDerivationPath = 15;
67 ButtonRequest_RecoveryHomepage = 16;
68 ButtonRequest_Success = 17;
69 ButtonRequest_Warning = 18;
70 ButtonRequest_PassphraseEntry = 19;
71 }
72 }
73
74 /**
75 * Request: Computer agrees to wait for HW button press
76 * @auxend
77 */
78 message ButtonAck {
79 }
80
81 /**
82 * Response: Device is asking computer to show PIN matrix and awaits PIN encoded using this matrix scheme
83 * @auxstart
84 * @next PinMatrixAck
85 */
86 message PinMatrixRequest {
87 optional PinMatrixRequestType type = 1;
88 /**
89 * Type of PIN request
90 */
91 enum PinMatrixRequestType {
92 PinMatrixRequestType_Current = 1;
93 PinMatrixRequestType_NewFirst = 2;
94 PinMatrixRequestType_NewSecond = 3;
95 PinMatrixRequestType_WipeCodeFirst = 4;
96 PinMatrixRequestType_WipeCodeSecond = 5;
97 }
98 }
99
100 /**
101 * Request: Computer responds with encoded PIN
102 * @auxend
103 */
104 message PinMatrixAck {
105 required string pin = 1; // matrix encoded PIN entered by user
106 }
107
108 /**
109 * Response: Device awaits encryption passphrase
110 * @auxstart
111 * @next PassphraseAck
112 */
113 message PassphraseRequest {
114 optional bool _on_device = 1 [deprecated=true]; // <2.3.0
115 }
116
117 /**
118 * Request: Send passphrase back
119 * @auxend
120 */
121 message PassphraseAck {
122 optional string passphrase = 1;
123 optional bytes _state = 2 [deprecated=true]; // <2.3.0
124 optional bool on_device = 3; // user wants to enter passphrase on the device
125 }
126
127 /**
128 * Response: Device awaits passphrase state
129 * Deprecated in 2.3.0
130 * @next Deprecated_PassphraseStateAck
131 */
132 message Deprecated_PassphraseStateRequest {
133 option deprecated = true;
134 optional bytes state = 1; // actual device state
135 }
136
137 /**
138 * Request: Send passphrase state back
139 * Deprecated in 2.3.0
140 * @auxend
141 */
142 message Deprecated_PassphraseStateAck {
143 option deprecated = true;
144 }
145
146 /**
147 * Structure representing BIP32 (hierarchical deterministic) node
148 * Used for imports of private key into the device and exporting public key out of device
149 * @embed
150 */
151 message HDNodeType {
152 required uint32 depth = 1;
153 required uint32 fingerprint = 2;
154 required uint32 child_num = 3;
155 required bytes chain_code = 4;
156 optional bytes private_key = 5;
157 optional bytes public_key = 6;
158 }