@onekeyfe/hd-transport 1.2.0-alpha.4 → 1.2.0-alpha.40

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.
Files changed (68) hide show
  1. package/__tests__/messages.test.js +187 -0
  2. package/__tests__/protocol-v2-ble-frame-writer.test.js +119 -0
  3. package/__tests__/protocol-v2-link-manager.test.js +437 -0
  4. package/__tests__/protocol-v2-usb-transport-base.test.js +330 -0
  5. package/__tests__/protocol-v2.test.js +465 -56
  6. package/__tests__/transport-log.test.js +79 -0
  7. package/dist/constants.d.ts +4 -1
  8. package/dist/constants.d.ts.map +1 -1
  9. package/dist/index.d.ts +790 -198
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +820 -227
  12. package/dist/protocols/index.d.ts +14 -5
  13. package/dist/protocols/index.d.ts.map +1 -1
  14. package/dist/protocols/v2/ble-frame-writer.d.ts +15 -0
  15. package/dist/protocols/v2/ble-frame-writer.d.ts.map +1 -0
  16. package/dist/protocols/v2/constants.d.ts +1 -0
  17. package/dist/protocols/v2/constants.d.ts.map +1 -1
  18. package/dist/protocols/v2/decode.d.ts +13 -2
  19. package/dist/protocols/v2/decode.d.ts.map +1 -1
  20. package/dist/protocols/v2/encode.d.ts +2 -3
  21. package/dist/protocols/v2/encode.d.ts.map +1 -1
  22. package/dist/protocols/v2/errors.d.ts +8 -0
  23. package/dist/protocols/v2/errors.d.ts.map +1 -0
  24. package/dist/protocols/v2/frame-assembler.d.ts.map +1 -1
  25. package/dist/protocols/v2/index.d.ts +2 -1
  26. package/dist/protocols/v2/index.d.ts.map +1 -1
  27. package/dist/protocols/v2/link-manager.d.ts +39 -0
  28. package/dist/protocols/v2/link-manager.d.ts.map +1 -0
  29. package/dist/protocols/v2/sequence-cursor.d.ts +5 -0
  30. package/dist/protocols/v2/sequence-cursor.d.ts.map +1 -0
  31. package/dist/protocols/v2/session.d.ts +19 -5
  32. package/dist/protocols/v2/session.d.ts.map +1 -1
  33. package/dist/protocols/v2/usb-transport-base.d.ts +32 -0
  34. package/dist/protocols/v2/usb-transport-base.d.ts.map +1 -0
  35. package/dist/serialization/protobuf/decode.d.ts.map +1 -1
  36. package/dist/types/messages.d.ts +380 -110
  37. package/dist/types/messages.d.ts.map +1 -1
  38. package/dist/types/transport.d.ts +14 -3
  39. package/dist/types/transport.d.ts.map +1 -1
  40. package/dist/utils/transportLog.d.ts +9 -0
  41. package/dist/utils/transportLog.d.ts.map +1 -0
  42. package/messages-protocol-v2.json +1161 -477
  43. package/package.json +3 -3
  44. package/scripts/protobuf-build.sh +86 -208
  45. package/scripts/protobuf-patches/index.js +1 -0
  46. package/scripts/protobuf-types.js +19 -1
  47. package/src/constants.ts +28 -14
  48. package/src/index.ts +12 -1
  49. package/src/protocols/index.ts +39 -40
  50. package/src/protocols/v2/ble-frame-writer.ts +77 -0
  51. package/src/protocols/v2/constants.ts +1 -0
  52. package/src/protocols/v2/crc8.ts +1 -1
  53. package/src/protocols/v2/decode.ts +71 -37
  54. package/src/protocols/v2/encode.ts +2 -28
  55. package/src/protocols/v2/errors.ts +25 -0
  56. package/src/protocols/v2/frame-assembler.ts +6 -4
  57. package/src/protocols/v2/index.ts +2 -1
  58. package/src/protocols/v2/link-manager.ts +209 -0
  59. package/src/protocols/v2/sequence-cursor.ts +10 -0
  60. package/src/protocols/v2/session.ts +157 -200
  61. package/src/protocols/v2/usb-transport-base.ts +213 -0
  62. package/src/serialization/protobuf/decode.ts +4 -1
  63. package/src/types/messages.ts +464 -142
  64. package/src/types/transport.ts +14 -3
  65. package/src/utils/transportLog.ts +102 -0
  66. package/dist/protocols/v2/debug.d.ts +0 -13
  67. package/dist/protocols/v2/debug.d.ts.map +0 -1
  68. package/src/protocols/v2/debug.ts +0 -26
@@ -79,8 +79,6 @@
79
79
  "MessageType_ResetDevice": 14,
80
80
  "MessageType_SetBusy": 16,
81
81
  "MessageType_Features": 17,
82
- "MessageType_PinMatrixRequest": 18,
83
- "MessageType_PinMatrixAck": 19,
84
82
  "MessageType_Cancel": 20,
85
83
  "MessageType_LockDevice": 24,
86
84
  "MessageType_ApplySettings": 25,
@@ -142,20 +140,6 @@
142
140
  "MessageType_CosiSignature": 74,
143
141
  "MessageType_BatchGetPublickeys": 10016,
144
142
  "MessageType_EcdsaPublicKeys": 10017,
145
- "MessageType_DebugLinkDecision": 100,
146
- "MessageType_DebugLinkGetState": 101,
147
- "MessageType_DebugLinkState": 102,
148
- "MessageType_DebugLinkStop": 103,
149
- "MessageType_DebugLinkLog": 104,
150
- "MessageType_DebugLinkMemoryRead": 110,
151
- "MessageType_DebugLinkMemory": 111,
152
- "MessageType_DebugLinkMemoryWrite": 112,
153
- "MessageType_DebugLinkFlashErase": 113,
154
- "MessageType_DebugLinkLayout": 9001,
155
- "MessageType_DebugLinkReseedRandom": 9002,
156
- "MessageType_DebugLinkRecordScreen": 9003,
157
- "MessageType_DebugLinkEraseSdCard": 9005,
158
- "MessageType_DebugLinkWatchLayout": 9006,
159
143
  "MessageType_EthereumGetPublicKey": 450,
160
144
  "MessageType_EthereumPublicKey": 451,
161
145
  "MessageType_EthereumGetAddress": 56,
@@ -195,6 +179,7 @@
195
179
  "MessageType_EthereumGnosisSafeTxAck": 20118,
196
180
  "MessageType_EthereumGnosisSafeTxRequest": 20119,
197
181
  "MessageType_EthereumSignTxEIP7702OneKey": 20120,
182
+ "MessageType_EthereumSignTypedDataQR": 20121,
198
183
  "MessageType_NEMGetAddress": 67,
199
184
  "MessageType_NEMAddress": 68,
200
185
  "MessageType_NEMSignTx": 69,
@@ -418,13 +403,6 @@
418
403
  "MessageType_TonSignProof": 11905,
419
404
  "MessageType_TonSignedProof": 11906,
420
405
  "MessageType_TonTxAck": 11907,
421
- "MessageType_ScdoGetAddress": 12001,
422
- "MessageType_ScdoAddress": 12002,
423
- "MessageType_ScdoSignTx": 12003,
424
- "MessageType_ScdoSignedTx": 12004,
425
- "MessageType_ScdoTxAck": 12005,
426
- "MessageType_ScdoSignMessage": 12006,
427
- "MessageType_ScdoSignedMessage": 12007,
428
406
  "MessageType_AlephiumGetAddress": 12101,
429
407
  "MessageType_AlephiumAddress": 12102,
430
408
  "MessageType_AlephiumSignTx": 12103,
@@ -447,11 +425,6 @@
447
425
  "MessageType_NeoAddress": 12302,
448
426
  "MessageType_NeoSignTx": 12303,
449
427
  "MessageType_NeoSignedTx": 12304,
450
- "MessageType_UiviewShowAddressRequest": 30200,
451
- "MessageType_UiviewShowPublicKeyRequest": 30201,
452
- "MessageType_UiviewConfirmTxRequest": 30202,
453
- "MessageType_UiviewConfirmSignMessageRequest": 30203,
454
- "MessageType_UiviewResponse": 30204,
455
428
  "MessageType_DeviceFactoryInfoSet": 60000,
456
429
  "MessageType_DeviceFactoryInfoGet": 60001,
457
430
  "MessageType_DeviceFactoryInfo": 60002,
@@ -466,16 +439,17 @@
466
439
  "MessageType_DeviceSettings": 60410,
467
440
  "MessageType_DeviceSettingsGet": 60411,
468
441
  "MessageType_DeviceSettingsSet": 60412,
