trezor 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +42 -0
- data/.rspec +3 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/LICENSE +165 -0
- data/README.md +68 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/exe/trezor-agent +41 -0
- data/lib/net/ssh/authentication/methods/trezor.rb +25 -0
- data/lib/trezor.rb +2 -0
- data/lib/trezor/agent.rb +88 -0
- data/lib/trezor/device.rb +141 -0
- data/lib/trezor/identity.rb +102 -0
- data/lib/trezor/key_manager.rb +77 -0
- data/lib/trezor/protobuf.rb +38 -0
- data/lib/trezor/protobuf/messages.pb.rb +866 -0
- data/lib/trezor/protobuf/types.pb.rb +392 -0
- data/lib/trezor/utils.rb +6 -0
- data/lib/trezor/utils/buffer.rb +39 -0
- data/lib/trezor/version.rb +3 -0
- data/trezor.gemspec +36 -0
- metadata +254 -0
@@ -0,0 +1,866 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
##
|
4
|
+
# This file is auto-generated. DO NOT EDIT!
|
5
|
+
#
|
6
|
+
require 'protobuf'
|
7
|
+
|
8
|
+
|
9
|
+
##
|
10
|
+
# Imports
|
11
|
+
#
|
12
|
+
require_relative 'types.pb'
|
13
|
+
|
14
|
+
module Trezor
|
15
|
+
module Protobuf
|
16
|
+
::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions }
|
17
|
+
|
18
|
+
##
|
19
|
+
# Enum Classes
|
20
|
+
#
|
21
|
+
class MessageType < ::Protobuf::Enum
|
22
|
+
define :MessageType_Initialize, 0
|
23
|
+
define :MessageType_Ping, 1
|
24
|
+
define :MessageType_Success, 2
|
25
|
+
define :MessageType_Failure, 3
|
26
|
+
define :MessageType_ChangePin, 4
|
27
|
+
define :MessageType_WipeDevice, 5
|
28
|
+
define :MessageType_FirmwareErase, 6
|
29
|
+
define :MessageType_FirmwareUpload, 7
|
30
|
+
define :MessageType_FirmwareRequest, 8
|
31
|
+
define :MessageType_GetEntropy, 9
|
32
|
+
define :MessageType_Entropy, 10
|
33
|
+
define :MessageType_GetPublicKey, 11
|
34
|
+
define :MessageType_PublicKey, 12
|
35
|
+
define :MessageType_LoadDevice, 13
|
36
|
+
define :MessageType_ResetDevice, 14
|
37
|
+
define :MessageType_SignTx, 15
|
38
|
+
define :MessageType_SimpleSignTx, 16
|
39
|
+
define :MessageType_Features, 17
|
40
|
+
define :MessageType_PinMatrixRequest, 18
|
41
|
+
define :MessageType_PinMatrixAck, 19
|
42
|
+
define :MessageType_Cancel, 20
|
43
|
+
define :MessageType_TxRequest, 21
|
44
|
+
define :MessageType_TxAck, 22
|
45
|
+
define :MessageType_CipherKeyValue, 23
|
46
|
+
define :MessageType_ClearSession, 24
|
47
|
+
define :MessageType_ApplySettings, 25
|
48
|
+
define :MessageType_ButtonRequest, 26
|
49
|
+
define :MessageType_ButtonAck, 27
|
50
|
+
define :MessageType_ApplyFlags, 28
|
51
|
+
define :MessageType_GetAddress, 29
|
52
|
+
define :MessageType_Address, 30
|
53
|
+
define :MessageType_SelfTest, 32
|
54
|
+
define :MessageType_BackupDevice, 34
|
55
|
+
define :MessageType_EntropyRequest, 35
|
56
|
+
define :MessageType_EntropyAck, 36
|
57
|
+
define :MessageType_SignMessage, 38
|
58
|
+
define :MessageType_VerifyMessage, 39
|
59
|
+
define :MessageType_MessageSignature, 40
|
60
|
+
define :MessageType_PassphraseRequest, 41
|
61
|
+
define :MessageType_PassphraseAck, 42
|
62
|
+
define :MessageType_PassphraseStateRequest, 77
|
63
|
+
define :MessageType_PassphraseStateAck, 78
|
64
|
+
define :MessageType_EstimateTxSize, 43
|
65
|
+
define :MessageType_TxSize, 44
|
66
|
+
define :MessageType_RecoveryDevice, 45
|
67
|
+
define :MessageType_WordRequest, 46
|
68
|
+
define :MessageType_WordAck, 47
|
69
|
+
define :MessageType_CipheredKeyValue, 48
|
70
|
+
define :MessageType_EncryptMessage, 49
|
71
|
+
define :MessageType_EncryptedMessage, 50
|
72
|
+
define :MessageType_DecryptMessage, 51
|
73
|
+
define :MessageType_DecryptedMessage, 52
|
74
|
+
define :MessageType_SignIdentity, 53
|
75
|
+
define :MessageType_SignedIdentity, 54
|
76
|
+
define :MessageType_GetFeatures, 55
|
77
|
+
define :MessageType_EthereumGetAddress, 56
|
78
|
+
define :MessageType_EthereumAddress, 57
|
79
|
+
define :MessageType_EthereumSignTx, 58
|
80
|
+
define :MessageType_EthereumTxRequest, 59
|
81
|
+
define :MessageType_EthereumTxAck, 60
|
82
|
+
define :MessageType_GetECDHSessionKey, 61
|
83
|
+
define :MessageType_ECDHSessionKey, 62
|
84
|
+
define :MessageType_SetU2FCounter, 63
|
85
|
+
define :MessageType_EthereumSignMessage, 64
|
86
|
+
define :MessageType_EthereumVerifyMessage, 65
|
87
|
+
define :MessageType_EthereumMessageSignature, 66
|
88
|
+
define :MessageType_NEMGetAddress, 67
|
89
|
+
define :MessageType_NEMAddress, 68
|
90
|
+
define :MessageType_NEMSignTx, 69
|
91
|
+
define :MessageType_NEMSignedTx, 70
|
92
|
+
define :MessageType_CosiCommit, 71
|
93
|
+
define :MessageType_CosiCommitment, 72
|
94
|
+
define :MessageType_CosiSign, 73
|
95
|
+
define :MessageType_CosiSignature, 74
|
96
|
+
define :MessageType_NEMDecryptMessage, 75
|
97
|
+
define :MessageType_NEMDecryptedMessage, 76
|
98
|
+
define :MessageType_DebugLinkDecision, 100
|
99
|
+
define :MessageType_DebugLinkGetState, 101
|
100
|
+
define :MessageType_DebugLinkState, 102
|
101
|
+
define :MessageType_DebugLinkStop, 103
|
102
|
+
define :MessageType_DebugLinkLog, 104
|
103
|
+
define :MessageType_DebugLinkMemoryRead, 110
|
104
|
+
define :MessageType_DebugLinkMemory, 111
|
105
|
+
define :MessageType_DebugLinkMemoryWrite, 112
|
106
|
+
define :MessageType_DebugLinkFlashErase, 113
|
107
|
+
define :MessageType_LiskGetAddress, 114
|
108
|
+
define :MessageType_LiskAddress, 115
|
109
|
+
define :MessageType_LiskSignTx, 116
|
110
|
+
define :MessageType_LiskSignedTx, 117
|
111
|
+
define :MessageType_LiskGetPublicKey, 121
|
112
|
+
define :MessageType_LiskPublicKey, 122
|
113
|
+
define :MessageType_StellarGetPublicKey, 200
|
114
|
+
define :MessageType_StellarPublicKey, 201
|
115
|
+
define :MessageType_StellarSignTx, 202
|
116
|
+
define :MessageType_StellarTxOpRequest, 203
|
117
|
+
define :MessageType_StellarCreateAccountOp, 210
|
118
|
+
define :MessageType_StellarPaymentOp, 211
|
119
|
+
define :MessageType_StellarPathPaymentOp, 212
|
120
|
+
define :MessageType_StellarManageOfferOp, 213
|
121
|
+
define :MessageType_StellarCreatePassiveOfferOp, 214
|
122
|
+
define :MessageType_StellarSetOptionsOp, 215
|
123
|
+
define :MessageType_StellarChangeTrustOp, 216
|
124
|
+
define :MessageType_StellarAllowTrustOp, 217
|
125
|
+
define :MessageType_StellarAccountMergeOp, 218
|
126
|
+
define :MessageType_StellarManageDataOp, 220
|
127
|
+
define :MessageType_StellarBumpSequenceOp, 221
|
128
|
+
define :MessageType_StellarSignedTx, 230
|
129
|
+
end
|
130
|
+
|
131
|
+
|
132
|
+
##
|
133
|
+
# Message Classes
|
134
|
+
#
|
135
|
+
class Initialize < ::Protobuf::Message; end
|
136
|
+
class GetFeatures < ::Protobuf::Message; end
|
137
|
+
class Features < ::Protobuf::Message; end
|
138
|
+
class ClearSession < ::Protobuf::Message; end
|
139
|
+
class ApplySettings < ::Protobuf::Message; end
|
140
|
+
class ApplyFlags < ::Protobuf::Message; end
|
141
|
+
class ChangePin < ::Protobuf::Message; end
|
142
|
+
class Ping < ::Protobuf::Message; end
|
143
|
+
class Success < ::Protobuf::Message; end
|
144
|
+
class Failure < ::Protobuf::Message; end
|
145
|
+
class ButtonRequest < ::Protobuf::Message; end
|
146
|
+
class ButtonAck < ::Protobuf::Message; end
|
147
|
+
class PinMatrixRequest < ::Protobuf::Message; end
|
148
|
+
class PinMatrixAck < ::Protobuf::Message; end
|
149
|
+
class Cancel < ::Protobuf::Message; end
|
150
|
+
class PassphraseRequest < ::Protobuf::Message; end
|
151
|
+
class PassphraseAck < ::Protobuf::Message; end
|
152
|
+
class PassphraseStateRequest < ::Protobuf::Message; end
|
153
|
+
class PassphraseStateAck < ::Protobuf::Message; end
|
154
|
+
class GetEntropy < ::Protobuf::Message; end
|
155
|
+
class Entropy < ::Protobuf::Message; end
|
156
|
+
class GetPublicKey < ::Protobuf::Message; end
|
157
|
+
class PublicKey < ::Protobuf::Message; end
|
158
|
+
class GetAddress < ::Protobuf::Message; end
|
159
|
+
class EthereumGetAddress < ::Protobuf::Message; end
|
160
|
+
class Address < ::Protobuf::Message; end
|
161
|
+
class EthereumAddress < ::Protobuf::Message; end
|
162
|
+
class WipeDevice < ::Protobuf::Message; end
|
163
|
+
class LoadDevice < ::Protobuf::Message; end
|
164
|
+
class ResetDevice < ::Protobuf::Message; end
|
165
|
+
class BackupDevice < ::Protobuf::Message; end
|
166
|
+
class EntropyRequest < ::Protobuf::Message; end
|
167
|
+
class EntropyAck < ::Protobuf::Message; end
|
168
|
+
class RecoveryDevice < ::Protobuf::Message; end
|
169
|
+
class WordRequest < ::Protobuf::Message; end
|
170
|
+
class WordAck < ::Protobuf::Message; end
|
171
|
+
class SignMessage < ::Protobuf::Message; end
|
172
|
+
class VerifyMessage < ::Protobuf::Message; end
|
173
|
+
class MessageSignature < ::Protobuf::Message; end
|
174
|
+
class EncryptMessage < ::Protobuf::Message; end
|
175
|
+
class EncryptedMessage < ::Protobuf::Message; end
|
176
|
+
class DecryptMessage < ::Protobuf::Message; end
|
177
|
+
class DecryptedMessage < ::Protobuf::Message; end
|
178
|
+
class CipherKeyValue < ::Protobuf::Message; end
|
179
|
+
class CipheredKeyValue < ::Protobuf::Message; end
|
180
|
+
class EstimateTxSize < ::Protobuf::Message; end
|
181
|
+
class TxSize < ::Protobuf::Message; end
|
182
|
+
class SignTx < ::Protobuf::Message; end
|
183
|
+
class SimpleSignTx < ::Protobuf::Message; end
|
184
|
+
class TxRequest < ::Protobuf::Message; end
|
185
|
+
class TxAck < ::Protobuf::Message; end
|
186
|
+
class EthereumSignTx < ::Protobuf::Message; end
|
187
|
+
class EthereumTxRequest < ::Protobuf::Message; end
|
188
|
+
class EthereumTxAck < ::Protobuf::Message; end
|
189
|
+
class EthereumSignMessage < ::Protobuf::Message; end
|
190
|
+
class EthereumVerifyMessage < ::Protobuf::Message; end
|
191
|
+
class EthereumMessageSignature < ::Protobuf::Message; end
|
192
|
+
class SignIdentity < ::Protobuf::Message; end
|
193
|
+
class SignedIdentity < ::Protobuf::Message; end
|
194
|
+
class GetECDHSessionKey < ::Protobuf::Message; end
|
195
|
+
class ECDHSessionKey < ::Protobuf::Message; end
|
196
|
+
class SetU2FCounter < ::Protobuf::Message; end
|
197
|
+
class FirmwareErase < ::Protobuf::Message; end
|
198
|
+
class FirmwareRequest < ::Protobuf::Message; end
|
199
|
+
class FirmwareUpload < ::Protobuf::Message; end
|
200
|
+
class SelfTest < ::Protobuf::Message; end
|
201
|
+
class NEMGetAddress < ::Protobuf::Message; end
|
202
|
+
class NEMAddress < ::Protobuf::Message; end
|
203
|
+
class NEMSignTx < ::Protobuf::Message; end
|
204
|
+
class NEMSignedTx < ::Protobuf::Message; end
|
205
|
+
class NEMDecryptMessage < ::Protobuf::Message; end
|
206
|
+
class NEMDecryptedMessage < ::Protobuf::Message; end
|
207
|
+
class CosiCommit < ::Protobuf::Message; end
|
208
|
+
class CosiCommitment < ::Protobuf::Message; end
|
209
|
+
class CosiSign < ::Protobuf::Message; end
|
210
|
+
class CosiSignature < ::Protobuf::Message; end
|
211
|
+
class StellarGetPublicKey < ::Protobuf::Message; end
|
212
|
+
class StellarPublicKey < ::Protobuf::Message; end
|
213
|
+
class StellarSignTx < ::Protobuf::Message; end
|
214
|
+
class StellarTxOpRequest < ::Protobuf::Message; end
|
215
|
+
class StellarPaymentOp < ::Protobuf::Message; end
|
216
|
+
class StellarCreateAccountOp < ::Protobuf::Message; end
|
217
|
+
class StellarPathPaymentOp < ::Protobuf::Message; end
|
218
|
+
class StellarManageOfferOp < ::Protobuf::Message; end
|
219
|
+
class StellarCreatePassiveOfferOp < ::Protobuf::Message; end
|
220
|
+
class StellarSetOptionsOp < ::Protobuf::Message; end
|
221
|
+
class StellarChangeTrustOp < ::Protobuf::Message; end
|
222
|
+
class StellarAllowTrustOp < ::Protobuf::Message; end
|
223
|
+
class StellarAccountMergeOp < ::Protobuf::Message; end
|
224
|
+
class StellarManageDataOp < ::Protobuf::Message; end
|
225
|
+
class StellarBumpSequenceOp < ::Protobuf::Message; end
|
226
|
+
class StellarSignedTx < ::Protobuf::Message; end
|
227
|
+
class LiskGetPublicKey < ::Protobuf::Message; end
|
228
|
+
class LiskPublicKey < ::Protobuf::Message; end
|
229
|
+
class LiskGetAddress < ::Protobuf::Message; end
|
230
|
+
class LiskAddress < ::Protobuf::Message; end
|
231
|
+
class LiskSignTx < ::Protobuf::Message; end
|
232
|
+
class LiskSignedTx < ::Protobuf::Message; end
|
233
|
+
class DebugLinkDecision < ::Protobuf::Message; end
|
234
|
+
class DebugLinkGetState < ::Protobuf::Message; end
|
235
|
+
class DebugLinkState < ::Protobuf::Message; end
|
236
|
+
class DebugLinkStop < ::Protobuf::Message; end
|
237
|
+
class DebugLinkLog < ::Protobuf::Message; end
|
238
|
+
class DebugLinkMemoryRead < ::Protobuf::Message; end
|
239
|
+
class DebugLinkMemory < ::Protobuf::Message; end
|
240
|
+
class DebugLinkMemoryWrite < ::Protobuf::Message; end
|
241
|
+
class DebugLinkFlashErase < ::Protobuf::Message; end
|
242
|
+
|
243
|
+
|
244
|
+
##
|
245
|
+
# File Options
|
246
|
+
#
|
247
|
+
set_option :java_package, "com.satoshilabs.trezor.lib.protobuf"
|
248
|
+
set_option :java_outer_classname, "TrezorMessage"
|
249
|
+
|
250
|
+
|
251
|
+
##
|
252
|
+
# Message Fields
|
253
|
+
#
|
254
|
+
class Initialize
|
255
|
+
optional :bytes, :state, 1
|
256
|
+
optional :bool, :skip_passphrase, 2
|
257
|
+
end
|
258
|
+
|
259
|
+
class Features
|
260
|
+
optional :string, :vendor, 1
|
261
|
+
optional :uint32, :major_version, 2
|
262
|
+
optional :uint32, :minor_version, 3
|
263
|
+
optional :uint32, :patch_version, 4
|
264
|
+
optional :bool, :bootloader_mode, 5
|
265
|
+
optional :string, :device_id, 6
|
266
|
+
optional :bool, :pin_protection, 7
|
267
|
+
optional :bool, :passphrase_protection, 8
|
268
|
+
optional :string, :language, 9
|
269
|
+
optional :string, :label, 10
|
270
|
+
optional :bool, :initialized, 12
|
271
|
+
optional :bytes, :revision, 13
|
272
|
+
optional :bytes, :bootloader_hash, 14
|
273
|
+
optional :bool, :imported, 15
|
274
|
+
optional :bool, :pin_cached, 16
|
275
|
+
optional :bool, :passphrase_cached, 17
|
276
|
+
optional :bool, :firmware_present, 18
|
277
|
+
optional :bool, :needs_backup, 19
|
278
|
+
optional :uint32, :flags, 20
|
279
|
+
optional :string, :model, 21
|
280
|
+
optional :uint32, :fw_major, 22
|
281
|
+
optional :uint32, :fw_minor, 23
|
282
|
+
optional :uint32, :fw_patch, 24
|
283
|
+
optional :string, :fw_vendor, 25
|
284
|
+
optional :bytes, :fw_vendor_keys, 26
|
285
|
+
optional :bool, :unfinished_backup, 27
|
286
|
+
end
|
287
|
+
|
288
|
+
class ApplySettings
|
289
|
+
optional :string, :language, 1
|
290
|
+
optional :string, :label, 2
|
291
|
+
optional :bool, :use_passphrase, 3
|
292
|
+
optional :bytes, :homescreen, 4
|
293
|
+
optional ::Trezor::Protobuf::PassphraseSourceType, :passphrase_source, 5
|
294
|
+
optional :uint32, :auto_lock_delay_ms, 6
|
295
|
+
end
|
296
|
+
|
297
|
+
class ApplyFlags
|
298
|
+
optional :uint32, :flags, 1
|
299
|
+
end
|
300
|
+
|
301
|
+
class ChangePin
|
302
|
+
optional :bool, :remove, 1
|
303
|
+
end
|
304
|
+
|
305
|
+
class Ping
|
306
|
+
optional :string, :message, 1
|
307
|
+
optional :bool, :button_protection, 2
|
308
|
+
optional :bool, :pin_protection, 3
|
309
|
+
optional :bool, :passphrase_protection, 4
|
310
|
+
end
|
311
|
+
|
312
|
+
class Success
|
313
|
+
optional :string, :message, 1
|
314
|
+
end
|
315
|
+
|
316
|
+
class Failure
|
317
|
+
optional ::Trezor::Protobuf::FailureType, :code, 1
|
318
|
+
optional :string, :message, 2
|
319
|
+
end
|
320
|
+
|
321
|
+
class ButtonRequest
|
322
|
+
optional ::Trezor::Protobuf::ButtonRequestType, :code, 1
|
323
|
+
optional :string, :data, 2
|
324
|
+
end
|
325
|
+
|
326
|
+
class PinMatrixRequest
|
327
|
+
optional ::Trezor::Protobuf::PinMatrixRequestType, :type, 1
|
328
|
+
end
|
329
|
+
|
330
|
+
class PinMatrixAck
|
331
|
+
required :string, :pin, 1
|
332
|
+
end
|
333
|
+
|
334
|
+
class PassphraseRequest
|
335
|
+
optional :bool, :on_device, 1
|
336
|
+
end
|
337
|
+
|
338
|
+
class PassphraseAck
|
339
|
+
optional :string, :passphrase, 1
|
340
|
+
optional :bytes, :state, 2
|
341
|
+
end
|
342
|
+
|
343
|
+
class PassphraseStateRequest
|
344
|
+
optional :bytes, :state, 1
|
345
|
+
end
|
346
|
+
|
347
|
+
class GetEntropy
|
348
|
+
required :uint32, :size, 1
|
349
|
+
end
|
350
|
+
|
351
|
+
class Entropy
|
352
|
+
required :bytes, :entropy, 1
|
353
|
+
end
|
354
|
+
|
355
|
+
class GetPublicKey
|
356
|
+
repeated :uint32, :address_n, 1
|
357
|
+
optional :string, :ecdsa_curve_name, 2
|
358
|
+
optional :bool, :show_display, 3
|
359
|
+
optional :string, :coin_name, 4, :default => "Bitcoin"
|
360
|
+
end
|
361
|
+
|
362
|
+
class PublicKey
|
363
|
+
required ::Trezor::Protobuf::HDNodeType, :node, 1
|
364
|
+
optional :string, :xpub, 2
|
365
|
+
end
|
366
|
+
|
367
|
+
class GetAddress
|
368
|
+
repeated :uint32, :address_n, 1
|
369
|
+
optional :string, :coin_name, 2, :default => "Bitcoin"
|
370
|
+
optional :bool, :show_display, 3
|
371
|
+
optional ::Trezor::Protobuf::MultisigRedeemScriptType, :multisig, 4
|
372
|
+
optional ::Trezor::Protobuf::InputScriptType, :script_type, 5, :default => ::Trezor::Protobuf::InputScriptType::SPENDADDRESS
|
373
|
+
end
|
374
|
+
|
375
|
+
class EthereumGetAddress
|
376
|
+
repeated :uint32, :address_n, 1
|
377
|
+
optional :bool, :show_display, 2
|
378
|
+
end
|
379
|
+
|
380
|
+
class Address
|
381
|
+
required :string, :address, 1
|
382
|
+
end
|
383
|
+
|
384
|
+
class EthereumAddress
|
385
|
+
required :bytes, :address, 1
|
386
|
+
end
|
387
|
+
|
388
|
+
class LoadDevice
|
389
|
+
optional :string, :mnemonic, 1
|
390
|
+
optional ::Trezor::Protobuf::HDNodeType, :node, 2
|
391
|
+
optional :string, :pin, 3
|
392
|
+
optional :bool, :passphrase_protection, 4
|
393
|
+
optional :string, :language, 5, :default => "english"
|
394
|
+
optional :string, :label, 6
|
395
|
+
optional :bool, :skip_checksum, 7
|
396
|
+
optional :uint32, :u2f_counter, 8
|
397
|
+
end
|
398
|
+
|
399
|
+
class ResetDevice
|
400
|
+
optional :bool, :display_random, 1
|
401
|
+
optional :uint32, :strength, 2, :default => 256
|
402
|
+
optional :bool, :passphrase_protection, 3
|
403
|
+
optional :bool, :pin_protection, 4
|
404
|
+
optional :string, :language, 5, :default => "english"
|
405
|
+
optional :string, :label, 6
|
406
|
+
optional :uint32, :u2f_counter, 7
|
407
|
+
optional :bool, :skip_backup, 8
|
408
|
+
end
|
409
|
+
|
410
|
+
class EntropyAck
|
411
|
+
optional :bytes, :entropy, 1
|
412
|
+
end
|
413
|
+
|
414
|
+
class RecoveryDevice
|
415
|
+
optional :uint32, :word_count, 1
|
416
|
+
optional :bool, :passphrase_protection, 2
|
417
|
+
optional :bool, :pin_protection, 3
|
418
|
+
optional :string, :language, 4, :default => "english"
|
419
|
+
optional :string, :label, 5
|
420
|
+
optional :bool, :enforce_wordlist, 6
|
421
|
+
optional :uint32, :type, 8
|
422
|
+
optional :uint32, :u2f_counter, 9
|
423
|
+
optional :bool, :dry_run, 10
|
424
|
+
end
|
425
|
+
|
426
|
+
class WordRequest
|
427
|
+
optional ::Trezor::Protobuf::WordRequestType, :type, 1
|
428
|
+
end
|
429
|
+
|
430
|
+
class WordAck
|
431
|
+
required :string, :word, 1
|
432
|
+
end
|
433
|
+
|
434
|
+
class SignMessage
|
435
|
+
repeated :uint32, :address_n, 1
|
436
|
+
required :bytes, :message, 2
|
437
|
+
optional :string, :coin_name, 3, :default => "Bitcoin"
|
438
|
+
optional ::Trezor::Protobuf::InputScriptType, :script_type, 4, :default => ::Trezor::Protobuf::InputScriptType::SPENDADDRESS
|
439
|
+
end
|
440
|
+
|
441
|
+
class VerifyMessage
|
442
|
+
optional :string, :address, 1
|
443
|
+
optional :bytes, :signature, 2
|
444
|
+
optional :bytes, :message, 3
|
445
|
+
optional :string, :coin_name, 4, :default => "Bitcoin"
|
446
|
+
end
|
447
|
+
|
448
|
+
class MessageSignature
|
449
|
+
optional :string, :address, 1
|
450
|
+
optional :bytes, :signature, 2
|
451
|
+
end
|
452
|
+
|
453
|
+
class EncryptMessage
|
454
|
+
optional :bytes, :pubkey, 1
|
455
|
+
optional :bytes, :message, 2
|
456
|
+
optional :bool, :display_only, 3
|
457
|
+
repeated :uint32, :address_n, 4
|
458
|
+
optional :string, :coin_name, 5, :default => "Bitcoin"
|
459
|
+
end
|
460
|
+
|
461
|
+
class EncryptedMessage
|
462
|
+
optional :bytes, :nonce, 1
|
463
|
+
optional :bytes, :message, 2
|
464
|
+
optional :bytes, :hmac, 3
|
465
|
+
end
|
466
|
+
|
467
|
+
class DecryptMessage
|
468
|
+
repeated :uint32, :address_n, 1
|
469
|
+
optional :bytes, :nonce, 2
|
470
|
+
optional :bytes, :message, 3
|
471
|
+
optional :bytes, :hmac, 4
|
472
|
+
end
|
473
|
+
|
474
|
+
class DecryptedMessage
|
475
|
+
optional :bytes, :message, 1
|
476
|
+
optional :string, :address, 2
|
477
|
+
end
|
478
|
+
|
479
|
+
class CipherKeyValue
|
480
|
+
repeated :uint32, :address_n, 1
|
481
|
+
optional :string, :key, 2
|
482
|
+
optional :bytes, :value, 3
|
483
|
+
optional :bool, :encrypt, 4
|
484
|
+
optional :bool, :ask_on_encrypt, 5
|
485
|
+
optional :bool, :ask_on_decrypt, 6
|
486
|
+
optional :bytes, :iv, 7
|
487
|
+
end
|
488
|
+
|
489
|
+
class CipheredKeyValue
|
490
|
+
optional :bytes, :value, 1
|
491
|
+
end
|
492
|
+
|
493
|
+
class EstimateTxSize
|
494
|
+
required :uint32, :outputs_count, 1
|
495
|
+
required :uint32, :inputs_count, 2
|
496
|
+
optional :string, :coin_name, 3, :default => "Bitcoin"
|
497
|
+
end
|
498
|
+
|
499
|
+
class TxSize
|
500
|
+
optional :uint32, :tx_size, 1
|
501
|
+
end
|
502
|
+
|
503
|
+
class SignTx
|
504
|
+
required :uint32, :outputs_count, 1
|
505
|
+
required :uint32, :inputs_count, 2
|
506
|
+
optional :string, :coin_name, 3, :default => "Bitcoin"
|
507
|
+
optional :uint32, :version, 4, :default => 1
|
508
|
+
optional :uint32, :lock_time, 5, :default => 0
|
509
|
+
optional :uint32, :decred_expiry, 6
|
510
|
+
end
|
511
|
+
|
512
|
+
class SimpleSignTx
|
513
|
+
repeated ::Trezor::Protobuf::TxInputType, :inputs, 1
|
514
|
+
repeated ::Trezor::Protobuf::TxOutputType, :outputs, 2
|
515
|
+
repeated ::Trezor::Protobuf::TransactionType, :transactions, 3
|
516
|
+
optional :string, :coin_name, 4, :default => "Bitcoin"
|
517
|
+
optional :uint32, :version, 5, :default => 1
|
518
|
+
optional :uint32, :lock_time, 6, :default => 0
|
519
|
+
end
|
520
|
+
|
521
|
+
class TxRequest
|
522
|
+
optional ::Trezor::Protobuf::RequestType, :request_type, 1
|
523
|
+
optional ::Trezor::Protobuf::TxRequestDetailsType, :details, 2
|
524
|
+
optional ::Trezor::Protobuf::TxRequestSerializedType, :serialized, 3
|
525
|
+
end
|
526
|
+
|
527
|
+
class TxAck
|
528
|
+
optional ::Trezor::Protobuf::TransactionType, :tx, 1
|
529
|
+
end
|
530
|
+
|
531
|
+
class EthereumSignTx
|
532
|
+
repeated :uint32, :address_n, 1
|
533
|
+
optional :bytes, :nonce, 2
|
534
|
+
optional :bytes, :gas_price, 3
|
535
|
+
optional :bytes, :gas_limit, 4
|
536
|
+
optional :bytes, :to, 5
|
537
|
+
optional :bytes, :value, 6
|
538
|
+
optional :bytes, :data_initial_chunk, 7
|
539
|
+
optional :uint32, :data_length, 8
|
540
|
+
optional :uint32, :chain_id, 9
|
541
|
+
optional :uint32, :tx_type, 10
|
542
|
+
end
|
543
|
+
|
544
|
+
class EthereumTxRequest
|
545
|
+
optional :uint32, :data_length, 1
|
546
|
+
optional :uint32, :signature_v, 2
|
547
|
+
optional :bytes, :signature_r, 3
|
548
|
+
optional :bytes, :signature_s, 4
|
549
|
+
end
|
550
|
+
|
551
|
+
class EthereumTxAck
|
552
|
+
optional :bytes, :data_chunk, 1
|
553
|
+
end
|
554
|
+
|
555
|
+
class EthereumSignMessage
|
556
|
+
repeated :uint32, :address_n, 1
|
557
|
+
required :bytes, :message, 2
|
558
|
+
end
|
559
|
+
|
560
|
+
class EthereumVerifyMessage
|
561
|
+
optional :bytes, :address, 1
|
562
|
+
optional :bytes, :signature, 2
|
563
|
+
optional :bytes, :message, 3
|
564
|
+
end
|
565
|
+
|
566
|
+
class EthereumMessageSignature
|
567
|
+
optional :bytes, :address, 1
|
568
|
+
optional :bytes, :signature, 2
|
569
|
+
end
|
570
|
+
|
571
|
+
class SignIdentity
|
572
|
+
optional ::Trezor::Protobuf::IdentityType, :identity, 1
|
573
|
+
optional :bytes, :challenge_hidden, 2
|
574
|
+
optional :string, :challenge_visual, 3
|
575
|
+
optional :string, :ecdsa_curve_name, 4
|
576
|
+
end
|
577
|
+
|
578
|
+
class SignedIdentity
|
579
|
+
optional :string, :address, 1
|
580
|
+
optional :bytes, :public_key, 2
|
581
|
+
optional :bytes, :signature, 3
|
582
|
+
end
|
583
|
+
|
584
|
+
class GetECDHSessionKey
|
585
|
+
optional ::Trezor::Protobuf::IdentityType, :identity, 1
|
586
|
+
optional :bytes, :peer_public_key, 2
|
587
|
+
optional :string, :ecdsa_curve_name, 3
|
588
|
+
end
|
589
|
+
|
590
|
+
class ECDHSessionKey
|
591
|
+
optional :bytes, :session_key, 1
|
592
|
+
end
|
593
|
+
|
594
|
+
class SetU2FCounter
|
595
|
+
optional :uint32, :u2f_counter, 1
|
596
|
+
end
|
597
|
+
|
598
|
+
class FirmwareErase
|
599
|
+
optional :uint32, :length, 1
|
600
|
+
end
|
601
|
+
|
602
|
+
class FirmwareRequest
|
603
|
+
optional :uint32, :offset, 1
|
604
|
+
optional :uint32, :length, 2
|
605
|
+
end
|
606
|
+
|
607
|
+
class FirmwareUpload
|
608
|
+
required :bytes, :payload, 1
|
609
|
+
optional :bytes, :hash, 2
|
610
|
+
end
|
611
|
+
|
612
|
+
class SelfTest
|
613
|
+
optional :bytes, :payload, 1
|
614
|
+
end
|
615
|
+
|
616
|
+
class NEMGetAddress
|
617
|
+
repeated :uint32, :address_n, 1
|
618
|
+
optional :uint32, :network, 2
|
619
|
+
optional :bool, :show_display, 3
|
620
|
+
end
|
621
|
+
|
622
|
+
class NEMAddress
|
623
|
+
required :string, :address, 1
|
624
|
+
end
|
625
|
+
|
626
|
+
class NEMSignTx
|
627
|
+
optional ::Trezor::Protobuf::NEMTransactionCommon, :transaction, 1
|
628
|
+
optional ::Trezor::Protobuf::NEMTransactionCommon, :multisig, 2
|
629
|
+
optional ::Trezor::Protobuf::NEMTransfer, :transfer, 3
|
630
|
+
optional :bool, :cosigning, 4
|
631
|
+
optional ::Trezor::Protobuf::NEMProvisionNamespace, :provision_namespace, 5
|
632
|
+
optional ::Trezor::Protobuf::NEMMosaicCreation, :mosaic_creation, 6
|
633
|
+
optional ::Trezor::Protobuf::NEMMosaicSupplyChange, :supply_change, 7
|
634
|
+
optional ::Trezor::Protobuf::NEMAggregateModification, :aggregate_modification, 8
|
635
|
+
optional ::Trezor::Protobuf::NEMImportanceTransfer, :importance_transfer, 9
|
636
|
+
end
|
637
|
+
|
638
|
+
class NEMSignedTx
|
639
|
+
optional :bytes, :data, 1
|
640
|
+
optional :bytes, :signature, 2
|
641
|
+
end
|
642
|
+
|
643
|
+
class NEMDecryptMessage
|
644
|
+
repeated :uint32, :address_n, 1
|
645
|
+
optional :uint32, :network, 2
|
646
|
+
optional :bytes, :public_key, 3
|
647
|
+
optional :bytes, :payload, 4
|
648
|
+
end
|
649
|
+
|
650
|
+
class NEMDecryptedMessage
|
651
|
+
optional :bytes, :payload, 1
|
652
|
+
end
|
653
|
+
|
654
|
+
class CosiCommit
|
655
|
+
repeated :uint32, :address_n, 1
|
656
|
+
optional :bytes, :data, 2
|
657
|
+
end
|
658
|
+
|
659
|
+
class CosiCommitment
|
660
|
+
optional :bytes, :commitment, 1
|
661
|
+
optional :bytes, :pubkey, 2
|
662
|
+
end
|
663
|
+
|
664
|
+
class CosiSign
|
665
|
+
repeated :uint32, :address_n, 1
|
666
|
+
optional :bytes, :data, 2
|
667
|
+
optional :bytes, :global_commitment, 3
|
668
|
+
optional :bytes, :global_pubkey, 4
|
669
|
+
end
|
670
|
+
|
671
|
+
class CosiSignature
|
672
|
+
optional :bytes, :signature, 1
|
673
|
+
end
|
674
|
+
|
675
|
+
class StellarGetPublicKey
|
676
|
+
repeated :uint32, :address_n, 1
|
677
|
+
end
|
678
|
+
|
679
|
+
class StellarPublicKey
|
680
|
+
optional :bytes, :public_key, 1
|
681
|
+
end
|
682
|
+
|
683
|
+
class StellarSignTx
|
684
|
+
optional :uint32, :protocol_version, 1
|
685
|
+
repeated :uint32, :address_n, 2
|
686
|
+
optional :string, :network_passphrase, 3
|
687
|
+
optional :bytes, :source_account, 4
|
688
|
+
optional :uint32, :fee, 5
|
689
|
+
optional :uint64, :sequence_number, 6
|
690
|
+
optional :uint32, :timebounds_start, 8
|
691
|
+
optional :uint32, :timebounds_end, 9
|
692
|
+
optional :uint32, :memo_type, 10
|
693
|
+
optional :string, :memo_text, 11
|
694
|
+
optional :uint64, :memo_id, 12
|
695
|
+
optional :bytes, :memo_hash, 13
|
696
|
+
optional :uint32, :num_operations, 14
|
697
|
+
end
|
698
|
+
|
699
|
+
class StellarPaymentOp
|
700
|
+
optional :bytes, :source_account, 1
|
701
|
+
optional :bytes, :destination_account, 2
|
702
|
+
optional ::Trezor::Protobuf::StellarAssetType, :asset, 3
|
703
|
+
optional :sint64, :amount, 4
|
704
|
+
end
|
705
|
+
|
706
|
+
class StellarCreateAccountOp
|
707
|
+
optional :bytes, :source_account, 1
|
708
|
+
optional :bytes, :new_account, 2
|
709
|
+
optional :sint64, :starting_balance, 3
|
710
|
+
end
|
711
|
+
|
712
|
+
class StellarPathPaymentOp
|
713
|
+
optional :bytes, :source_account, 1
|
714
|
+
optional ::Trezor::Protobuf::StellarAssetType, :send_asset, 2
|
715
|
+
optional :sint64, :send_max, 3
|
716
|
+
optional :bytes, :destination_account, 4
|
717
|
+
optional ::Trezor::Protobuf::StellarAssetType, :destination_asset, 5
|
718
|
+
optional :sint64, :destination_amount, 6
|
719
|
+
repeated ::Trezor::Protobuf::StellarAssetType, :paths, 7
|
720
|
+
end
|
721
|
+
|
722
|
+
class StellarManageOfferOp
|
723
|
+
optional :bytes, :source_account, 1
|
724
|
+
optional ::Trezor::Protobuf::StellarAssetType, :selling_asset, 2
|
725
|
+
optional ::Trezor::Protobuf::StellarAssetType, :buying_asset, 3
|
726
|
+
optional :sint64, :amount, 4
|
727
|
+
optional :uint32, :price_n, 5
|
728
|
+
optional :uint32, :price_d, 6
|
729
|
+
optional :uint64, :offer_id, 7
|
730
|
+
end
|
731
|
+
|
732
|
+
class StellarCreatePassiveOfferOp
|
733
|
+
optional :bytes, :source_account, 1
|
734
|
+
optional ::Trezor::Protobuf::StellarAssetType, :selling_asset, 2
|
735
|
+
optional ::Trezor::Protobuf::StellarAssetType, :buying_asset, 3
|
736
|
+
optional :sint64, :amount, 4
|
737
|
+
optional :uint32, :price_n, 5
|
738
|
+
optional :uint32, :price_d, 6
|
739
|
+
end
|
740
|
+
|
741
|
+
class StellarSetOptionsOp
|
742
|
+
optional :bytes, :source_account, 1
|
743
|
+
optional :bytes, :inflation_destination_account, 2
|
744
|
+
optional :uint32, :clear_flags, 3
|
745
|
+
optional :uint32, :set_flags, 4
|
746
|
+
optional :uint32, :master_weight, 5
|
747
|
+
optional :uint32, :low_threshold, 6
|
748
|
+
optional :uint32, :medium_threshold, 7
|
749
|
+
optional :uint32, :high_threshold, 8
|
750
|
+
optional :string, :home_domain, 9
|
751
|
+
optional :uint32, :signer_type, 10
|
752
|
+
optional :bytes, :signer_key, 11
|
753
|
+
optional :uint32, :signer_weight, 12
|
754
|
+
end
|
755
|
+
|
756
|
+
class StellarChangeTrustOp
|
757
|
+
optional :bytes, :source_account, 1
|
758
|
+
optional ::Trezor::Protobuf::StellarAssetType, :asset, 2
|
759
|
+
optional :uint64, :limit, 3
|
760
|
+
end
|
761
|
+
|
762
|
+
class StellarAllowTrustOp
|
763
|
+
optional :bytes, :source_account, 1
|
764
|
+
optional :bytes, :trusted_account, 2
|
765
|
+
optional :uint32, :asset_type, 3
|
766
|
+
optional :string, :asset_code, 4
|
767
|
+
optional :uint32, :is_authorized, 5
|
768
|
+
end
|
769
|
+
|
770
|
+
class StellarAccountMergeOp
|
771
|
+
optional :bytes, :source_account, 1
|
772
|
+
optional :bytes, :destination_account, 2
|
773
|
+
end
|
774
|
+
|
775
|
+
class StellarManageDataOp
|
776
|
+
optional :bytes, :source_account, 1
|
777
|
+
optional :string, :key, 2
|
778
|
+
optional :bytes, :value, 3
|
779
|
+
end
|
780
|
+
|
781
|
+
class StellarBumpSequenceOp
|
782
|
+
optional :bytes, :source_account, 1
|
783
|
+
optional :uint64, :bump_to, 2
|
784
|
+
end
|
785
|
+
|
786
|
+
class StellarSignedTx
|
787
|
+
optional :bytes, :public_key, 1
|
788
|
+
optional :bytes, :signature, 2
|
789
|
+
end
|
790
|
+
|
791
|
+
class LiskGetPublicKey
|
792
|
+
repeated :uint32, :address_n, 1
|
793
|
+
optional :bool, :show_display, 2
|
794
|
+
end
|
795
|
+
|
796
|
+
class LiskPublicKey
|
797
|
+
optional :bytes, :public_key, 1
|
798
|
+
end
|
799
|
+
|
800
|
+
class LiskGetAddress
|
801
|
+
repeated :uint32, :address_n, 1
|
802
|
+
optional :bool, :show_display, 2
|
803
|
+
end
|
804
|
+
|
805
|
+
class LiskAddress
|
806
|
+
optional :string, :address, 1
|
807
|
+
end
|
808
|
+
|
809
|
+
class LiskSignTx
|
810
|
+
repeated :uint32, :address_n, 1
|
811
|
+
optional ::Trezor::Protobuf::LiskTransactionCommon, :transaction, 2
|
812
|
+
end
|
813
|
+
|
814
|
+
class LiskSignedTx
|
815
|
+
optional :bytes, :signature, 1
|
816
|
+
end
|
817
|
+
|
818
|
+
class DebugLinkDecision
|
819
|
+
optional :bool, :yes_no, 1
|
820
|
+
optional :bool, :up_down, 2
|
821
|
+
optional :string, :input, 3
|
822
|
+
end
|
823
|
+
|
824
|
+
class DebugLinkState
|
825
|
+
optional :bytes, :layout, 1
|
826
|
+
optional :string, :pin, 2
|
827
|
+
optional :string, :matrix, 3
|
828
|
+
optional :string, :mnemonic, 4
|
829
|
+
optional ::Trezor::Protobuf::HDNodeType, :node, 5
|
830
|
+
optional :bool, :passphrase_protection, 6
|
831
|
+
optional :string, :reset_word, 7
|
832
|
+
optional :bytes, :reset_entropy, 8
|
833
|
+
optional :string, :recovery_fake_word, 9
|
834
|
+
optional :uint32, :recovery_word_pos, 10
|
835
|
+
optional :uint32, :reset_word_pos, 11
|
836
|
+
end
|
837
|
+
|
838
|
+
class DebugLinkLog
|
839
|
+
optional :uint32, :level, 1
|
840
|
+
optional :string, :bucket, 2
|
841
|
+
optional :string, :text, 3
|
842
|
+
end
|
843
|
+
|
844
|
+
class DebugLinkMemoryRead
|
845
|
+
optional :uint32, :address, 1
|
846
|
+
optional :uint32, :length, 2
|
847
|
+
end
|
848
|
+
|
849
|
+
class DebugLinkMemory
|
850
|
+
optional :bytes, :memory, 1
|
851
|
+
end
|
852
|
+
|
853
|
+
class DebugLinkMemoryWrite
|
854
|
+
optional :uint32, :address, 1
|
855
|
+
optional :bytes, :memory, 2
|
856
|
+
optional :bool, :flash, 3
|
857
|
+
end
|
858
|
+
|
859
|
+
class DebugLinkFlashErase
|
860
|
+
optional :uint32, :sector, 1
|
861
|
+
end
|
862
|
+
|
863
|
+
end
|
864
|
+
|
865
|
+
end
|
866
|
+
|