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

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 +176 -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 +784 -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 +376 -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 +1155 -481
  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 +458 -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,14 @@
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_OnboardingStatusGet": 61600,
474
+ "MessageType_OnboardingStatus": 61601
494
475
  },
495
476
  "reserved": [
496
477
  [90, 92],
@@ -5393,6 +5374,37 @@
5393
5374
  }
5394
5375
  }
5395
5376
  },
5377
+ "EthereumSignTypedDataQR": {
5378
+ "fields": {
5379
+ "address_n": {
5380
+ "rule": "repeated",
5381
+ "type": "uint32",
5382
+ "id": 1,
5383
+ "options": {
5384
+ "packed": false
5385
+ }
5386
+ },
5387
+ "json_data": {
5388
+ "type": "bytes",
5389
+ "id": 2
5390
+ },
5391
+ "chain_id": {
5392
+ "type": "uint64",
5393
+ "id": 3
5394
+ },
5395
+ "metamask_v4_compat": {
5396
+ "type": "bool",
5397
+ "id": 4,
5398
+ "options": {
5399
+ "default": true
5400
+ }
5401
+ },
5402
+ "request_id": {
5403
+ "type": "bytes",
5404
+ "id": 5
5405
+ }
5406
+ }
5407
+ },
5396
5408
  "EthereumGetPublicKeyOneKey": {
5397
5409
  "fields": {
5398
5410
  "address_n": {
@@ -5918,30 +5930,6 @@
5918
5930
  }
5919
5931
  }
5920
5932
  },
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
5933
  "KaspaGetAddress": {
5946
5934
  "fields": {
5947
5935
  "address_n": {
@@ -6119,7 +6107,7 @@
6119
6107
  "PromptTemporarily": 2
6120
6108
  }
6121
6109
  },
6122
- "StartSession": {
6110
+ "Initialize": {
6123
6111
  "fields": {
6124
6112
  "session_id": {
6125
6113
  "type": "bytes",
@@ -6135,10 +6123,21 @@
6135
6123
  "derive_cardano": {
6136
6124
  "type": "bool",
6137
6125
  "id": 3
6126
+ },
6127
+ "passphrase_state": {
6128
+ "type": "string",
6129
+ "id": 8000
6130
+ },
6131
+ "is_contains_attach": {
6132
+ "type": "bool",
6133
+ "id": 8001
6138
6134
  }
6139
6135
  }
6140
6136
  },
6141
- "EndSession": {
6137
+ "GetFeatures": {
6138
+ "fields": {}
6139
+ },
6140
+ "OnekeyGetFeatures": {
6142
6141
  "fields": {}
6143
6142
  },
6144
6143
  "OneKeyDeviceType": {
@@ -6162,220 +6161,602 @@
6162
6161
  "APP": 1
6163
6162
  }
6164
6163
  },
6165
- "OnekeyFeatures": {
6164
+ "Features": {
6166
6165
  "fields": {
6167
- "onekey_device_type": {
6168
- "type": "OneKeyDeviceType",
6166
+ "vendor": {
6167
+ "type": "string",
6169
6168
  "id": 1
6170
6169
  },
6171
- "onekey_romloader_version": {
6172
- "type": "string",
6170
+ "major_version": {
6171
+ "rule": "required",
6172
+ "type": "uint32",
6173
6173
  "id": 2
6174
6174
  },
6175
- "onekey_bootloader_version": {
6176
- "type": "string",
6175
+ "minor_version": {
6176
+ "rule": "required",
6177
+ "type": "uint32",
6177
6178
  "id": 3
6178
6179
  },
6179
- "onekey_firmware_version": {
6180
- "type": "string",
6180
+ "patch_version": {
6181
+ "rule": "required",
6182
+ "type": "uint32",
6181
6183
  "id": 4
6182
6184
  },
6183
- "onekey_romloader_hash": {
6184
- "type": "bytes",
6185
+ "bootloader_mode": {
6186
+ "type": "bool",
6185
6187
  "id": 5
6186
6188
  },
6187
- "onekey_bootloader_hash": {
6188
- "type": "bytes",
6189
+ "device_id": {
6190
+ "type": "string",
6189
6191
  "id": 6
6190
6192
  },
6191
- "onekey_firmware_hash": {
6192
- "type": "bytes",
6193
+ "pin_protection": {
6194
+ "type": "bool",
6193
6195
  "id": 7
6194
6196
  },
6195
- "onekey_romloader_build_id": {
6196
- "type": "string",
6197
+ "passphrase_protection": {
6198
+ "type": "bool",
6197
6199
  "id": 8
6198
6200
  },
6199
- "onekey_bootloader_build_id": {
6201
+ "language": {
6200
6202
  "type": "string",
6201
6203
  "id": 9
6202
6204
  },
6203
- "onekey_firmware_build_id": {
6205
+ "label": {
6204
6206
  "type": "string",
6205
6207
  "id": 10
6206
6208
  },
6207
- "onekey_serial_no": {
6208
- "type": "string",
6209
- "id": 11
6210
- },
6211
- "onekey_coprocessor_bt_name": {
6212
- "type": "string",
6209
+ "initialized": {
6210
+ "type": "bool",
6213
6211
  "id": 12
6214
6212
  },
6215
- "onekey_coprocessor_version": {
6216
- "type": "string",
6213
+ "revision": {
6214
+ "type": "bytes",
6217
6215
  "id": 13
6218
6216
  },
6219
- "onekey_coprocessor_build_id": {
6220
- "type": "string",
6217
+ "bootloader_hash": {
6218
+ "type": "bytes",
6221
6219
  "id": 14
6222
6220
  },
6223
- "onekey_coprocessor_hash": {
6224
- "type": "bytes",
6221
+ "imported": {
6222
+ "type": "bool",
6225
6223
  "id": 15
6226
6224
  },
6227
- "onekey_se_type": {
6228
- "type": "OneKeySeType",
6225
+ "unlocked": {
6226
+ "type": "bool",
6229
6227
  "id": 16
6230
6228
  },
6231
- "onekey_se01_state": {
6232
- "type": "OneKeySEState",
6233
- "id": 17
6229
+ "_passphrase_cached": {
6230
+ "type": "bool",
6231
+ "id": 17,
6232
+ "options": {
6233
+ "deprecated": true
6234
+ }
6234
6235
  },
6235
- "onekey_se02_state": {
6236
- "type": "OneKeySEState",
6236
+ "firmware_present": {
6237
+ "type": "bool",
6237
6238
  "id": 18
6238
6239
  },
6239
- "onekey_se03_state": {
6240
- "type": "OneKeySEState",
6240
+ "needs_backup": {
6241
+ "type": "bool",
6241
6242
  "id": 19
6242
6243
  },
6243
- "onekey_se04_state": {
6244
- "type": "OneKeySEState",
6244
+ "flags": {
6245
+ "type": "uint32",
6245
6246
  "id": 20
6246
6247
  },
6247
- "onekey_se01_version": {
6248
+ "model": {
6248
6249
  "type": "string",
6249
6250
  "id": 21
6250
6251
  },
6251
- "onekey_se02_version": {
6252
- "type": "string",
6252
+ "fw_major": {
6253
+ "type": "uint32",
6253
6254
  "id": 22
6254
6255
  },
6255
- "onekey_se03_version": {
6256
- "type": "string",
6256
+ "fw_minor": {
6257
+ "type": "uint32",
6257
6258
  "id": 23
6258
6259
  },
6259
- "onekey_se04_version": {
6260
- "type": "string",
6260
+ "fw_patch": {
6261
+ "type": "uint32",
6261
6262
  "id": 24
6262
6263
  },
6263
- "onekey_se01_hash": {
6264
- "type": "bytes",
6264
+ "fw_vendor": {
6265
+ "type": "string",
6265
6266
  "id": 25
6266
6267
  },
6267
- "onekey_se02_hash": {
6268
- "type": "bytes",
6269
- "id": 26
6270
- },
6271
- "onekey_se03_hash": {
6272
- "type": "bytes",
6268
+ "unfinished_backup": {
6269
+ "type": "bool",
6273
6270
  "id": 27
6274
6271
  },
6275
- "onekey_se04_hash": {
6276
- "type": "bytes",
6272
+ "no_backup": {
6273
+ "type": "bool",
6277
6274
  "id": 28
6278
6275
  },
6279
- "onekey_se01_build_id": {
6280
- "type": "string",
6276
+ "recovery_mode": {
6277
+ "type": "bool",
6281
6278
  "id": 29
6282
6279
  },
6283
- "onekey_se02_build_id": {
6284
- "type": "string",
6285
- "id": 30
6280
+ "capabilities": {
6281
+ "rule": "repeated",
6282
+ "type": "Capability",
6283
+ "id": 30,
6284
+ "options": {
6285
+ "packed": false
6286
+ }
6286
6287
  },
6287
- "onekey_se03_build_id": {
6288
- "type": "string",
6288
+ "backup_type": {
6289
+ "type": "BackupType",
6289
6290
  "id": 31
6290
6291
  },
6291
- "onekey_se04_build_id": {
6292
- "type": "string",
6292
+ "sd_card_present": {
6293
+ "type": "bool",
6293
6294
  "id": 32
6294
6295
  },
6295
- "onekey_se01_bootloader_version": {
6296
- "type": "string",
6296
+ "sd_protection": {
6297
+ "type": "bool",
6297
6298
  "id": 33
6298
6299
  },
6299
- "onekey_se02_bootloader_version": {
6300
- "type": "string",
6300
+ "wipe_code_protection": {
6301
+ "type": "bool",
6301
6302
  "id": 34
6302
6303
  },
6303
- "onekey_se03_bootloader_version": {
6304
- "type": "string",
6304
+ "session_id": {
6305
+ "type": "bytes",
6305
6306
  "id": 35
6306
6307
  },
6307
- "onekey_se04_bootloader_version": {
6308
- "type": "string",
6308
+ "passphrase_always_on_device": {
6309
+ "type": "bool",
6309
6310
  "id": 36
6310
6311
  },
6311
- "onekey_se01_bootloader_hash": {
6312
- "type": "bytes",
6312
+ "safety_checks": {
6313
+ "type": "SafetyCheckLevel",
6313
6314
  "id": 37
6314
6315
  },
6315
- "onekey_se02_bootloader_hash": {
6316
- "type": "bytes",
6316
+ "auto_lock_delay_ms": {
6317
+ "type": "uint32",
6317
6318
  "id": 38
6318
6319
  },
6319
- "onekey_se03_bootloader_hash": {
6320
- "type": "bytes",
6320
+ "display_rotation": {
6321
+ "type": "uint32",
6321
6322
  "id": 39
6322
6323
  },
6323
- "onekey_se04_bootloader_hash": {
6324
- "type": "bytes",
6324
+ "experimental_features": {
6325
+ "type": "bool",
6325
6326
  "id": 40
6326
6327
  },
6327
- "onekey_se01_bootloader_build_id": {
6328
+ "offset": {
6329
+ "type": "uint32",
6330
+ "id": 500
6331
+ },
6332
+ "coprocessor_bt_name": {
6328
6333
  "type": "string",
6329
- "id": 41
6334
+ "id": 501
6330
6335
  },
6331
- "onekey_se02_bootloader_build_id": {
6336
+ "coprocessor_version": {
6332
6337
  "type": "string",
6333
- "id": 42
6338
+ "id": 502
6334
6339
  },
6335
- "onekey_se03_bootloader_build_id": {
6340
+ "coprocessor_bt_enable": {
6341
+ "type": "bool",
6342
+ "id": 503
6343
+ },
6344
+ "se_enable": {
6345
+ "type": "bool",
6346
+ "id": 504
6347
+ },
6348
+ "se_ver": {
6336
6349
  "type": "string",
6337
- "id": 43
6350
+ "id": 506
6338
6351
  },
6339
- "onekey_se04_bootloader_build_id": {
6352
+ "backup_only": {
6353
+ "type": "bool",
6354
+ "id": 507
6355
+ },
6356
+ "onekey_version": {
6340
6357
  "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": {
6358
+ "id": 508
6359
+ },
6360
+ "onekey_serial": {
6359
6361
  "type": "string",
6360
- "id": 1
6362
+ "id": 509
6361
6363
  },
6362
- "label": {
6364
+ "bootloader_version": {
6363
6365
  "type": "string",
6364
- "id": 2
6366
+ "id": 510
6365
6367
  },
6366
- "use_passphrase": {
6367
- "type": "bool",
6368
- "id": 3
6368
+ "serial_no": {
6369
+ "type": "string",
6370
+ "id": 511
6369
6371
  },
6370
- "homescreen": {
6371
- "type": "bytes",
6372
- "id": 4
6372
+ "spi_flash": {
6373
+ "type": "string",
6374
+ "id": 512
6373
6375
  },
6374
- "_passphrase_source": {
6376
+ "initstates": {
6375
6377
  "type": "uint32",
6376
- "id": 5,
6377
- "options": {
6378
- "deprecated": true
6378
+ "id": 513
6379
+ },
6380
+ "NFT_voucher": {
6381
+ "type": "bytes",
6382
+ "id": 514
6383
+ },
6384
+ "cpu_info": {
6385
+ "type": "string",
6386
+ "id": 515
6387
+ },
6388
+ "pre_firmware": {
6389
+ "type": "string",
6390
+ "id": 516
6391
+ },
6392
+ "coin_switch": {
6393
+ "type": "uint32",
6394
+ "id": 517
6395
+ },
6396
+ "build_id": {
6397
+ "type": "bytes",
6398
+ "id": 518
6399
+ },
6400
+ "romloader_version": {
6401
+ "type": "string",
6402
+ "id": 519
6403
+ },
6404
+ "busy": {
6405
+ "type": "bool",
6406
+ "id": 41
6407
+ },
6408
+ "onekey_device_type": {
6409
+ "type": "OneKeyDeviceType",
6410
+ "id": 600
6411
+ },
6412
+ "onekey_se_type": {
6413
+ "type": "OneKeySeType",
6414
+ "id": 601
6415
+ },
6416
+ "onekey_romloader_version": {
6417
+ "type": "string",
6418
+ "id": 602
6419
+ },
6420
+ "onekey_romloader_hash": {
6421
+ "type": "bytes",
6422
+ "id": 603
6423
+ },
6424
+ "onekey_bootloader_version": {
6425
+ "type": "string",
6426
+ "id": 604
6427
+ },
6428
+ "onekey_bootloader_hash": {
6429
+ "type": "bytes",
6430
+ "id": 605
6431
+ },
6432
+ "onekey_se01_version": {
6433
+ "type": "string",
6434
+ "id": 606
6435
+ },
6436
+ "onekey_se01_hash": {
6437
+ "type": "bytes",
6438
+ "id": 607
6439
+ },
6440
+ "onekey_se01_build_id": {
6441
+ "type": "string",
6442
+ "id": 608
6443
+ },
6444
+ "onekey_firmware_version": {
6445
+ "type": "string",
6446
+ "id": 609
6447
+ },
6448
+ "onekey_firmware_hash": {
6449
+ "type": "bytes",
6450
+ "id": 610
6451
+ },
6452
+ "onekey_firmware_build_id": {
6453
+ "type": "string",
6454
+ "id": 611
6455
+ },
6456
+ "onekey_serial_no": {
6457
+ "type": "string",
6458
+ "id": 612
6459
+ },
6460
+ "onekey_bootloader_build_id": {
6461
+ "type": "string",
6462
+ "id": 613
6463
+ },
6464
+ "onekey_coprocessor_bt_name": {
6465
+ "type": "string",
6466
+ "id": 614
6467
+ },
6468
+ "onekey_coprocessor_version": {
6469
+ "type": "string",
6470
+ "id": 615
6471
+ },
6472
+ "onekey_coprocessor_build_id": {
6473
+ "type": "string",
6474
+ "id": 616
6475
+ },
6476
+ "onekey_coprocessor_hash": {
6477
+ "type": "bytes",
6478
+ "id": 617
6479
+ },
6480
+ "onekey_se02_version": {
6481
+ "type": "string",
6482
+ "id": 618
6483
+ },
6484
+ "onekey_se03_version": {
6485
+ "type": "string",
6486
+ "id": 619
6487
+ },
6488
+ "onekey_se04_version": {
6489
+ "type": "string",
6490
+ "id": 620
6491
+ },
6492
+ "onekey_se01_state": {
6493
+ "type": "OneKeySEState",
6494
+ "id": 621
6495
+ },
6496
+ "onekey_se02_state": {
6497
+ "type": "OneKeySEState",
6498
+ "id": 622
6499
+ },
6500
+ "onekey_se03_state": {
6501
+ "type": "OneKeySEState",
6502
+ "id": 623
6503
+ },
6504
+ "onekey_se04_state": {
6505
+ "type": "OneKeySEState",
6506
+ "id": 624
6507
+ },
6508
+ "attach_to_pin_user": {
6509
+ "type": "bool",
6510
+ "id": 625
6511
+ },
6512
+ "unlocked_attach_pin": {
6513
+ "type": "bool",
6514
+ "id": 626
6515
+ }
6516
+ },
6517
+ "nested": {
6518
+ "Capability": {
6519
+ "options": {
6520
+ "(has_bitcoin_only_values)": true
6521
+ },
6522
+ "values": {
6523
+ "Capability_Bitcoin": 1,
6524
+ "Capability_Bitcoin_like": 2,
6525
+ "Capability_Binance": 3,
6526
+ "Capability_Cardano": 4,
6527
+ "Capability_Crypto": 5,
6528
+ "Capability_EOS": 6,
6529
+ "Capability_Ethereum": 7,
6530
+ "Capability_Lisk": 8,
6531
+ "Capability_Monero": 9,
6532
+ "Capability_NEM": 10,
6533
+ "Capability_Ripple": 11,
6534
+ "Capability_Stellar": 12,
6535
+ "Capability_Tezos": 13,
6536
+ "Capability_U2F": 14,
6537
+ "Capability_Shamir": 15,
6538
+ "Capability_ShamirGroups": 16,
6539
+ "Capability_PassphraseEntry": 17,
6540
+ "Capability_AttachToPin": 18,
6541
+ "Capability_EthereumTypedData": 1000
6542
+ }
6543
+ }
6544
+ }
6545
+ },
6546
+ "OnekeyFeatures": {
6547
+ "fields": {
6548
+ "onekey_device_type": {
6549
+ "type": "OneKeyDeviceType",
6550
+ "id": 1
6551
+ },
6552
+ "onekey_romloader_version": {
6553
+ "type": "string",
6554
+ "id": 2
6555
+ },
6556
+ "onekey_bootloader_version": {
6557
+ "type": "string",
6558
+ "id": 3
6559
+ },
6560
+ "onekey_firmware_version": {
6561
+ "type": "string",
6562
+ "id": 4
6563
+ },
6564
+ "onekey_romloader_hash": {
6565
+ "type": "bytes",
6566
+ "id": 5
6567
+ },
6568
+ "onekey_bootloader_hash": {
6569
+ "type": "bytes",
6570
+ "id": 6
6571
+ },
6572
+ "onekey_firmware_hash": {
6573
+ "type": "bytes",
6574
+ "id": 7
6575
+ },
6576
+ "onekey_romloader_build_id": {
6577
+ "type": "string",
6578
+ "id": 8
6579
+ },
6580
+ "onekey_bootloader_build_id": {
6581
+ "type": "string",
6582
+ "id": 9
6583
+ },
6584
+ "onekey_firmware_build_id": {
6585
+ "type": "string",
6586
+ "id": 10
6587
+ },
6588
+ "onekey_serial_no": {
6589
+ "type": "string",
6590
+ "id": 11
6591
+ },
6592
+ "onekey_coprocessor_bt_name": {
6593
+ "type": "string",
6594
+ "id": 12
6595
+ },
6596
+ "onekey_coprocessor_version": {
6597
+ "type": "string",
6598
+ "id": 13
6599
+ },
6600
+ "onekey_coprocessor_build_id": {
6601
+ "type": "string",
6602
+ "id": 14
6603
+ },
6604
+ "onekey_coprocessor_hash": {
6605
+ "type": "bytes",
6606
+ "id": 15
6607
+ },
6608
+ "onekey_se_type": {
6609
+ "type": "OneKeySeType",
6610
+ "id": 16
6611
+ },
6612
+ "onekey_se01_state": {
6613
+ "type": "OneKeySEState",
6614
+ "id": 17
6615
+ },
6616
+ "onekey_se02_state": {
6617
+ "type": "OneKeySEState",
6618
+ "id": 18
6619
+ },
6620
+ "onekey_se03_state": {
6621
+ "type": "OneKeySEState",
6622
+ "id": 19
6623
+ },
6624
+ "onekey_se04_state": {
6625
+ "type": "OneKeySEState",
6626
+ "id": 20
6627
+ },
6628
+ "onekey_se01_version": {
6629
+ "type": "string",
6630
+ "id": 21
6631
+ },
6632
+ "onekey_se02_version": {
6633
+ "type": "string",
6634
+ "id": 22
6635
+ },
6636
+ "onekey_se03_version": {
6637
+ "type": "string",
6638
+ "id": 23
6639
+ },
6640
+ "onekey_se04_version": {
6641
+ "type": "string",
6642
+ "id": 24
6643
+ },
6644
+ "onekey_se01_hash": {
6645
+ "type": "bytes",
6646
+ "id": 25
6647
+ },
6648
+ "onekey_se02_hash": {
6649
+ "type": "bytes",
6650
+ "id": 26
6651
+ },
6652
+ "onekey_se03_hash": {
6653
+ "type": "bytes",
6654
+ "id": 27
6655
+ },
6656
+ "onekey_se04_hash": {
6657
+ "type": "bytes",
6658
+ "id": 28
6659
+ },
6660
+ "onekey_se01_build_id": {
6661
+ "type": "string",
6662
+ "id": 29
6663
+ },
6664
+ "onekey_se02_build_id": {
6665
+ "type": "string",
6666
+ "id": 30
6667
+ },
6668
+ "onekey_se03_build_id": {
6669
+ "type": "string",
6670
+ "id": 31
6671
+ },
6672
+ "onekey_se04_build_id": {
6673
+ "type": "string",
6674
+ "id": 32
6675
+ },
6676
+ "onekey_se01_bootloader_version": {
6677
+ "type": "string",
6678
+ "id": 33
6679
+ },
6680
+ "onekey_se02_bootloader_version": {
6681
+ "type": "string",
6682
+ "id": 34
6683
+ },
6684
+ "onekey_se03_bootloader_version": {
6685
+ "type": "string",
6686
+ "id": 35
6687
+ },
6688
+ "onekey_se04_bootloader_version": {
6689
+ "type": "string",
6690
+ "id": 36
6691
+ },
6692
+ "onekey_se01_bootloader_hash": {
6693
+ "type": "bytes",
6694
+ "id": 37
6695
+ },
6696
+ "onekey_se02_bootloader_hash": {
6697
+ "type": "bytes",
6698
+ "id": 38
6699
+ },
6700
+ "onekey_se03_bootloader_hash": {
6701
+ "type": "bytes",
6702
+ "id": 39
6703
+ },
6704
+ "onekey_se04_bootloader_hash": {
6705
+ "type": "bytes",
6706
+ "id": 40
6707
+ },
6708
+ "onekey_se01_bootloader_build_id": {
6709
+ "type": "string",
6710
+ "id": 41
6711
+ },
6712
+ "onekey_se02_bootloader_build_id": {
6713
+ "type": "string",
6714
+ "id": 42
6715
+ },
6716
+ "onekey_se03_bootloader_build_id": {
6717
+ "type": "string",
6718
+ "id": 43
6719
+ },
6720
+ "onekey_se04_bootloader_build_id": {
6721
+ "type": "string",
6722
+ "id": 44
6723
+ }
6724
+ }
6725
+ },
6726
+ "LockDevice": {
6727
+ "fields": {}
6728
+ },
6729
+ "SetBusy": {
6730
+ "fields": {
6731
+ "expiry_ms": {
6732
+ "type": "uint32",
6733
+ "id": 1
6734
+ }
6735
+ }
6736
+ },
6737
+ "ApplySettings": {
6738
+ "fields": {
6739
+ "language": {
6740
+ "type": "string",
6741
+ "id": 1
6742
+ },
6743
+ "label": {
6744
+ "type": "string",
6745
+ "id": 2
6746
+ },
6747
+ "use_passphrase": {
6748
+ "type": "bool",
6749
+ "id": 3
6750
+ },
6751
+ "homescreen": {
6752
+ "type": "bytes",
6753
+ "id": 4
6754
+ },
6755
+ "_passphrase_source": {
6756
+ "type": "uint32",
6757
+ "id": 5,
6758
+ "options": {
6759
+ "deprecated": true
6379
6760
  }
6380
6761
  },
6381
6762
  "auto_lock_delay_ms": {
@@ -6875,49 +7256,6 @@
6875
7256
  }
6876
7257
  }
6877
7258
  },
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
7259
  "ResourceUpdate": {
6922
7260
  "fields": {
6923
7261
  "file_name": {
@@ -7004,14 +7342,6 @@
7004
7342
  "passphrase_state": {
7005
7343
  "type": "string",
7006
7344
  "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
7345
  }
7016
7346
  }
7017
7347
  },
@@ -11057,105 +11387,30 @@
11057
11387
  }
11058
11388
  }
11059
11389
  },
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": {
11390
+ "UiAnimationType": {
11099
11391
  "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
- }
11392
+ "Unknown": 0,
11393
+ "Signing": 1
11119
11394
  }
11120
11395
  },
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
- }
11396
+ "UiAnimationCommand": {
11397
+ "values": {
11398
+ "CommandUnknown": 0,
11399
+ "Start": 1,
11400
+ "Stop": 2,
11401
+ "Refresh": 3
11141
11402
  }
11142
11403
  },
11143
- "ViewVerifyPage": {
11404
+ "UiAnimationRequest": {
11144
11405
  "fields": {
11145
- "title": {
11406
+ "command": {
11146
11407
  "rule": "required",
11147
- "type": "string",
11408
+ "type": "UiAnimationCommand",
11148
11409
  "id": 1
11149
11410
  },
11150
- "address": {
11151
- "rule": "required",
11152
- "type": "string",
11411
+ "type": {
11412
+ "type": "UiAnimationType",
11153
11413
  "id": 2
11154
- },
11155
- "path": {
11156
- "rule": "required",
11157
- "type": "string",
11158
- "id": 3
11159
11414
  }
11160
11415
  }
11161
11416
  },
@@ -11242,7 +11497,15 @@
11242
11497
  }
11243
11498
  },
11244
11499
  "ProtocolInfoRequest": {
11245
- "fields": {}
11500
+ "fields": {
11501
+ "eventless_wallet_session": {
11502
+ "type": "bool",
11503
+ "id": 1,
11504
+ "options": {
11505
+ "default": false
11506
+ }
11507
+ }
11508
+ }
11246
11509
  },
11247
11510
  "ProtocolInfo": {
11248
11511
  "fields": {
@@ -11251,17 +11514,18 @@
11251
11514
  "type": "uint32",
11252
11515
  "id": 1
11253
11516
  },
11517
+ "build_fingerprint": {
11518
+ "rule": "required",
11519
+ "type": "string",
11520
+ "id": 2
11521
+ },
11254
11522
  "supported_messages": {
11255
11523
  "rule": "repeated",
11256
11524
  "type": "uint32",
11257
- "id": 2,
11525
+ "id": 3,
11258
11526
  "options": {
11259
11527
  "packed": false
11260
11528
  }
11261
- },
11262
- "protobuf_definition": {
11263
- "type": "string",
11264
- "id": 3
11265
11529
  }
11266
11530
  }
11267
11531
  },
@@ -11296,66 +11560,153 @@
11296
11560
  },
11297
11561
  "subcode": {
11298
11562
  "type": "uint32",
11299
- "id": 2
11563
+ "id": 2
11564
+ },
11565
+ "message": {
11566
+ "type": "string",
11567
+ "id": 3
11568
+ }
11569
+ },
11570
+ "nested": {
11571
+ "FailureType": {
11572
+ "values": {
11573
+ "Failure_InvalidMessage": 1,
11574
+ "Failure_UndefinedError": 2,
11575
+ "Failure_UsageError": 3,
11576
+ "Failure_DataError": 4,
11577
+ "Failure_ProcessError": 5
11578
+ }
11579
+ }
11580
+ }
11581
+ },
11582
+ "DeviceErrorCode": {
11583
+ "values": {
11584
+ "DeviceError_None": 0,
11585
+ "DeviceError_Busy": 1,
11586
+ "DeviceError_NotInitialized": 2,
11587
+ "DeviceError_ActionCancelled": 3,
11588
+ "DeviceError_PinAlreadyUsed": 4,
11589
+ "DeviceError_PersistFailed": 5,
11590
+ "DeviceError_SeError": 6,
11591
+ "DeviceError_InvalidLanguage": 7,
11592
+ "DeviceError_WallpaperNotUsable": 8,
11593
+ "DeviceError_DeviceLocked": 9
11594
+ }
11595
+ },
11596
+ "DeviceRebootType": {
11597
+ "values": {
11598
+ "Normal": 0,
11599
+ "Romloader": 1,
11600
+ "Bootloader": 2
11601
+ }
11602
+ },
11603
+ "DeviceReboot": {
11604
+ "fields": {
11605
+ "reboot_type": {
11606
+ "rule": "required",
11607
+ "type": "DeviceRebootType",
11608
+ "id": 1
11609
+ }
11610
+ }
11611
+ },
11612
+ "DeviceSettings": {
11613
+ "fields": {
11614
+ "bt_enable": {
11615
+ "type": "bool",
11616
+ "id": 1
11617
+ },
11618
+ "language": {
11619
+ "type": "string",
11620
+ "id": 2
11621
+ },
11622
+ "wallpaper_path": {
11623
+ "type": "string",
11624
+ "id": 3
11625
+ },
11626
+ "brightness": {
11627
+ "type": "uint32",
11628
+ "id": 4
11629
+ },
11630
+ "animation_enable": {
11631
+ "type": "bool",
11632
+ "id": 5
11633
+ },
11634
+ "tap_to_wake": {
11635
+ "type": "bool",
11636
+ "id": 6
11637
+ },
11638
+ "haptic_feedback": {
11639
+ "type": "bool",
11640
+ "id": 7
11641
+ },
11642
+ "device_name_display_enabled": {
11643
+ "type": "bool",
11644
+ "id": 8
11645
+ },
11646
+ "airgap_mode": {
11647
+ "type": "bool",
11648
+ "id": 9
11649
+ },
11650
+ "usb_lock_enable": {
11651
+ "type": "bool",
11652
+ "id": 10
11653
+ },
11654
+ "random_keypad": {
11655
+ "type": "bool",
11656
+ "id": 11
11657
+ },
11658
+ "passphrase_enable": {
11659
+ "type": "bool",
11660
+ "id": 100
11661
+ },
11662
+ "fido_enabled": {
11663
+ "type": "bool",
11664
+ "id": 101
11665
+ },
11666
+ "autolock_delay_ms": {
11667
+ "type": "uint32",
11668
+ "id": 102
11669
+ },
11670
+ "autoshutdown_delay_ms": {
11671
+ "type": "uint32",
11672
+ "id": 103
11300
11673
  },
11301
- "message": {
11674
+ "label": {
11302
11675
  "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
- }
11676
+ "id": 104
11315
11677
  }
11316
11678
  }
11317
11679
  },
11318
- "DeviceRebootType": {
11319
- "values": {
11320
- "Normal": 0,
11321
- "Romloader": 1,
11322
- "Bootloader": 2
11323
- }
11680
+ "DeviceSettingsGet": {
11681
+ "fields": {}
11324
11682
  },
11325
- "DeviceReboot": {
11683
+ "DeviceSettingsSet": {
11326
11684
  "fields": {
11327
- "reboot_type": {
11685
+ "settings": {
11328
11686
  "rule": "required",
11329
- "type": "DeviceRebootType",
11687
+ "type": "DeviceSettings",
11330
11688
  "id": 1
11331
11689
  }
11332
11690
  }
11333
11691
  },
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
- }
11692
+ "DeviceSettingsPage": {
11693
+ "values": {
11694
+ "DeviceReset": 0,
11695
+ "DevicePinChange": 1,
11696
+ "DevicePassphrase": 2,
11697
+ "DeviceAirgap": 3
11348
11698
  }
11349
11699
  },
11350
- "DeviceSettingsGet": {
11351
- "fields": {}
11352
- },
11353
- "DeviceSettingsSet": {
11700
+ "DeviceSettingsPageShow": {
11354
11701
  "fields": {
11355
- "settings": {
11702
+ "page": {
11356
11703
  "rule": "required",
11357
- "type": "DeviceSettings",
11704
+ "type": "DeviceSettingsPage",
11358
11705
  "id": 1
11706
+ },
11707
+ "field_name": {
11708
+ "type": "string",
11709
+ "id": 2
11359
11710
  }
11360
11711
  }
11361
11712
  },
@@ -11402,109 +11753,11 @@
11402
11753
  }
11403
11754
  }
11404
11755
  },
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": {
11756
+ "DeviceMiscUsbMscControl": {
11459
11757
  "fields": {
11460
- "target_id": {
11758
+ "enable": {
11461
11759
  "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
11760
  "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
11761
  "id": 1
11509
11762
  }
11510
11763
  }
@@ -11599,11 +11852,118 @@
11599
11852
  }
11600
11853
  }
11601
11854
  },
11602
- "DeviceFactoryTest": {
11855
+ "DeviceFactoryTest": {
11856
+ "fields": {
11857
+ "burn_in_test": {
11858
+ "rule": "required",
11859
+ "type": "bool",
11860
+ "id": 1
11861
+ }
11862
+ }
11863
+ },
11864
+ "DeviceFirmwareTargetType": {
11865
+ "values": {
11866
+ "FW_MGMT_TARGET_INVALID": 0,
11867
+ "FW_MGMT_TARGET_CRATE": 1,
11868
+ "FW_MGMT_TARGET_ROMLOADER": 2,
11869
+ "FW_MGMT_TARGET_BOOTLOADER": 3,
11870
+ "FW_MGMT_TARGET_APPLICATION_P1": 4,
11871
+ "FW_MGMT_TARGET_APPLICATION_P2": 5,
11872
+ "FW_MGMT_TARGET_COPROCESSOR": 6,
11873
+ "FW_MGMT_TARGET_SE01": 7,
11874
+ "FW_MGMT_TARGET_SE02": 8,
11875
+ "FW_MGMT_TARGET_SE03": 9,
11876
+ "FW_MGMT_TARGET_SE04": 10
11877
+ }
11878
+ },
11879
+ "DeviceFirmwareUpdateTaskStatus": {
11880
+ "values": {
11881
+ "FW_MGMT_UPDATER_TASK_STATUS_PENDING": 0,
11882
+ "FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS": 1,
11883
+ "FW_MGMT_UPDATER_TASK_STATUS_FINISHED": 2,
11884
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND": 3,
11885
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ": 4,
11886
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE": 5,
11887
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY": 6,
11888
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL": 7,
11889
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT": 8,
11890
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY": 9,
11891
+ "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS": 10
11892
+ }
11893
+ },
11894
+ "DeviceFirmwareTarget": {
11895
+ "fields": {
11896
+ "target_id": {
11897
+ "rule": "required",
11898
+ "type": "DeviceFirmwareTargetType",
11899
+ "id": 1
11900
+ },
11901
+ "path": {
11902
+ "rule": "required",
11903
+ "type": "string",
11904
+ "id": 2
11905
+ }
11906
+ }
11907
+ },
11908
+ "DeviceFirmwareUpdateRequest": {
11909
+ "fields": {
11910
+ "targets": {
11911
+ "rule": "repeated",
11912
+ "type": "DeviceFirmwareTarget",
11913
+ "id": 1
11914
+ }
11915
+ }
11916
+ },
11917
+ "DeviceFirmwareUpdateRecord": {
11918
+ "fields": {
11919
+ "target_id": {
11920
+ "rule": "required",
11921
+ "type": "DeviceFirmwareTargetType",
11922
+ "id": 1
11923
+ },
11924
+ "status": {
11925
+ "type": "DeviceFirmwareUpdateTaskStatus",
11926
+ "id": 10
11927
+ },
11928
+ "payload_version": {
11929
+ "type": "uint32",
11930
+ "id": 20
11931
+ },
11932
+ "path": {
11933
+ "type": "string",
11934
+ "id": 30
11935
+ }
11936
+ }
11937
+ },
11938
+ "DeviceFirmwareUpdateRecordFields": {
11939
+ "fields": {
11940
+ "status": {
11941
+ "type": "bool",
11942
+ "id": 10
11943
+ },
11944
+ "payload_version": {
11945
+ "type": "bool",
11946
+ "id": 20
11947
+ },
11948
+ "path": {
11949
+ "type": "bool",
11950
+ "id": 30
11951
+ }
11952
+ }
11953
+ },
11954
+ "DeviceFirmwareUpdateStatusGet": {
11955
+ "fields": {
11956
+ "fields": {
11957
+ "type": "DeviceFirmwareUpdateRecordFields",
11958
+ "id": 1
11959
+ }
11960
+ }
11961
+ },
11962
+ "DeviceFirmwareUpdateStatus": {
11603
11963
  "fields": {
11604
- "burn_in_test": {
11605
- "rule": "required",
11606
- "type": "bool",
11964
+ "records": {
11965
+ "rule": "repeated",
11966
+ "type": "DeviceFirmwareUpdateRecord",
11607
11967
  "id": 1
11608
11968
  }
11609
11969
  }
@@ -11758,10 +12118,6 @@
11758
12118
  "se4": {
11759
12119
  "type": "bool",
11760
12120
  "id": 430
11761
- },
11762
- "status": {
11763
- "type": "bool",
11764
- "id": 10000
11765
12121
  }
11766
12122
  }
11767
12123
  },
@@ -11831,13 +12187,19 @@
11831
12187
  "se4": {
11832
12188
  "type": "DeviceSEInfo",
11833
12189
  "id": 430
11834
- },
11835
- "status": {
11836
- "type": "DeviceStatus",
11837
- "id": 10000
11838
12190
  }
11839
12191
  }
11840
12192
  },
12193
+ "DeviceSessionErrorCode": {
12194
+ "values": {
12195
+ "DeviceSessionError_None": 0,
12196
+ "DeviceSessionError_UserCancelled": 1,
12197
+ "DeviceSessionError_InvalidSession": 2,
12198
+ "DeviceSessionError_AttachPinUnavailable": 3,
12199
+ "DeviceSessionError_PassphraseDisabled": 4,
12200
+ "DeviceSessionError_Busy": 5
12201
+ }
12202
+ },
11841
12203
  "DeviceSessionGet": {
11842
12204
  "fields": {
11843
12205
  "session_id": {
@@ -11858,6 +12220,39 @@
11858
12220
  }
11859
12221
  }
11860
12222
  },
12223
+ "DeviceSessionPinType": {
12224
+ "values": {
12225
+ "Any": 1,
12226
+ "Main": 2,
12227
+ "AttachToPin": 3
12228
+ }
12229
+ },
12230
+ "DeviceSessionAskPin": {
12231
+ "fields": {
12232
+ "type": {
12233
+ "type": "DeviceSessionPinType",
12234
+ "id": 1
12235
+ }
12236
+ }
12237
+ },
12238
+ "DeviceSessionAskPassphrase": {
12239
+ "fields": {
12240
+ "passphrase": {
12241
+ "type": "string",
12242
+ "id": 1
12243
+ },
12244
+ "on_device": {
12245
+ "rule": "required",
12246
+ "type": "bool",
12247
+ "id": 2
12248
+ }
12249
+ }
12250
+ },
12251
+ "DeviceSessionAskPin_FailureSubCodes": {
12252
+ "values": {
12253
+ "UserCancel": 1
12254
+ }
12255
+ },
11861
12256
  "DeviceStatus": {
11862
12257
  "fields": {
11863
12258
  "device_id": {
@@ -11890,6 +12285,9 @@
11890
12285
  }
11891
12286
  }
11892
12287
  },
12288
+ "DeviceStatusGet": {
12289
+ "fields": {}
12290
+ },
11893
12291
  "FilesystemPermissionFix": {
11894
12292
  "fields": {}
11895
12293
  },
@@ -12103,8 +12501,284 @@
12103
12501
  }
12104
12502
  },
12105
12503
  "FilesystemFormat": {
12504
+ "fields": {
12505
+ "data": {
12506
+ "rule": "required",
12507
+ "type": "bool",
12508
+ "id": 1
12509
+ },
12510
+ "user": {
12511
+ "rule": "required",
12512
+ "type": "bool",
12513
+ "id": 2
12514
+ }
12515
+ }
12516
+ },
12517
+ "InternalMyAddressRequest": {
12518
+ "fields": {
12519
+ "coin_type": {
12520
+ "rule": "required",
12521
+ "type": "uint32",
12522
+ "id": 1
12523
+ },
12524
+ "chain_id": {
12525
+ "rule": "required",
12526
+ "type": "uint32",
12527
+ "id": 2
12528
+ },
12529
+ "account_index": {
12530
+ "rule": "required",
12531
+ "type": "uint32",
12532
+ "id": 3
12533
+ },
12534
+ "derive_type": {
12535
+ "rule": "required",
12536
+ "type": "uint32",
12537
+ "id": 4
12538
+ }
12539
+ }
12540
+ },
12541
+ "OnboardingStep": {
12542
+ "values": {
12543
+ "ONBOARDING_STEP_UNKNOWN": 0,
12544
+ "ONBOARDING_STEP_CHECKING": 1,
12545
+ "ONBOARDING_STEP_PERSONALIZATION": 2,
12546
+ "ONBOARDING_STEP_PIN": 3,
12547
+ "ONBOARDING_STEP_SETUP": 4,
12548
+ "ONBOARDING_STEP_DONE": 5
12549
+ }
12550
+ },
12551
+ "OnboardingPhase": {
12552
+ "values": {
12553
+ "ONBOARDING_PHASE_UNKNOWN": 0,
12554
+ "ONBOARDING_PHASE_SAFETY_CHECK": 1,
12555
+ "ONBOARDING_PHASE_PIN_SETUP": 2,
12556
+ "ONBOARDING_PHASE_FINGERPRINT_SETUP": 3,
12557
+ "ONBOARDING_PHASE_SETUP_CHOICE": 4,
12558
+ "ONBOARDING_PHASE_WALLET_CREATE_START": 5,
12559
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW": 6,
12560
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM": 7,
12561
+ "ONBOARDING_PHASE_RESTORE_METHOD_CHOICE": 8,
12562
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE": 9,
12563
+ "ONBOARDING_PHASE_SEEDCARD_RESTORE": 10,
12564
+ "ONBOARDING_PHASE_WALLET_READY": 11,
12565
+ "ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT": 12,
12566
+ "ONBOARDING_PHASE_SEEDCARD_BACKUP": 13
12567
+ }
12568
+ },
12569
+ "OnboardingSetupKind": {
12570
+ "values": {
12571
+ "ONBOARDING_SETUP_KIND_UNKNOWN": 0,
12572
+ "ONBOARDING_SETUP_KIND_CHOICE": 1,
12573
+ "ONBOARDING_SETUP_KIND_CREATE": 2,
12574
+ "ONBOARDING_SETUP_KIND_RESTORE": 3
12575
+ }
12576
+ },
12577
+ "OnboardingSetupMethod": {
12578
+ "values": {
12579
+ "ONBOARDING_SETUP_METHOD_UNKNOWN": 0,
12580
+ "ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE": 1,
12581
+ "ONBOARDING_SETUP_METHOD_SEEDCARD": 2
12582
+ }
12583
+ },
12584
+ "OnboardingSetupStatus": {
12585
+ "fields": {
12586
+ "kind": {
12587
+ "type": "OnboardingSetupKind",
12588
+ "id": 1
12589
+ },
12590
+ "method": {
12591
+ "type": "OnboardingSetupMethod",
12592
+ "id": 2
12593
+ }
12594
+ }
12595
+ },
12596
+ "OnboardingStatusGet": {
12597
+ "fields": {}
12598
+ },
12599
+ "OnboardingStatus": {
12600
+ "fields": {
12601
+ "step": {
12602
+ "type": "OnboardingStep",
12603
+ "id": 1
12604
+ },
12605
+ "phase": {
12606
+ "type": "OnboardingPhase",
12607
+ "id": 2
12608
+ },
12609
+ "setup": {
12610
+ "type": "OnboardingSetupStatus",
12611
+ "id": 3
12612
+ },
12613
+ "pin_set": {
12614
+ "type": "bool",
12615
+ "id": 4
12616
+ },
12617
+ "wallet_initialized": {
12618
+ "type": "bool",
12619
+ "id": 5
12620
+ }
12621
+ }
12622
+ },
12623
+ "PortfolioUpdate": {
12106
12624
  "fields": {}
12107
12625
  },
12626
+ "ViewAmount": {
12627
+ "fields": {
12628
+ "is_unlimited": {
12629
+ "rule": "required",
12630
+ "type": "bool",
12631
+ "id": 1
12632
+ },
12633
+ "num": {
12634
+ "rule": "required",
12635
+ "type": "string",
12636
+ "id": 2
12637
+ }
12638
+ }
12639
+ },
12640
+ "ViewDetail": {
12641
+ "fields": {
12642
+ "key": {
12643
+ "rule": "required",
12644
+ "type": "uint32",
12645
+ "id": 1
12646
+ },
12647
+ "value": {
12648
+ "rule": "required",
12649
+ "type": "string",
12650
+ "id": 2
12651
+ },
12652
+ "is_overview": {
12653
+ "rule": "required",
12654
+ "type": "bool",
12655
+ "id": 3
12656
+ },
12657
+ "has_icon": {
12658
+ "rule": "required",
12659
+ "type": "bool",
12660
+ "id": 4
12661
+ }
12662
+ }
12663
+ },
12664
+ "ViewTipType": {
12665
+ "values": {
12666
+ "Default": 0,
12667
+ "Highlight": 1,
12668
+ "Recommend": 2,
12669
+ "Warning": 3,
12670
+ "Danger": 4
12671
+ }
12672
+ },
12673
+ "ViewTip": {
12674
+ "fields": {
12675
+ "type": {
12676
+ "rule": "required",
12677
+ "type": "ViewTipType",
12678
+ "id": 1
12679
+ },
12680
+ "text": {
12681
+ "rule": "required",
12682
+ "type": "string",
12683
+ "id": 2
12684
+ }
12685
+ }
12686
+ },
12687
+ "ViewRawData": {
12688
+ "fields": {
12689
+ "initial_data": {
12690
+ "rule": "required",
12691
+ "type": "string",
12692
+ "id": 1
12693
+ },
12694
+ "placeholder": {
12695
+ "rule": "required",
12696
+ "type": "uint32",
12697
+ "id": 2
12698
+ }
12699
+ }
12700
+ },
12701
+ "ViewSignLayout": {
12702
+ "values": {
12703
+ "LayoutDefault": 0,
12704
+ "LayoutSafeTxCreate": 1,
12705
+ "LayoutFinalConfirm": 2,
12706
+ "Layout7702": 3,
12707
+ "LayoutFlat": 4,
12708
+ "LayoutEthApprove": 5
12709
+ }
12710
+ },
12711
+ "ViewSignPage": {
12712
+ "fields": {
12713
+ "title": {
12714
+ "rule": "required",
12715
+ "type": "string",
12716
+ "id": 1
12717
+ },
12718
+ "amount": {
12719
+ "type": "ViewAmount",
12720
+ "id": 2
12721
+ },
12722
+ "general": {
12723
+ "rule": "repeated",
12724
+ "type": "ViewDetail",
12725
+ "id": 3
12726
+ },
12727
+ "tip": {
12728
+ "type": "ViewTip",
12729
+ "id": 4
12730
+ },
12731
+ "raw_data": {
12732
+ "type": "ViewRawData",
12733
+ "id": 5
12734
+ },
12735
+ "slide_to_confirm": {
12736
+ "type": "bool",
12737
+ "id": 6,
12738
+ "options": {
12739
+ "default": true
12740
+ }
12741
+ },
12742
+ "layout": {
12743
+ "type": "ViewSignLayout",
12744
+ "id": 7,
12745
+ "options": {
12746
+ "default": "LayoutDefault"
12747
+ }
12748
+ }
12749
+ }
12750
+ },
12751
+ "ViewVerifyPage": {
12752
+ "fields": {
12753
+ "title": {
12754
+ "rule": "required",
12755
+ "type": "string",
12756
+ "id": 1
12757
+ },
12758
+ "address": {
12759
+ "rule": "required",
12760
+ "type": "string",
12761
+ "id": 2
12762
+ },
12763
+ "path": {
12764
+ "rule": "required",
12765
+ "type": "string",
12766
+ "id": 3
12767
+ },
12768
+ "network": {
12769
+ "type": "string",
12770
+ "id": 4
12771
+ },
12772
+ "derive_type": {
12773
+ "type": "string",
12774
+ "id": 5
12775
+ },
12776
+ "value_key": {
12777
+ "type": "uint32",
12778
+ "id": 6
12779
+ }
12780
+ }
12781
+ },
12108
12782
  "google": {
12109
12783
  "nested": {
12110
12784
  "protobuf": {