442
+ "MessageType_DeviceSettingsPageShow": 60413,
469
443
  "MessageType_DeviceCertificate": 60420,
470
444
  "MessageType_DeviceCertificateWrite": 60421,
471
445
  "MessageType_DeviceCertificateRead": 60422,
472
446
  "MessageType_DeviceCertificateSignature": 60423,
473
447
  "MessageType_DeviceCertificateSign": 60424,
474
- "MessageType_SetWallpaper": 60430,
475
- "MessageType_GetWallpaper": 60431,
476
- "MessageType_Wallpaper": 60432,
448
+ "MessageType_DeviceMiscUsbMscControl": 60440,
477
449
  "MessageType_DeviceInfoGet": 60600,
478
450
  "MessageType_DeviceInfo": 60601,
451
+ "MessageType_DeviceStatusGet": 60602,
452
+ "MessageType_DeviceStatus": 60603,
479
453
  "MessageType_FilesystemPermissionFix": 60800,
480
454
  "MessageType_FilesystemPathInfo": 60801,
481
455
  "MessageType_FilesystemPathInfoQuery": 60802,
@@ -490,7 +464,15 @@
490
464
  "MessageType_FilesystemFormat": 60811,
491
465
  "MessageType_DeviceFirmwareUpdateRequest": 61000,
492
466
  "MessageType_DeviceFirmwareUpdateStatusGet": 61001,
493
- "MessageType_DeviceFirmwareUpdateStatus": 61002
467
+ "MessageType_DeviceFirmwareUpdateStatus": 61002,
468
+ "MessageType_DeviceSessionGet": 61200,
469
+ "MessageType_DeviceSession": 61201,
470
+ "MessageType_DeviceSessionAskPin": 61202,
471
+ "MessageType_DeviceSessionAskPassphrase": 61203,
472
+ "MessageType_PortfolioUpdate": 61400,
473
+ "MessageType_NftUpdate": 61500,
474
+ "MessageType_OnboardingStatusGet": 61600,
475
+ "MessageType_OnboardingStatus": 61601
494
476
  },
495
477
  "reserved": [
496
478
  [90, 92],
@@ -5393,6 +5375,37 @@
5393
5375
  }
5394
5376
  }
5395
5377
  },
5378
+ "EthereumSignTypedDataQR": {
5379
+ "fields": {
5380
+ "address_n": {
5381
+ "rule": "repeated",
5382
+ "type": "uint32",
5383
+ "id": 1,
5384
+ "options": {
5385
+ "packed": false
5386
+ }
5387
+ },
5388
+ "json_data": {
5389
+ "type": "bytes",
5390
+ "id": 2
5391
+ },
5392
+ "chain_id": {
5393
+ "type": "uint64",
5394
+ "id": 3
5395
+ },
5396
+ "metamask_v4_compat": {
5397
+ "type": "bool",
5398
+ "id": 4,
5399
+ "options": {
5400
+ "default": true
5401
+ }
5402
+ },
5403
+ "request_id": {
5404
+ "type": "bytes",
5405
+ "id": 5
5406
+ }
5407
+ }
5408
+ },
5396
5409
  "EthereumGetPublicKeyOneKey": {
5397
5410
  "fields": {
5398
5411
  "address_n": {
@@ -5918,30 +5931,6 @@
5918
5931
  }
5919
5932
  }
5920
5933
  },
5921
- "InternalMyAddressRequest": {
5922
- "fields": {
5923
- "coin_type": {
5924
- "rule": "required",
5925
- "type": "uint32",
5926
- "id": 1
5927
- },
5928
- "chain_id": {
5929
- "rule": "required",
5930
- "type": "uint32",
5931
- "id": 2
5932
- },
5933
- "account_index": {
5934
- "rule": "required",
5935
- "type": "uint32",
5936
- "id": 3
5937
- },
5938
- "derive_type": {
5939
- "rule": "required",
5940
- "type": "uint32",
5941
- "id": 4
5942
- }
5943
- }
5944
- },
5945
5934
  "KaspaGetAddress": {
5946
5935
  "fields": {
5947
5936
  "address_n": {
@@ -6119,7 +6108,7 @@
6119
6108
  "PromptTemporarily": 2
6120
6109
  }
6121
6110
  },
6122
- "StartSession": {
6111
+ "Initialize": {
6123
6112
  "fields": {
6124
6113
  "session_id": {
6125
6114
  "type": "bytes",
@@ -6135,10 +6124,21 @@
6135
6124
  "derive_cardano": {
6136
6125
  "type": "bool",
6137
6126
  "id": 3
6127
+ },
6128
+ "passphrase_state": {
6129
+ "type": "string",
6130
+ "id": 8000
6131
+ },
6132
+ "is_contains_attach": {
6133
+ "type": "bool",
6134
+ "id": 8001
6138
6135
  }
6139
6136
  }
6140
6137
  },
6141
- "EndSession": {
6138
+ "GetFeatures": {
6139
+ "fields": {}
6140
+ },
6141
+ "OnekeyGetFeatures": {
6142
6142
  "fields": {}
6143
6143
  },
6144
6144
  "OneKeyDeviceType": {
@@ -6162,220 +6162,602 @@
6162
6162
  "APP": 1
6163
6163
  }
6164
6164
  },
6165
- "OnekeyFeatures": {
6165
+ "Features": {
6166
6166
  "fields": {
6167
- "onekey_device_type": {
6168
- "type": "OneKeyDeviceType",
6167
+ "vendor": {
6168
+ "type": "string",
6169
6169
  "id": 1
6170
6170
  },
6171
- "onekey_romloader_version": {
6172
- "type": "string",
6171
+ "major_version": {
6172
+ "rule": "required",
6173
+ "type": "uint32",
6173
6174
  "id": 2
6174
6175
  },
6175
- "onekey_bootloader_version": {
6176
- "type": "string",
6176
+ "minor_version": {
6177
+ "rule": "required",
6178
+ "type": "uint32",
6177
6179
  "id": 3
6178
6180
  },
6179
- "onekey_firmware_version": {
6180
- "type": "string",
6181
+ "patch_version": {
6182
+ "rule": "required",
6183
+ "type": "uint32",
6181
6184
  "id": 4
6182
6185
  },
6183
- "onekey_romloader_hash": {
6184
- "type": "bytes",
6186
+ "bootloader_mode": {
6187
+ "type": "bool",
6185
6188
  "id": 5
6186
6189
  },
6187
- "onekey_bootloader_hash": {
6188
- "type": "bytes",
6190
+ "device_id": {
6191
+ "type": "string",
6189
6192
  "id": 6
6190
6193
  },
6191
- "onekey_firmware_hash": {
6192
- "type": "bytes",
6194
+ "pin_protection": {
6195
+ "type": "bool",
6193
6196
  "id": 7
6194
6197
  },
6195
- "onekey_romloader_build_id": {
6196
- "type": "string",
6198
+ "passphrase_protection": {
6199
+ "type": "bool",
6197
6200
  "id": 8
6198
6201
  },
6199
- "onekey_bootloader_build_id": {
6202
+ "language": {
6200
6203
  "type": "string",
6201
6204
  "id": 9
6202
6205
  },
6203
- "onekey_firmware_build_id": {
6206
+ "label": {
6204
6207
  "type": "string",
6205
6208
  "id": 10
6206
6209
  },
6207
- "onekey_serial_no": {
6208
- "type": "string",
6209
- "id": 11
6210
- },
6211
- "onekey_coprocessor_bt_name": {
6212
- "type": "string",
6210
+ "initialized": {
6211
+ "type": "bool",
6213
6212
  "id": 12
6214
6213
  },
6215
- "onekey_coprocessor_version": {
6216
- "type": "string",
6214
+ "revision": {
6215
+ "type": "bytes",
6217
6216
  "id": 13
6218
6217
  },
6219
- "onekey_coprocessor_build_id": {
6220
- "type": "string",
6218
+ "bootloader_hash": {
6219
+ "type": "bytes",
6221
6220
  "id": 14
6222
6221
  },
6223
- "onekey_coprocessor_hash": {
6224
- "type": "bytes",
6222
+ "imported": {
6223
+ "type": "bool",
6225
6224
  "id": 15
6226
6225
  },
6227
- "onekey_se_type": {
6228
- "type": "OneKeySeType",
6226
+ "unlocked": {
6227
+ "type": "bool",
6229
6228
  "id": 16
6230
6229
  },
6231
- "onekey_se01_state": {
6232
- "type": "OneKeySEState",
6233
- "id": 17
6230
+ "_passphrase_cached": {
6231
+ "type": "bool",
6232
+ "id": 17,
6233
+ "options": {
6234
+ "deprecated": true
6235
+ }
6234
6236
  },
6235
- "onekey_se02_state": {
6236
- "type": "OneKeySEState",
6237
+ "firmware_present": {
6238
+ "type": "bool",
6237
6239
  "id": 18
6238
6240
  },
6239
- "onekey_se03_state": {
6240
- "type": "OneKeySEState",
6241
+ "needs_backup": {
6242
+ "type": "bool",
6241
6243
  "id": 19
6242
6244
  },
6243
- "onekey_se04_state": {
6244
- "type": "OneKeySEState",
6245
+ "flags": {
6246
+ "type": "uint32",
6245
6247
  "id": 20
6246
6248
  },
6247
- "onekey_se01_version": {
6249
+ "model": {
6248
6250
  "type": "string",
6249
6251
  "id": 21
6250
6252
  },
6251
- "onekey_se02_version": {
6252
- "type": "string",
6253
+ "fw_major": {
6254
+ "type": "uint32",
6253
6255
  "id": 22
6254
6256
  },
6255
- "onekey_se03_version": {
6256
- "type": "string",
6257
+ "fw_minor": {
6258
+ "type": "uint32",
6257
6259
  "id": 23
6258
6260
  },
6259
- "onekey_se04_version": {
6260
- "type": "string",
6261
+ "fw_patch": {
6262
+ "type": "uint32",
6261
6263
  "id": 24
6262
6264
  },
6263
- "onekey_se01_hash": {
6264
- "type": "bytes",
6265
+ "fw_vendor": {
6266
+ "type": "string",
6265
6267
  "id": 25
6266
6268
  },
6267
- "onekey_se02_hash": {
6268
- "type": "bytes",
6269
- "id": 26
6270
- },
6271
- "onekey_se03_hash": {
6272
- "type": "bytes",
6269
+ "unfinished_backup": {
6270
+ "type": "bool",
6273
6271
  "id": 27
6274
6272
  },
6275
- "onekey_se04_hash": {
6276
- "type": "bytes",
6273
+ "no_backup": {
6274
+ "type": "bool",
6277
6275
  "id": 28
6278
6276
  },
6279
- "onekey_se01_build_id": {
6280
- "type": "string",
6277
+ "recovery_mode": {
6278
+ "type": "bool",
6281
6279
  "id": 29
6282
6280
  },
6283
- "onekey_se02_build_id": {
6284
- "type": "string",
6285
- "id": 30
6281
+ "capabilities": {
6282
+ "rule": "repeated",
6283
+ "type": "Capability",
6284
+ "id": 30,
6285
+ "options": {
6286
+ "packed": false
6287
+ }
6286
6288
  },
6287
- "onekey_se03_build_id": {
6288
- "type": "string",
6289
+ "backup_type": {
6290
+ "type": "BackupType",
6289
6291
  "id": 31
6290
6292
  },
6291
- "onekey_se04_build_id": {
6292
- "type": "string",
6293
+ "sd_card_present": {
6294
+ "type": "bool",
6293
6295
  "id": 32
6294
6296
  },
6295
- "onekey_se01_bootloader_version": {
6296
- "type": "string",
6297
+ "sd_protection": {
6298
+ "type": "bool",
6297
6299
  "id": 33
6298
6300
  },
6299
- "onekey_se02_bootloader_version": {
6300
- "type": "string",
6301
+ "wipe_code_protection": {
6302
+ "type": "bool",
6301
6303
  "id": 34
6302
6304
  },
6303
- "onekey_se03_bootloader_version": {
6304
- "type": "string",
6305
+ "session_id": {
6306
+ "type": "bytes",
6305
6307
  "id": 35
6306
6308
  },
6307
- "onekey_se04_bootloader_version": {
6308
- "type": "string",
6309
+ "passphrase_always_on_device": {
6310
+ "type": "bool",
6309
6311
  "id": 36
6310
6312
  },
6311
- "onekey_se01_bootloader_hash": {
6312
- "type": "bytes",
6313
+ "safety_checks": {
6314
+ "type": "SafetyCheckLevel",
6313
6315
  "id": 37
6314
6316
  },
6315
- "onekey_se02_bootloader_hash": {
6316
- "type": "bytes",
6317
+ "auto_lock_delay_ms": {
6318
+ "type": "uint32",
6317
6319
  "id": 38
6318
6320
  },
6319
- "onekey_se03_bootloader_hash": {
6320
- "type": "bytes",
6321
+ "display_rotation": {
6322
+ "type": "uint32",
6321
6323
  "id": 39
6322
6324
  },
6323
- "onekey_se04_bootloader_hash": {
6324
- "type": "bytes",
6325
+ "experimental_features": {
6326
+ "type": "bool",
6325
6327
  "id": 40
6326
6328
  },
6327
- "onekey_se01_bootloader_build_id": {
6329
+ "offset": {
6330
+ "type": "uint32",
6331
+ "id": 500
6332
+ },
6333
+ "coprocessor_bt_name": {
6328
6334
  "type": "string",
6329
- "id": 41
6335
+ "id": 501
6330
6336
  },
6331
- "onekey_se02_bootloader_build_id": {
6337
+ "coprocessor_version": {
6332
6338
  "type": "string",
6333
- "id": 42
6339
+ "id": 502
6334
6340
  },
6335
- "onekey_se03_bootloader_build_id": {
6341
+ "coprocessor_bt_enable": {
6342
+ "type": "bool",
6343
+ "id": 503
6344
+ },
6345
+ "se_enable": {
6346
+ "type": "bool",
6347
+ "id": 504
6348
+ },
6349
+ "se_ver": {
6336
6350
  "type": "string",
6337
- "id": 43
6351
+ "id": 506
6338
6352
  },
6339
- "onekey_se04_bootloader_build_id": {
6353
+ "backup_only": {
6354
+ "type": "bool",
6355
+ "id": 507
6356
+ },
6357
+ "onekey_version": {
6340
6358
  "type": "string",
6341
- "id": 44
6342
- }
6343
- }
6344
- },
6345
- "LockDevice": {
6346
- "fields": {}
6347
- },
6348
- "SetBusy": {
6349
- "fields": {
6350
- "expiry_ms": {
6351
- "type": "uint32",
6352
- "id": 1
6353
- }
6354
- }
6355
- },
6356
- "ApplySettings": {
6357
- "fields": {
6358
- "language": {
6359
+ "id": 508
6360
+ },
6361
+ "onekey_serial": {
6359
6362
  "type": "string",
6360
- "id": 1
6363
+ "id": 509
6361
6364
  },
6362
- "label": {
6365
+ "bootloader_version": {
6363
6366
  "type": "string",
6364
- "id": 2
6367
+ "id": 510
6365
6368
  },
6366
- "use_passphrase": {
6367
- "type": "bool",
6368
- "id": 3
6369
+ "serial_no": {
6370
+ "type": "string",
6371
+ "id": 511
6369
6372
  },
6370
- "homescreen": {
6371
- "type": "bytes",
6372
- "id": 4
6373
+ "spi_flash": {
6374
+ "type": "string",
6375
+ "id": 512
6373
6376
  },
6374
- "_passphrase_source": {
6377
+ "initstates": {
6375
6378
  "type": "uint32",
6376
- "id": 5,
6377
- "options": {
6378
- "deprecated": true
6379
+ "id": 513
6380
+ },
6381
+ "NFT_voucher": {
6382
+ "type": "bytes",
6383
+ "id": 514
6384
+ },
6385
+ "cpu_info": {
6386
+ "type": "string",
6387
+ "id": 515
6388
+ },
6389
+ "pre_firmware": {
6390
+ "type": "string",
6391
+ "id": 516
6392
+ },
6393
+ "coin_switch": {
6394
+ "type": "uint32",
6395
+ "id": 517
6396
+ },
6397
+ "build_id": {
6398
+ "type": "bytes",
6399
+ "id": 518
6400
+ },
6401
+ "romloader_version": {
6402
+ "type": "string",
6403
+ "id": 519
6404
+ },
6405
+ "busy": {
6406
+ "type": "bool",
6407
+ "id": 41
6408
+ },
6409
+ "onekey_device_type": {
6410
+ "type": "OneKeyDeviceType",
6411
+ "id": 600
6412
+ },
6413
+ "onekey_se_type": {
6414
+ "type": "OneKeySeType",
6415
+ "id": 601
6416
+ },
6417
+ "onekey_romloader_version": {
6418
+ "type": "string",
6419
+ "id": 602
6420
+ },
6421
+ "onekey_romloader_hash": {
6422
+ "type": "bytes",
6423
+ "id": 603
6424
+ },
6425
+ "onekey_bootloader_version": {
6426
+ "type": "string",
6427
+ "id": 604
6428
+ },
6429
+ "onekey_bootloader_hash": {
6430
+ "type": "bytes",
6431
+ "id": 605
6432
+ },
6433
+ "onekey_se01_version": {
6434
+ "type": "string",
6435
+ "id": 606
6436
+ },
6437
+ "onekey_se01_hash": {
6438
+ "type": "bytes",
6439
+ "id": 607
6440
+ },
6441
+ "onekey_se01_build_id": {
6442
+ "type": "string",
6443
+ "id": 608
6444
+ },
6445
+ "onekey_firmware_version": {
6446
+ "type": "string",
6447
+ "id": 609
6448
+ },
6449
+ "onekey_firmware_hash": {
6450
+ "type": "bytes",
6451
+ "id": 610
6452
+ },
6453
+ "onekey_firmware_build_id": {
6454
+ "type": "string",
6455
+ "id": 611
6456
+ },
6457
+ "onekey_serial_no": {
6458
+ "type": "string",
6459
+ "id": 612
6460
+ },
6461
+ "onekey_bootloader_build_id": {
6462
+ "type": "string",
6463
+ "id": 613
6464
+ },
6465
+ "onekey_coprocessor_bt_name": {
6466
+ "type": "string",
6467
+ "id": 614
6468
+ },
6469
+ "onekey_coprocessor_version": {
6470
+ "type": "string",
6471
+ "id": 615
6472
+ },
6473
+ "onekey_coprocessor_build_id": {
6474
+ "type": "string",
6475
+ "id": 616
6476
+ },
6477
+ "onekey_coprocessor_hash": {
6478
+ "type": "bytes",
6479
+ "id": 617
6480
+ },
6481
+ "onekey_se02_version": {
6482
+ "type": "string",
6483
+ "id": 618
6484
+ },
6485
+ "onekey_se03_version": {
6486
+ "type": "string",
6487
+ "id": 619
6488
+ },
6489
+ "onekey_se04_version": {
6490
+ "type": "string",
6491
+ "id": 620
6492
+ },
6493
+ "onekey_se01_state": {
6494
+ "type": "OneKeySEState",
6495
+ "id": 621
6496
+ },
6497
+ "onekey_se02_state": {
6498
+ "type": "OneKeySEState",
6499
+ "id": 622
6500
+ },
6501
+ "onekey_se03_state": {
6502
+ "type": "OneKeySEState",
6503
+ "id": 623
6504
+ },
6505
+ "onekey_se04_state": {
6506
+ "type": "OneKeySEState",
6507
+ "id": 624
6508
+ },
6509
+ "attach_to_pin_user": {
6510
+ "type": "bool",
6511
+ "id": 625
6512
+ },
6513
+ "unlocked_attach_pin": {
6514
+ "type": "bool",
6515
+ "id": 626
6516
+ }
6517
+ },
6518
+ "nested": {
6519
+ "Capability": {
6520
+ "options": {
6521
+ "(has_bitcoin_only_values)": true
6522
+ },
6523
+ "values": {
6524
+ "Capability_Bitcoin": 1,
6525
+ "Capability_Bitcoin_like": 2,
6526
+ "Capability_Binance": 3,
6527
+ "Capability_Cardano": 4,
6528
+ "Capability_Crypto": 5,
6529
+ "Capability_EOS": 6,
6530
+ "Capability_Ethereum": 7,
6531
+ "Capability_Lisk": 8,
6532
+ "Capability_Monero": 9,
6533
+ "Capability_NEM": 10,
6534
+ "Capability_Ripple": 11,
6535
+ "Capability_Stellar": 12,
6536
+ "Capability_Tezos": 13,
6537
+ "Capability_U2F": 14,
6538
+ "Capability_Shamir": 15,
6539
+ "Capability_ShamirGroups": 16,
6540
+ "Capability_PassphraseEntry": 17,
6541
+ "Capability_AttachToPin": 18,
6542
+ "Capability_EthereumTypedData": 1000
6543
+ }
6544
+ }
6545
+ }
6546
+ },
6547
+ "OnekeyFeatures": {
6548
+ "fields": {
6549
+ "onekey_device_type": {
6550
+ "type": "OneKeyDeviceType",
6551
+ "id": 1
6552
+ },
6553
+ "onekey_romloader_version": {
6554
+ "type": "string",
6555
+ "id": 2
6556
+ },
6557
+ "onekey_bootloader_version": {
6558
+ "type": "string",
6559
+ "id": 3
6560
+ },
6561
+ "onekey_firmware_version": {
6562
+ "type": "string",
6563
+ "id": 4
6564
+ },
6565
+ "onekey_romloader_hash": {
6566
+ "type": "bytes",
6567
+ "id": 5
6568
+ },
6569
+ "onekey_bootloader_hash": {
6570
+ "type": "bytes",
6571
+ "id": 6
6572
+ },
6573
+ "onekey_firmware_hash": {
6574
+ "type": "bytes",
6575
+ "id": 7
6576
+ },
6577
+ "onekey_romloader_build_id": {
6578
+ "type": "string",
6579
+ "id": 8
6580
+ },
6581
+ "onekey_bootloader_build_id": {
6582
+ "type": "string",
6583
+ "id": 9
6584
+ },
6585
+ "onekey_firmware_build_id": {
6586
+ "type": "string",
6587
+ "id": 10
6588
+ },
6589
+ "onekey_serial_no": {
6590
+ "type": "string",
6591
+ "id": 11
6592
+ },
6593
+ "onekey_coprocessor_bt_name": {
6594
+ "type": "string",
6595
+ "id": 12
6596
+ },
6597
+ "onekey_coprocessor_version": {
6598
+ "type": "string",
6599
+ "id": 13
6600
+ },
6601
+ "onekey_coprocessor_build_id": {
6602
+ "type": "string",
6603
+ "id": 14
6604
+ },
6605
+ "onekey_coprocessor_hash": {
6606
+ "type": "bytes",
6607
+ "id": 15
6608
+ },
6609
+ "onekey_se_type": {
6610
+ "type": "OneKeySeType",
6611
+ "id": 16
6612
+ },
6613
+ "onekey_se01_state": {
6614
+ "type": "OneKeySEState",
6615
+ "id": 17
6616
+ },
6617
+ "onekey_se02_state": {
6618
+ "type": "OneKeySEState",
6619
+ "id": 18
6620
+ },
6621
+ "onekey_se03_state": {
6622
+ "type": "OneKeySEState",
6623
+ "id": 19
6624
+ },
6625
+ "onekey_se04_state": {
6626
+ "type": "OneKeySEState",
6627
+ "id": 20
6628
+ },
6629
+ "onekey_se01_version": {
6630
+ "type": "string",
6631
+ "id": 21
6632
+ },
6633
+ "onekey_se02_version": {
6634
+ "type": "string",
6635
+ "id": 22
6636
+ },
6637
+ "onekey_se03_version": {
6638
+ "type": "string",
6639
+ "id": 23
6640
+ },
6641
+ "onekey_se04_version": {
6642
+ "type": "string",
6643
+ "id": 24
6644
+ },
6645
+ "onekey_se01_hash": {
6646
+ "type": "bytes",
6647
+ "id": 25
6648
+ },
6649
+ "onekey_se02_hash": {
6650
+ "type": "bytes",
6651
+ "id": 26
6652
+ },
6653
+ "onekey_se03_hash": {
6654
+ "type": "bytes",
6655
+ "id": 27
6656
+ },
6657
+ "onekey_se04_hash": {
6658
+ "type": "bytes",
6659
+ "id": 28
6660
+ },
6661
+ "onekey_se01_build_id": {
6662
+ "type": "string",
6663
+ "id": 29
6664
+ },
6665
+ "onekey_se02_build_id": {
6666
+ "type": "string",
6667
+ "id": 30
6668
+ },
6669
+ "onekey_se03_build_id": {
6670
+ "type": "string",
6671
+ "id": 31
6672
+ },
6673
+ "onekey_se04_build_id": {
6674
+ "type": "string",
6675
+ "id": 32
6676
+ },
6677
+ "onekey_se01_bootloader_version": {
6678
+ "type": "string",
6679
+ "id": 33
6680
+ },
6681
+ "onekey_se02_bootloader_version": {
6682
+ "type": "string",
6683
+ "id": 34
6684
+ },
6685
+ "onekey_se03_bootloader_version": {
6686
+ "type": "string",
6687
+ "id": 35
6688
+ },
6689
+ "onekey_se04_bootloader_version": {
6690
+ "type": "string",
6691
+ "id": 36
6692
+ },
6693
+ "onekey_se01_bootloader_hash": {
6694
+ "type": "bytes",
6695
+ "id": 37
6696
+ },
6697
+ "onekey_se02_bootloader_hash": {
6698
+ "type": "bytes",
6699
+ "id": 38
6700
+ },
6701
+ "onekey_se03_bootloader_hash": {
6702
+ "type": "bytes",
6703
+ "id": 39
6704
+ },
6705
+ "onekey_se04_bootloader_hash": {
6706
+ "type": "bytes",
6707
+ "id": 40
6708
+ },
6709
+ "onekey_se01_bootloader_build_id": {
6710
+ "type": "string",
6711
+ "id": 41
6712
+ },
6713
+ "onekey_se02_bootloader_build_id": {
6714
+ "type": "string",
6715
+ "id": 42
6716
+ },
6717
+ "onekey_se03_bootloader_build_id": {
6718
+ "type": "string",
6719
+ "id": 43
6720
+ },
6721
+ "onekey_se04_bootloader_build_id": {
6722
+ "type": "string",
6723
+ "id": 44
6724
+ }
6725
+ }
6726
+ },
6727
+ "LockDevice": {
6728
+ "fields": {}
6729
+ },
6730
+ "SetBusy": {
6731
+ "fields": {
6732
+ "expiry_ms": {
6733
+ "type": "uint32",
6734
+ "id": 1
6735
+ }
6736
+ }
6737
+ },
6738
+ "ApplySettings": {
6739
+ "fields": {
6740
+ "language": {
6741
+ "type": "string",
6742
+ "id": 1
6743
+ },
6744
+ "label": {
6745
+ "type": "string",
6746
+ "id": 2
6747
+ },
6748
+ "use_passphrase": {
6749
+ "type": "bool",
6750
+ "id": 3
6751
+ },
6752
+ "homescreen": {
6753
+ "type": "bytes",
6754
+ "id": 4
6755
+ },
6756
+ "_passphrase_source": {
6757
+ "type": "uint32",
6758
+ "id": 5,
6759
+ "options": {
6760
+ "deprecated": true
6379
6761
  }
6380
6762
  },
6381
6763
  "auto_lock_delay_ms": {
@@ -6875,49 +7257,6 @@
6875
7257
  }
6876
7258
  }
6877
7259
  },
6878
- "WallpaperTarget": {
6879
- "values": {
6880
- "Home": 0,
6881
- "Lock": 1
6882
- }
6883
- },
6884
- "SetWallpaper": {
6885
- "fields": {
6886
- "target": {
6887
- "rule": "required",
6888
- "type": "WallpaperTarget",
6889
- "id": 1
6890
- },
6891
- "path": {
6892
- "rule": "required",
6893
- "type": "string",
6894
- "id": 2
6895
- }
6896
- }
6897
- },
6898
- "GetWallpaper": {
6899
- "fields": {
6900
- "target": {
6901
- "rule": "required",
6902
- "type": "WallpaperTarget",
6903
- "id": 1
6904
- }
6905
- }
6906
- },
6907
- "Wallpaper": {
6908
- "fields": {
6909
- "target": {
6910
- "rule": "required",
6911
- "type": "WallpaperTarget",
6912
- "id": 1
6913
- },
6914
- "path": {
6915
- "rule": "required",
6916
- "type": "string",
6917
- "id": 2
6918
- }
6919
- }
6920
- },
6921
7260
  "ResourceUpdate": {
6922
7261
  "fields": {
6923
7262
  "file_name": {
@@ -7004,14 +7343,6 @@
7004
7343
  "passphrase_state": {
7005
7344
  "type": "string",
7006
7345
  "id": 1
7007
- },
7008
- "_only_main_pin": {
7009
- "type": "bool",
7010
- "id": 2
7011
- },
7012
- "allow_create_attach_pin": {
7013
- "type": "bool",
7014
- "id": 3
7015
7346
  }
7016
7347
  }
7017
7348
  },
@@ -11057,105 +11388,30 @@
11057
11388
  }
11058
11389
  }
11059
11390
  },
11060
- "ViewAmount": {
11061
- "fields": {
11062
- "is_unlimited": {
11063
- "rule": "required",
11064
- "type": "bool",
11065
- "id": 1
11066
- },
11067
- "num": {
11068
- "rule": "required",
11069
- "type": "string",
11070
- "id": 2
11071
- }
11072
- }
11073
- },
11074
- "ViewDetail": {
11075
- "fields": {
11076
- "key": {
11077
- "rule": "required",
11078
- "type": "uint32",
11079
- "id": 1
11080
- },
11081
- "value": {
11082
- "rule": "required",
11083
- "type": "string",
11084
- "id": 2
11085
- },
11086
- "is_overview": {
11087
- "rule": "required",
11088
- "type": "bool",
11089
- "id": 3
11090
- },
11091
- "has_icon": {
11092
- "rule": "required",
11093
- "type": "bool",
11094
- "id": 4
11095
- }
11096
- }
11097
- },
11098
- "ViewTipType": {
11391
+ "UiAnimationType": {
11099
11392
  "values": {
11100
- "Default": 0,
11101
- "Highlight": 1,
11102
- "Recommend": 2,
11103
- "Warning": 3,
11104
- "Danger": 4
11105
- }
11106
- },
11107
- "ViewTip": {
11108
- "fields": {
11109
- "type": {
11110
- "rule": "required",
11111
- "type": "ViewTipType",
11112
- "id": 1
11113
- },
11114
- "text": {
11115
- "rule": "required",
11116
- "type": "string",
11117
- "id": 2
11118
- }
11393
+ "Unknown": 0,
11394
+ "Signing": 1
11119
11395
  }
11120
11396
  },
11121
- "ViewSignPage": {
11122
- "fields": {
11123
- "title": {
11124
- "rule": "required",
11125
- "type": "string",
11126
- "id": 1
11127
- },
11128
- "amount": {
11129
- "type": "ViewAmount",
11130
- "id": 2
11131
- },
11132
- "general": {
11133
- "rule": "repeated",
11134
- "type": "ViewDetail",
11135
- "id": 3
11136
- },
11137
- "tip": {
11138
- "type": "ViewTip",
11139
- "id": 4
11140
- }
11397
+ "UiAnimationCommand": {
11398
+ "values": {
11399
+ "CommandUnknown": 0,
11400
+ "Start": 1,
11401
+ "Stop": 2,
11402
+ "Refresh": 3
11141
11403
  }
11142
11404
  },
11143
- "ViewVerifyPage": {
11405
+ "UiAnimationRequest": {
11144
11406
  "fields": {
11145
- "title": {
11407
+ "command": {
11146
11408
  "rule": "required",
11147
- "type": "string",
11409
+ "type": "UiAnimationCommand",
11148
11410
  "id": 1
11149
11411
  },
11150
- "address": {
11151
- "rule": "required",
11152
- "type": "string",
11412
+ "type": {
11413
+ "type": "UiAnimationType",
11153
11414
  "id": 2
11154
- },
11155
- "path": {
11156
- "rule": "required",
11157
- "type": "string",
11158
- "id": 3
11159
11415
  }
11160
11416
  }
11161
11417
  },
@@ -11242,7 +11498,15 @@
11242
11498
  }
11243
11499
  },
11244
11500
  "ProtocolInfoRequest": {
11245
- "fields": {}
11501
+ "fields": {
11502
+ "eventless_wallet_session": {
11503
+ "type": "bool",
11504
+ "id": 1,
11505
+ "options": {
11506
+ "default": false
11507
+ }
11508
+ }
11509
+ }
11246
11510
  },
11247
11511
  "ProtocolInfo": {
11248
11512
  "fields": {
@@ -11251,17 +11515,18 @@
11251
11515
  "type": "uint32",
11252
11516
  "id": 1
11253
11517
  },
11518
+ "build_fingerprint": {
11519
+ "rule": "required",
11520
+ "type": "string",
11521
+ "id": 2
11522
+ },
11254
11523
  "supported_messages": {
11255
11524
  "rule": "repeated",
11256
11525
  "type": "uint32",
11257
- "id": 2,
11526
+ "id": 3,
11258
11527
  "options": {
11259
11528
  "packed": false
11260
11529
  }
11261
- },
11262
- "protobuf_definition": {
11263
- "type": "string",
11264
- "id": 3
11265
11530
  }
11266
11531
  }
11267
11532
  },
@@ -11296,66 +11561,153 @@
11296
11561
  },
11297
11562
  "subcode": {
11298
11563
  "type": "uint32",
11299
- "id": 2
11564
+ "id": 2
11565
+ },
11566
+ "message": {
11567
+ "type": "string",
11568
+ "id": 3
11569
+ }
11570
+ },
11571
+ "nested": {
11572
+ "FailureType": {
11573
+ "values": {
11574
+ "Failure_InvalidMessage": 1,
11575
+ "Failure_UndefinedError": 2,
11576
+ "Failure_UsageError": 3,
11577
+ "Failure_DataError": 4,
11578
+ "Failure_ProcessError": 5
11579
+ }
11580
+ }
11581
+ }
11582
+ },
11583
+ "DeviceErrorCode": {
11584
+ "values": {
11585
+ "DeviceError_None": 0,
11586
+ "DeviceError_Busy": 1,
11587
+ "DeviceError_NotInitialized": 2,
11588
+ "DeviceError_ActionCancelled": 3,
11589
+ "DeviceError_PinAlreadyUsed": 4,
11590
+ "DeviceError_PersistFailed": 5,
11591
+ "DeviceError_SeError": 6,
11592
+ "DeviceError_InvalidLanguage": 7,
11593
+ "DeviceError_WallpaperNotUsable": 8,
11594
+ "DeviceError_DeviceLocked": 9
11595
+ }
11596
+ },
11597
+ "DeviceRebootType": {
11598
+ "values": {
11599
+ "Normal": 0,
11600
+ "Romloader": 1,
11601
+ "Bootloader": 2
11602
+ }
11603
+ },
11604
+ "DeviceReboot": {
11605
+ "fields": {
11606
+ "reboot_type": {
11607
+ "rule": "required",
11608
+ "type": "DeviceRebootType",
11609
+ "id": 1
11610
+ }
11611
+ }
11612
+ },
11613
+ "DeviceSettings": {
11614
+ "fields": {
11615
+ "bt_enable": {
11616
+ "type": "bool",
11617
+ "id": 1
11618
+ },
11619
+ "language": {
11620
+ "type": "string",
11621
+ "id": 2
11622
+ },
11623
+ "wallpaper_path": {
11624
+ "type": "string",
11625
+ "id": 3
11626
+ },
11627
+ "brightness": {
11628
+ "type": "uint32",
11629
+ "id": 4
11630
+ },
11631
+ "animation_enable": {
11632
+ "type": "bool",
11633
+ "id": 5
11634
+ },
11635
+ "tap_to_wake": {
11636
+ "type": "bool",
11637
+ "id": 6
11638
+ },
11639
+ "haptic_feedback": {
11640
+ "type": "bool",
11641
+ "id": 7
11642
+ },
11643
+ "device_name_display_enabled": {
11644
+ "type": "bool",
11645
+ "id": 8
11646
+ },
11647
+ "airgap_mode": {
11648
+ "type": "bool",
11649
+ "id": 9
11650
+ },
11651
+ "usb_lock_enable": {
11652
+ "type": "bool",
11653
+ "id": 10
11654
+ },
11655
+ "random_keypad": {
11656
+ "type": "bool",
11657
+ "id": 11
11658
+ },
11659
+ "passphrase_enable": {
11660
+ "type": "bool",
11661
+ "id": 100
11662
+ },
11663
+ "fido_enabled": {
11664
+ "type": "bool",
11665
+ "id": 101
11666
+ },
11667
+ "autolock_delay_ms": {
11668
+ "type": "uint32",
11669
+ "id": 102
11670
+ },
11671
+ "autoshutdown_delay_ms": {
11672
+ "type": "uint32",
11673
+ "id": 103
11300
11674
  },
11301
- "message": {
11675
+ "label": {
11302
11676
  "type": "string",
11303
- "id": 3
11304
- }
11305
- },
11306
- "nested": {
11307
- "FailureType": {
11308
- "values": {
11309
- "Failure_InvalidMessage": 1,
11310
- "Failure_UndefinedError": 2,
11311
- "Failure_UsageError": 3,
11312
- "Failure_DataError": 4,
11313
- "Failure_ProcessError": 5
11314
- }
11677
+ "id": 104
11315
11678
  }
11316
11679
  }
11317
11680
  },
11318
- "DeviceRebootType": {
11319
- "values": {
11320
- "Normal": 0,
11321
- "Romloader": 1,
11322
- "Bootloader": 2
11323
- }
11681
+ "DeviceSettingsGet": {
11682
+ "fields": {}
11324
11683
  },
11325
- "DeviceReboot": {
11684
+ "DeviceSettingsSet": {
11326
11685
  "fields": {
11327
- "reboot_type": {
11686
+ "settings": {
11328
11687
  "rule": "required",
11329
- "type": "DeviceRebootType",
11688
+ "type": "DeviceSettings",
11330
11689
  "id": 1
11331
11690
  }
11332
11691
  }
11333
11692
  },
11334
- "DeviceSettings": {
11335
- "fields": {
11336
- "label": {
11337
- "type": "string",
11338
- "id": 1
11339
- },
11340
- "bt_enable": {
11341
- "type": "bool",
11342
- "id": 2
11343
- },
11344
- "language": {
11345
- "type": "string",
11346
- "id": 3
11347
- }
11693
+ "DeviceSettingsPage": {
11694
+ "values": {
11695
+ "DeviceReset": 0,
11696
+ "DevicePinChange": 1,
11697
+ "DevicePassphrase": 2,
11698
+ "DeviceAirgap": 3
11348
11699
  }
11349
11700
  },
11350
- "DeviceSettingsGet": {
11351
- "fields": {}
11352
- },
11353
- "DeviceSettingsSet": {
11701
+ "DeviceSettingsPageShow": {
11354
11702
  "fields": {
11355
- "settings": {
11703
+ "page": {
11356
11704
  "rule": "required",
11357
- "type": "DeviceSettings",
11705
+ "type": "DeviceSettingsPage",
11358
11706
  "id": 1
11707
+ },
11708
+ "field_name": {
11709
+ "type": "string",
11710
+ "id": 2
11359
11711
  }
11360
11712
  }
11361
11713
  },
@@ -11402,109 +11754,11 @@
11402
11754
  }
11403
11755
  }
11404
11756
  },
11405
- "DeviceFirmwareTargetType": {
11406
- "values": {
11407
- "FW_MGMT_TARGET_INVALID": 0,
11408
- "FW_MGMT_TARGET_CRATE": 1,
11409
- "FW_MGMT_TARGET_ROMLOADER": 2,
11410
- "FW_MGMT_TARGET_BOOTLOADER": 3,
11411
- "FW_MGMT_TARGET_APPLICATION_P1": 4,
11412
- "FW_MGMT_TARGET_APPLICATION_P2": 5,
11413
- "FW_MGMT_TARGET_COPROCESSOR": 6,
11414
- "FW_MGMT_TARGET_SE01": 7,
11415
- "FW_MGMT_TARGET_SE02": 8,
11416
- "FW_MGMT_TARGET_SE03": 9,
11417
- "FW_MGMT_TARGET_SE04": 10
11418
- }
11419
- },
11420
- "DeviceFirmwareUpdateTaskStatus": {
11421
- "values": {
11422
- "FW_MGMT_UPDATER_TASK_STATUS_PENDING": 0,
11423
- "FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS": 1,
11424
- "FW_MGMT_UPDATER_TASK_STATUS_FINISHED": 2,
11425
- "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND": 3,
11426
- "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ": 4,
11427
- "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE": 5,
11428
- "FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY": 6,
11429
- "FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL": 7,
11430
- "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT": 8,
11431
- "FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY": 9,
11432
- "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS": 10
11433
- }
11434
- },
11435
- "DeviceFirmwareTarget": {
11436
- "fields": {
11437
- "target_id": {
11438
- "rule": "required",
11439
- "type": "DeviceFirmwareTargetType",
11440
- "id": 1
11441
- },
11442
- "path": {
11443
- "rule": "required",
11444
- "type": "string",
11445
- "id": 2
11446
- }
11447
- }
11448
- },
11449
- "DeviceFirmwareUpdateRequest": {
11450
- "fields": {
11451
- "targets": {
11452
- "rule": "repeated",
11453
- "type": "DeviceFirmwareTarget",
11454
- "id": 1
11455
- }
11456
- }
11457
- },
11458
- "DeviceFirmwareUpdateRecord": {
11757
+ "DeviceMiscUsbMscControl": {
11459
11758
  "fields": {
11460
- "target_id": {
11759
+ "enable": {
11461
11760
  "rule": "required",
11462
- "type": "DeviceFirmwareTargetType",
11463
- "id": 1
11464
- },
11465
- "status": {
11466
- "type": "DeviceFirmwareUpdateTaskStatus",
11467
- "id": 10
11468
- },
11469
- "payload_version": {
11470
- "type": "uint32",
11471
- "id": 20
11472
- },
11473
- "path": {
11474
- "type": "string",
11475
- "id": 30
11476
- }
11477
- }
11478
- },
11479
- "DeviceFirmwareUpdateRecordFields": {
11480
- "fields": {
11481
- "status": {
11482
11761
  "type": "bool",
11483
- "id": 10
11484
- },
11485
- "payload_version": {
11486
- "type": "bool",
11487
- "id": 20
11488
- },
11489
- "path": {
11490
- "type": "bool",
11491
- "id": 30
11492
- }
11493
- }
11494
- },
11495
- "DeviceFirmwareUpdateStatusGet": {
11496
- "fields": {
11497
- "fields": {
11498
- "type": "DeviceFirmwareUpdateRecordFields",
11499
- "id": 1
11500
- }
11501
- }
11502
- },
11503
- "DeviceFirmwareUpdateStatus": {
11504
- "fields": {
11505
- "records": {
11506
- "rule": "repeated",
11507
- "type": "DeviceFirmwareUpdateRecord",
11508
11762
  "id": 1
11509
11763
  }
11510
11764
  }
@@ -11608,6 +11862,113 @@
11608
11862
  }
11609
11863
  }
11610
11864
  },
11865
+ "DeviceFirmwareTargetType": {
11866
+ "values": {
11867
+ "FW_MGMT_TARGET_INVALID": 0,
11868
+ "FW_MGMT_TARGET_CRATE": 1,
11869
+ "FW_MGMT_TARGET_ROMLOADER": 2,
11870
+ "FW_MGMT_TARGET_BOOTLOADER": 3,
11871
+ "FW_MGMT_TARGET_APPLICATION_P1": 4,
11872
+ "FW_MGMT_TARGET_APPLICATION_P2": 5,
11873
+ "FW_MGMT_TARGET_COPROCESSOR": 6,
11874
+ "FW_MGMT_TARGET_SE01": 7,
11875
+ "FW_MGMT_TARGET_SE02": 8,
11876
+ "FW_MGMT_TARGET_SE03": 9,
11877
+ "FW_MGMT_TARGET_SE04": 10
11878
+ }
11879
+ },
11880
+ "DeviceFirmwareUpdateTaskStatus": {
11881
+ "values": {
11882
+ "FW_MGMT_UPDATER_TASK_STATUS_PENDING": 0,
11883
+ "FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS": 1,
11884
+ "FW_MGMT_UPDATER_TASK_STATUS_FINISHED": 2,
11885
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND": 3,
11886
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ": 4,
11887
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE": 5,
11888
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY": 6,
11889
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL": 7,
11890
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT": 8,
11891
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY": 9,
11892
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS": 10
11893
+ }
11894
+ },
11895
+ "DeviceFirmwareTarget": {
11896
+ "fields": {
11897
+ "target_id": {
11898
+ "rule": "required",
11899
+ "type": "DeviceFirmwareTargetType",
11900
+ "id": 1
11901
+ },
11902
+ "path": {
11903
+ "rule": "required",
11904
+ "type": "string",
11905
+ "id": 2
11906
+ }
11907
+ }
11908
+ },
11909
+ "DeviceFirmwareUpdateRequest": {
11910
+ "fields": {
11911
+ "targets": {
11912
+ "rule": "repeated",
11913
+ "type": "DeviceFirmwareTarget",
11914
+ "id": 1
11915
+ }
11916
+ }
11917
+ },
11918
+ "DeviceFirmwareUpdateRecord": {
11919
+ "fields": {
11920
+ "target_id": {
11921
+ "rule": "required",
11922
+ "type": "DeviceFirmwareTargetType",
11923
+ "id": 1
11924
+ },
11925
+ "status": {
11926
+ "type": "DeviceFirmwareUpdateTaskStatus",
11927
+ "id": 10
11928
+ },
11929
+ "payload_version": {
11930
+ "type": "uint32",
11931
+ "id": 20
11932
+ },
11933
+ "path": {
11934
+ "type": "string",
11935
+ "id": 30
11936
+ }
11937
+ }
11938
+ },
11939
+ "DeviceFirmwareUpdateRecordFields": {
11940
+ "fields": {
11941
+ "status": {
11942
+ "type": "bool",
11943
+ "id": 10
11944
+ },
11945
+ "payload_version": {
11946
+ "type": "bool",
11947
+ "id": 20
11948
+ },
11949
+ "path": {
11950
+ "type": "bool",
11951
+ "id": 30
11952
+ }
11953
+ }
11954
+ },
11955
+ "DeviceFirmwareUpdateStatusGet": {
11956
+ "fields": {
11957
+ "fields": {
11958
+ "type": "DeviceFirmwareUpdateRecordFields",
11959
+ "id": 1
11960
+ }
11961
+ }
11962
+ },
11963
+ "DeviceFirmwareUpdateStatus": {
11964
+ "fields": {
11965
+ "records": {
11966
+ "rule": "repeated",
11967
+ "type": "DeviceFirmwareUpdateRecord",
11968
+ "id": 1
11969
+ }
11970
+ }
11971
+ },
11611
11972
  "DeviceType": {
11612
11973
  "values": {
11613
11974
  "CLASSIC1": 0,
@@ -11758,10 +12119,6 @@
11758
12119
  "se4": {
11759
12120
  "type": "bool",
11760
12121
  "id": 430
11761
- },
11762
- "status": {
11763
- "type": "bool",
11764
- "id": 10000
11765
12122
  }
11766
12123
  }
11767
12124
  },
@@ -11831,13 +12188,19 @@
11831
12188
  "se4": {
11832
12189
  "type": "DeviceSEInfo",
11833
12190
  "id": 430
11834
- },
11835
- "status": {
11836
- "type": "DeviceStatus",
11837
- "id": 10000
11838
12191
  }
11839
12192
  }
11840
12193
  },
12194
+ "DeviceSessionErrorCode": {
12195
+ "values": {
12196
+ "DeviceSessionError_None": 0,
12197
+ "DeviceSessionError_UserCancelled": 1,
12198
+ "DeviceSessionError_InvalidSession": 2,
12199
+ "DeviceSessionError_AttachPinUnavailable": 3,
12200
+ "DeviceSessionError_PassphraseDisabled": 4,
12201
+ "DeviceSessionError_Busy": 5
12202
+ }
12203
+ },
11841
12204
  "DeviceSessionGet": {
11842
12205
  "fields": {
11843
12206
  "session_id": {
@@ -11858,6 +12221,39 @@
11858
12221
  }
11859
12222
  }
11860
12223
  },
12224
+ "DeviceSessionPinType": {
12225
+ "values": {
12226
+ "Any": 1,
12227
+ "Main": 2,
12228
+ "AttachToPin": 3
12229
+ }
12230
+ },
12231
+ "DeviceSessionAskPin": {
12232
+ "fields": {
12233
+ "type": {
12234
+ "type": "DeviceSessionPinType",
12235
+ "id": 1
12236
+ }
12237
+ }
12238
+ },
12239
+ "DeviceSessionAskPassphrase": {
12240
+ "fields": {
12241
+ "passphrase": {
12242
+ "type": "string",
12243
+ "id": 1
12244
+ },
12245
+ "on_device": {
12246
+ "rule": "required",
12247
+ "type": "bool",
12248
+ "id": 2
12249
+ }
12250
+ }
12251
+ },
12252
+ "DeviceSessionAskPin_FailureSubCodes": {
12253
+ "values": {
12254
+ "UserCancel": 1
12255
+ }
12256
+ },
11861
12257
  "DeviceStatus": {
11862
12258
  "fields": {
11863
12259
  "device_id": {
@@ -11890,6 +12286,9 @@
11890
12286
  }
11891
12287
  }
11892
12288
  },
12289
+ "DeviceStatusGet": {
12290
+ "fields": {}
12291
+ },
11893
12292
  "FilesystemPermissionFix": {
11894
12293
  "fields": {}
11895
12294
  },
@@ -12103,8 +12502,293 @@
12103
12502
  }
12104
12503
  },
12105
12504
  "FilesystemFormat": {
12505
+ "fields": {
12506
+ "data": {
12507
+ "rule": "required",
12508
+ "type": "bool",
12509
+ "id": 1
12510
+ },
12511
+ "user": {
12512
+ "rule": "required",
12513
+ "type": "bool",
12514
+ "id": 2
12515
+ }
12516
+ }
12517
+ },
12518
+ "InternalMyAddressRequest": {
12519
+ "fields": {
12520
+ "coin_type": {
12521
+ "rule": "required",
12522
+ "type": "uint32",
12523
+ "id": 1
12524
+ },
12525
+ "chain_id": {
12526
+ "rule": "required",
12527
+ "type": "uint32",
12528
+ "id": 2
12529
+ },
12530
+ "account_index": {
12531
+ "rule": "required",
12532
+ "type": "uint32",
12533
+ "id": 3
12534
+ },
12535
+ "derive_type": {
12536
+ "rule": "required",
12537
+ "type": "uint32",
12538
+ "id": 4
12539
+ }
12540
+ }
12541
+ },
12542
+ "NftUpdate": {
12543
+ "fields": {
12544
+ "file_name_no_ext": {
12545
+ "rule": "required",
12546
+ "type": "string",
12547
+ "id": 1
12548
+ }
12549
+ }
12550
+ },
12551
+ "OnboardingStep": {
12552
+ "values": {
12553
+ "ONBOARDING_STEP_UNKNOWN": 0,
12554
+ "ONBOARDING_STEP_CHECKING": 1,
12555
+ "ONBOARDING_STEP_PERSONALIZATION": 2,
12556
+ "ONBOARDING_STEP_PIN": 3,
12557
+ "ONBOARDING_STEP_SETUP": 4,
12558
+ "ONBOARDING_STEP_DONE": 5
12559
+ }
12560
+ },
12561
+ "OnboardingPhase": {
12562
+ "values": {
12563
+ "ONBOARDING_PHASE_UNKNOWN": 0,
12564
+ "ONBOARDING_PHASE_SAFETY_CHECK": 1,
12565
+ "ONBOARDING_PHASE_PIN_SETUP": 2,
12566
+ "ONBOARDING_PHASE_FINGERPRINT_SETUP": 3,
12567
+ "ONBOARDING_PHASE_SETUP_CHOICE": 4,
12568
+ "ONBOARDING_PHASE_WALLET_CREATE_START": 5,
12569
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW": 6,
12570
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM": 7,
12571
+ "ONBOARDING_PHASE_RESTORE_METHOD_CHOICE": 8,
12572
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE": 9,
12573
+ "ONBOARDING_PHASE_SEEDCARD_RESTORE": 10,
12574
+ "ONBOARDING_PHASE_WALLET_READY": 11,
12575
+ "ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT": 12,
12576
+ "ONBOARDING_PHASE_SEEDCARD_BACKUP": 13
12577
+ }
12578
+ },
12579
+ "OnboardingSetupKind": {
12580
+ "values": {
12581
+ "ONBOARDING_SETUP_KIND_UNKNOWN": 0,
12582
+ "ONBOARDING_SETUP_KIND_CHOICE": 1,
12583
+ "ONBOARDING_SETUP_KIND_CREATE": 2,
12584
+ "ONBOARDING_SETUP_KIND_RESTORE": 3
12585
+ }
12586
+ },
12587
+ "OnboardingSetupMethod": {
12588
+ "values": {
12589
+ "ONBOARDING_SETUP_METHOD_UNKNOWN": 0,
12590
+ "ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE": 1,
12591
+ "ONBOARDING_SETUP_METHOD_SEEDCARD": 2
12592
+ }
12593
+ },
12594
+ "OnboardingSetupStatus": {
12595
+ "fields": {
12596
+ "kind": {
12597
+ "type": "OnboardingSetupKind",
12598
+ "id": 1
12599
+ },
12600
+ "method": {
12601
+ "type": "OnboardingSetupMethod",
12602
+ "id": 2
12603
+ }
12604
+ }
12605
+ },
12606
+ "OnboardingStatusGet": {
12607
+ "fields": {}
12608
+ },
12609
+ "OnboardingStatus": {
12610
+ "fields": {
12611
+ "step": {
12612
+ "type": "OnboardingStep",
12613
+ "id": 1
12614
+ },
12615
+ "phase": {
12616
+ "type": "OnboardingPhase",
12617
+ "id": 2
12618
+ },
12619
+ "setup": {
12620
+ "type": "OnboardingSetupStatus",
12621
+ "id": 3
12622
+ },
12623
+ "pin_set": {
12624
+ "type": "bool",
12625
+ "id": 4
12626
+ },
12627
+ "wallet_initialized": {
12628
+ "type": "bool",
12629
+ "id": 5
12630
+ }
12631
+ }
12632
+ },
12633
+ "PortfolioUpdate": {
12106
12634
  "fields": {}
12107
12635
  },
12636
+ "ViewAmount": {
12637
+ "fields": {
12638
+ "is_unlimited": {
12639
+ "rule": "required",
12640
+ "type": "bool",
12641
+ "id": 1
12642
+ },
12643
+ "num": {
12644
+ "rule": "required",
12645
+ "type": "string",
12646
+ "id": 2
12647
+ }
12648
+ }
12649
+ },
12650
+ "ViewDetail": {
12651
+ "fields": {
12652
+ "key": {
12653
+ "rule": "required",
12654
+ "type": "uint32",
12655
+ "id": 1
12656
+ },
12657
+ "value": {
12658
+ "rule": "required",
12659
+ "type": "string",
12660
+ "id": 2
12661
+ },
12662
+ "is_overview": {
12663
+ "rule": "required",
12664
+ "type": "bool",
12665
+ "id": 3
12666
+ },
12667
+ "has_icon": {
12668
+ "rule": "required",
12669
+ "type": "bool",
12670
+ "id": 4
12671
+ }
12672
+ }
12673
+ },
12674
+ "ViewTipType": {
12675
+ "values": {
12676
+ "Default": 0,
12677
+ "Highlight": 1,
12678
+ "Recommend": 2,
12679
+ "Warning": 3,
12680
+ "Danger": 4
12681
+ }
12682
+ },
12683
+ "ViewTip": {
12684
+ "fields": {
12685
+ "type": {
12686
+ "rule": "required",
12687
+ "type": "ViewTipType",
12688
+ "id": 1
12689
+ },
12690
+ "text": {
12691
+ "rule": "required",
12692
+ "type": "string",
12693
+ "id": 2
12694
+ }
12695
+ }
12696
+ },
12697
+ "ViewRawData": {
12698
+ "fields": {
12699
+ "initial_data": {
12700
+ "rule": "required",
12701
+ "type": "string",
12702
+ "id": 1
12703
+ },
12704
+ "placeholder": {
12705
+ "rule": "required",
12706
+ "type": "uint32",
12707
+ "id": 2
12708
+ }
12709
+ }
12710
+ },
12711
+ "ViewSignLayout": {
12712
+ "values": {
12713
+ "LayoutDefault": 0,
12714
+ "LayoutSafeTxCreate": 1,
12715
+ "LayoutFinalConfirm": 2,
12716
+ "Layout7702": 3,
12717
+ "LayoutFlat": 4,
12718
+ "LayoutEthApprove": 5
12719
+ }
12720
+ },
12721
+ "ViewSignPage": {
12722
+ "fields": {
12723
+ "title": {
12724
+ "rule": "required",
12725
+ "type": "string",
12726
+ "id": 1
12727
+ },
12728
+ "amount": {
12729
+ "type": "ViewAmount",
12730
+ "id": 2
12731
+ },
12732
+ "general": {
12733
+ "rule": "repeated",
12734
+ "type": "ViewDetail",
12735
+ "id": 3
12736
+ },
12737
+ "tip": {
12738
+ "type": "ViewTip",
12739
+ "id": 4
12740
+ },
12741
+ "raw_data": {
12742
+ "type": "ViewRawData",
12743
+ "id": 5
12744
+ },
12745
+ "slide_to_confirm": {
12746
+ "type": "bool",
12747
+ "id": 6,
12748
+ "options": {
12749
+ "default": true
12750
+ }
12751
+ },
12752
+ "layout": {
12753
+ "type": "ViewSignLayout",
12754
+ "id": 7,
12755
+ "options": {
12756
+ "default": "LayoutDefault"
12757
+ }
12758
+ }
12759
+ }
12760
+ },
12761
+ "ViewVerifyPage": {
12762
+ "fields": {
12763
+ "title": {
12764
+ "rule": "required",
12765
+ "type": "string",
12766
+ "id": 1
12767
+ },
12768
+ "address": {
12769
+ "rule": "required",
12770
+ "type": "string",
12771
+ "id": 2
12772
+ },
12773
+ "path": {
12774
+ "rule": "required",
12775
+ "type": "string",
12776
+ "id": 3
12777
+ },
12778
+ "network": {
12779
+ "type": "string",
12780
+ "id": 4
12781
+ },
12782
+ "derive_type": {
12783
+ "type": "string",
12784
+ "id": 5
12785
+ },
12786
+ "value_key": {
12787
+ "type": "uint32",
12788
+ "id": 6
12789
+ }
12790
+ }
12791
+ },
12108
12792
  "google": {
12109
12793
  "nested": {
12110
12794
  "protobuf": {