@onekeyfe/hd-transport 1.2.0-alpha.9 → 1.2.0-alpha.91

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 (64) hide show
  1. package/__tests__/messages.test.js +169 -11
  2. package/__tests__/protocol-v2-ble-frame-writer.test.js +119 -0
  3. package/__tests__/protocol-v2-link-manager.test.js +120 -9
  4. package/__tests__/protocol-v2-usb-transport-base.test.js +36 -2
  5. package/__tests__/protocol-v2.test.js +438 -64
  6. package/__tests__/transport-log.test.js +79 -0
  7. package/dist/constants.d.ts +3 -1
  8. package/dist/constants.d.ts.map +1 -1
  9. package/dist/index.d.ts +707 -242
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +597 -296
  12. package/dist/protocols/index.d.ts +13 -6
  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/decode.d.ts +12 -2
  17. package/dist/protocols/v2/decode.d.ts.map +1 -1
  18. package/dist/protocols/v2/encode.d.ts +2 -3
  19. package/dist/protocols/v2/encode.d.ts.map +1 -1
  20. package/dist/protocols/v2/errors.d.ts +8 -0
  21. package/dist/protocols/v2/errors.d.ts.map +1 -0
  22. package/dist/protocols/v2/frame-assembler.d.ts.map +1 -1
  23. package/dist/protocols/v2/index.d.ts +2 -1
  24. package/dist/protocols/v2/index.d.ts.map +1 -1
  25. package/dist/protocols/v2/link-manager.d.ts +4 -0
  26. package/dist/protocols/v2/link-manager.d.ts.map +1 -1
  27. package/dist/protocols/v2/session.d.ts +10 -4
  28. package/dist/protocols/v2/session.d.ts.map +1 -1
  29. package/dist/protocols/v2/usb-transport-base.d.ts +1 -0
  30. package/dist/protocols/v2/usb-transport-base.d.ts.map +1 -1
  31. package/dist/serialization/protobuf/decode.d.ts.map +1 -1
  32. package/dist/serialization/protobuf/encode.d.ts.map +1 -1
  33. package/dist/types/messages.d.ts +370 -144
  34. package/dist/types/messages.d.ts.map +1 -1
  35. package/dist/types/transport.d.ts +20 -3
  36. package/dist/types/transport.d.ts.map +1 -1
  37. package/dist/utils/transportLog.d.ts +9 -0
  38. package/dist/utils/transportLog.d.ts.map +1 -0
  39. package/messages-protocol-v2.json +1113 -547
  40. package/package.json +3 -3
  41. package/scripts/protobuf-build.sh +85 -253
  42. package/scripts/protobuf-patches/index.js +1 -0
  43. package/scripts/protobuf-types.js +19 -1
  44. package/src/constants.ts +30 -16
  45. package/src/index.ts +5 -1
  46. package/src/protocols/index.ts +37 -40
  47. package/src/protocols/v2/ble-frame-writer.ts +77 -0
  48. package/src/protocols/v2/crc8.ts +1 -1
  49. package/src/protocols/v2/decode.ts +50 -35
  50. package/src/protocols/v2/encode.ts +2 -28
  51. package/src/protocols/v2/errors.ts +25 -0
  52. package/src/protocols/v2/frame-assembler.ts +6 -4
  53. package/src/protocols/v2/index.ts +2 -1
  54. package/src/protocols/v2/link-manager.ts +54 -5
  55. package/src/protocols/v2/session.ts +151 -200
  56. package/src/protocols/v2/usb-transport-base.ts +29 -10
  57. package/src/serialization/protobuf/decode.ts +4 -1
  58. package/src/serialization/protobuf/encode.ts +5 -1
  59. package/src/types/messages.ts +450 -185
  60. package/src/types/transport.ts +28 -3
  61. package/src/utils/transportLog.ts +102 -0
  62. package/dist/protocols/v2/debug.d.ts +0 -13
  63. package/dist/protocols/v2/debug.d.ts.map +0 -1
  64. 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,
@@ -419,13 +403,6 @@
419
403
  "MessageType_TonSignProof": 11905,
420
404
  "MessageType_TonSignedProof": 11906,
421
405
  "MessageType_TonTxAck": 11907,
422
- "MessageType_ScdoGetAddress": 12001,
423
- "MessageType_ScdoAddress": 12002,
424
- "MessageType_ScdoSignTx": 12003,
425
- "MessageType_ScdoSignedTx": 12004,
426
- "MessageType_ScdoTxAck": 12005,
427
- "MessageType_ScdoSignMessage": 12006,
428
- "MessageType_ScdoSignedMessage": 12007,
429
406
  "MessageType_AlephiumGetAddress": 12101,
430
407
  "MessageType_AlephiumAddress": 12102,
431
408
  "MessageType_AlephiumSignTx": 12103,
@@ -448,13 +425,6 @@
448
425
  "MessageType_NeoAddress": 12302,
449
426
  "MessageType_NeoSignTx": 12303,
450
427
  "MessageType_NeoSignedTx": 12304,
451
- "MessageType_UiviewShowAddressRequest": 30200,
452
- "MessageType_UiviewShowPublicKeyRequest": 30201,
453
- "MessageType_UiviewConfirmTxRequest": 30202,
454
- "MessageType_UiviewConfirmSignMessageRequest": 30203,
455
- "MessageType_UiviewResponse": 30204,
456
- "MessageType_UnLockDevice": 10030,
457
- "MessageType_UnLockDeviceResponse": 10031,
458
428
  "MessageType_DeviceFactoryInfoSet": 60000,
459
429
  "MessageType_DeviceFactoryInfoGet": 60001,
460
430
  "MessageType_DeviceFactoryInfo": 60002,
@@ -469,22 +439,17 @@
469
439
  "MessageType_DeviceSettings": 60410,
470
440
  "MessageType_DeviceSettingsGet": 60411,
471
441
  "MessageType_DeviceSettingsSet": 60412,
442
+ "MessageType_DeviceSettingsPageShow": 60413,
472
443
  "MessageType_DeviceCertificate": 60420,
473
444
  "MessageType_DeviceCertificateWrite": 60421,
474
445
  "MessageType_DeviceCertificateRead": 60422,
475
446
  "MessageType_DeviceCertificateSignature": 60423,
476
447
  "MessageType_DeviceCertificateSign": 60424,
477
- "MessageType_SetWallpaper": 60430,
478
- "MessageType_GetWallpaper": 60431,
479
- "MessageType_Wallpaper": 60432,
448
+ "MessageType_DeviceMiscUsbMscControl": 60440,
480
449
  "MessageType_DeviceInfoGet": 60600,
481
450
  "MessageType_DeviceInfo": 60601,
482
451
  "MessageType_DeviceStatusGet": 60602,
483
452
  "MessageType_DeviceStatus": 60603,
484
- "MessageType_DevGetOnboardingStatus": 60604,
485
- "MessageType_DevOnboardingStatus": 60605,
486
- "MessageType_DeviceSessionGet": 60606,
487
- "MessageType_DeviceSession": 60607,
488
453
  "MessageType_FilesystemPermissionFix": 60800,
489
454
  "MessageType_FilesystemPathInfo": 60801,
490
455
  "MessageType_FilesystemPathInfoQuery": 60802,
@@ -500,7 +465,14 @@
500
465
  "MessageType_DeviceFirmwareUpdateRequest": 61000,
501
466
  "MessageType_DeviceFirmwareUpdateStatusGet": 61001,
502
467
  "MessageType_DeviceFirmwareUpdateStatus": 61002,
503
- "MessageType_PortfolioUpdate": 61200
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
504
476
  },
505
477
  "reserved": [
506
478
  [90, 92],
@@ -5959,30 +5931,6 @@
5959
5931
  }
5960
5932
  }
5961
5933
  },
5962
- "InternalMyAddressRequest": {
5963
- "fields": {
5964
- "coin_type": {
5965
- "rule": "required",
5966
- "type": "uint32",
5967
- "id": 1
5968
- },
5969
- "chain_id": {
5970
- "rule": "required",
5971
- "type": "uint32",
5972
- "id": 2
5973
- },
5974
- "account_index": {
5975
- "rule": "required",
5976
- "type": "uint32",
5977
- "id": 3
5978
- },
5979
- "derive_type": {
5980
- "rule": "required",
5981
- "type": "uint32",
5982
- "id": 4
5983
- }
5984
- }
5985
- },
5986
5934
  "KaspaGetAddress": {
5987
5935
  "fields": {
5988
5936
  "address_n": {
@@ -6160,7 +6108,7 @@
6160
6108
  "PromptTemporarily": 2
6161
6109
  }
6162
6110
  },
6163
- "StartSession": {
6111
+ "Initialize": {
6164
6112
  "fields": {
6165
6113
  "session_id": {
6166
6114
  "type": "bytes",
@@ -6176,10 +6124,21 @@
6176
6124
  "derive_cardano": {
6177
6125
  "type": "bool",
6178
6126
  "id": 3
6127
+ },
6128
+ "passphrase_state": {
6129
+ "type": "string",
6130
+ "id": 8000
6131
+ },
6132
+ "is_contains_attach": {
6133
+ "type": "bool",
6134
+ "id": 8001
6179
6135
  }
6180
6136
  }
6181
6137
  },
6182
- "EndSession": {
6138
+ "GetFeatures": {
6139
+ "fields": {}
6140
+ },
6141
+ "OnekeyGetFeatures": {
6183
6142
  "fields": {}
6184
6143
  },
6185
6144
  "OneKeyDeviceType": {
@@ -6203,247 +6162,629 @@
6203
6162
  "APP": 1
6204
6163
  }
6205
6164
  },
6206
- "OnekeyFeatures": {
6165
+ "Features": {
6207
6166
  "fields": {
6208
- "onekey_device_type": {
6209
- "type": "OneKeyDeviceType",
6167
+ "vendor": {
6168
+ "type": "string",
6210
6169
  "id": 1
6211
6170
  },
6212
- "onekey_romloader_version": {
6213
- "type": "string",
6171
+ "major_version": {
6172
+ "rule": "required",
6173
+ "type": "uint32",
6214
6174
  "id": 2
6215
6175
  },
6216
- "onekey_bootloader_version": {
6217
- "type": "string",
6176
+ "minor_version": {
6177
+ "rule": "required",
6178
+ "type": "uint32",
6218
6179
  "id": 3
6219
6180
  },
6220
- "onekey_firmware_version": {
6221
- "type": "string",
6181
+ "patch_version": {
6182
+ "rule": "required",
6183
+ "type": "uint32",
6222
6184
  "id": 4
6223
6185
  },
6224
- "onekey_romloader_hash": {
6225
- "type": "bytes",
6186
+ "bootloader_mode": {
6187
+ "type": "bool",
6226
6188
  "id": 5
6227
6189
  },
6228
- "onekey_bootloader_hash": {
6229
- "type": "bytes",
6190
+ "device_id": {
6191
+ "type": "string",
6230
6192
  "id": 6
6231
6193
  },
6232
- "onekey_firmware_hash": {
6233
- "type": "bytes",
6194
+ "pin_protection": {
6195
+ "type": "bool",
6234
6196
  "id": 7
6235
6197
  },
6236
- "onekey_romloader_build_id": {
6237
- "type": "string",
6198
+ "passphrase_protection": {
6199
+ "type": "bool",
6238
6200
  "id": 8
6239
6201
  },
6240
- "onekey_bootloader_build_id": {
6202
+ "language": {
6241
6203
  "type": "string",
6242
6204
  "id": 9
6243
6205
  },
6244
- "onekey_firmware_build_id": {
6206
+ "label": {
6245
6207
  "type": "string",
6246
6208
  "id": 10
6247
6209
  },
6248
- "onekey_serial_no": {
6249
- "type": "string",
6250
- "id": 11
6251
- },
6252
- "onekey_coprocessor_bt_name": {
6253
- "type": "string",
6210
+ "initialized": {
6211
+ "type": "bool",
6254
6212
  "id": 12
6255
6213
  },
6256
- "onekey_coprocessor_version": {
6257
- "type": "string",
6214
+ "revision": {
6215
+ "type": "bytes",
6258
6216
  "id": 13
6259
6217
  },
6260
- "onekey_coprocessor_build_id": {
6261
- "type": "string",
6218
+ "bootloader_hash": {
6219
+ "type": "bytes",
6262
6220
  "id": 14
6263
6221
  },
6264
- "onekey_coprocessor_hash": {
6265
- "type": "bytes",
6222
+ "imported": {
6223
+ "type": "bool",
6266
6224
  "id": 15
6267
6225
  },
6268
- "onekey_se_type": {
6269
- "type": "OneKeySeType",
6226
+ "unlocked": {
6227
+ "type": "bool",
6270
6228
  "id": 16
6271
6229
  },
6272
- "onekey_se01_state": {
6273
- "type": "OneKeySEState",
6274
- "id": 17
6230
+ "_passphrase_cached": {
6231
+ "type": "bool",
6232
+ "id": 17,
6233
+ "options": {
6234
+ "deprecated": true
6235
+ }
6275
6236
  },
6276
- "onekey_se02_state": {
6277
- "type": "OneKeySEState",
6237
+ "firmware_present": {
6238
+ "type": "bool",
6278
6239
  "id": 18
6279
6240
  },
6280
- "onekey_se03_state": {
6281
- "type": "OneKeySEState",
6241
+ "needs_backup": {
6242
+ "type": "bool",
6282
6243
  "id": 19
6283
6244
  },
6284
- "onekey_se04_state": {
6285
- "type": "OneKeySEState",
6245
+ "flags": {
6246
+ "type": "uint32",
6286
6247
  "id": 20
6287
6248
  },
6288
- "onekey_se01_version": {
6249
+ "model": {
6289
6250
  "type": "string",
6290
6251
  "id": 21
6291
6252
  },
6292
- "onekey_se02_version": {
6293
- "type": "string",
6253
+ "fw_major": {
6254
+ "type": "uint32",
6294
6255
  "id": 22
6295
6256
  },
6296
- "onekey_se03_version": {
6297
- "type": "string",
6257
+ "fw_minor": {
6258
+ "type": "uint32",
6298
6259
  "id": 23
6299
6260
  },
6300
- "onekey_se04_version": {
6301
- "type": "string",
6261
+ "fw_patch": {
6262
+ "type": "uint32",
6302
6263
  "id": 24
6303
6264
  },
6304
- "onekey_se01_hash": {
6305
- "type": "bytes",
6265
+ "fw_vendor": {
6266
+ "type": "string",
6306
6267
  "id": 25
6307
6268
  },
6308
- "onekey_se02_hash": {
6309
- "type": "bytes",
6310
- "id": 26
6311
- },
6312
- "onekey_se03_hash": {
6313
- "type": "bytes",
6269
+ "unfinished_backup": {
6270
+ "type": "bool",
6314
6271
  "id": 27
6315
6272
  },
6316
- "onekey_se04_hash": {
6317
- "type": "bytes",
6273
+ "no_backup": {
6274
+ "type": "bool",
6318
6275
  "id": 28
6319
6276
  },
6320
- "onekey_se01_build_id": {
6321
- "type": "string",
6277
+ "recovery_mode": {
6278
+ "type": "bool",
6322
6279
  "id": 29
6323
6280
  },
6324
- "onekey_se02_build_id": {
6325
- "type": "string",
6326
- "id": 30
6281
+ "capabilities": {
6282
+ "rule": "repeated",
6283
+ "type": "Capability",
6284
+ "id": 30,
6285
+ "options": {
6286
+ "packed": false
6287
+ }
6327
6288
  },
6328
- "onekey_se03_build_id": {
6329
- "type": "string",
6289
+ "backup_type": {
6290
+ "type": "BackupType",
6330
6291
  "id": 31
6331
6292
  },
6332
- "onekey_se04_build_id": {
6333
- "type": "string",
6293
+ "sd_card_present": {
6294
+ "type": "bool",
6334
6295
  "id": 32
6335
6296
  },
6336
- "onekey_se01_bootloader_version": {
6337
- "type": "string",
6297
+ "sd_protection": {
6298
+ "type": "bool",
6338
6299
  "id": 33
6339
6300
  },
6340
- "onekey_se02_bootloader_version": {
6341
- "type": "string",
6301
+ "wipe_code_protection": {
6302
+ "type": "bool",
6342
6303
  "id": 34
6343
6304
  },
6344
- "onekey_se03_bootloader_version": {
6345
- "type": "string",
6305
+ "session_id": {
6306
+ "type": "bytes",
6346
6307
  "id": 35
6347
6308
  },
6348
- "onekey_se04_bootloader_version": {
6349
- "type": "string",
6309
+ "passphrase_always_on_device": {
6310
+ "type": "bool",
6350
6311
  "id": 36
6351
6312
  },
6352
- "onekey_se01_bootloader_hash": {
6353
- "type": "bytes",
6313
+ "safety_checks": {
6314
+ "type": "SafetyCheckLevel",
6354
6315
  "id": 37
6355
6316
  },
6356
- "onekey_se02_bootloader_hash": {
6357
- "type": "bytes",
6317
+ "auto_lock_delay_ms": {
6318
+ "type": "uint32",
6358
6319
  "id": 38
6359
6320
  },
6360
- "onekey_se03_bootloader_hash": {
6361
- "type": "bytes",
6321
+ "display_rotation": {
6322
+ "type": "uint32",
6362
6323
  "id": 39
6363
6324
  },
6364
- "onekey_se04_bootloader_hash": {
6365
- "type": "bytes",
6325
+ "experimental_features": {
6326
+ "type": "bool",
6366
6327
  "id": 40
6367
6328
  },
6368
- "onekey_se01_bootloader_build_id": {
6329
+ "offset": {
6330
+ "type": "uint32",
6331
+ "id": 500
6332
+ },
6333
+ "coprocessor_bt_name": {
6369
6334
  "type": "string",
6370
- "id": 41
6335
+ "id": 501
6371
6336
  },
6372
- "onekey_se02_bootloader_build_id": {
6337
+ "coprocessor_version": {
6373
6338
  "type": "string",
6374
- "id": 42
6339
+ "id": 502
6375
6340
  },
6376
- "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": {
6377
6350
  "type": "string",
6378
- "id": 43
6351
+ "id": 506
6379
6352
  },
6380
- "onekey_se04_bootloader_build_id": {
6353
+ "backup_only": {
6354
+ "type": "bool",
6355
+ "id": 507
6356
+ },
6357
+ "onekey_version": {
6381
6358
  "type": "string",
6382
- "id": 44
6383
- }
6384
- }
6385
- },
6386
- "LockDevice": {
6387
- "fields": {}
6388
- },
6389
- "SetBusy": {
6390
- "fields": {
6391
- "expiry_ms": {
6392
- "type": "uint32",
6393
- "id": 1
6394
- }
6395
- }
6396
- },
6397
- "ApplySettings": {
6398
- "fields": {
6399
- "language": {
6359
+ "id": 508
6360
+ },
6361
+ "onekey_serial": {
6400
6362
  "type": "string",
6401
- "id": 1
6363
+ "id": 509
6402
6364
  },
6403
- "label": {
6365
+ "bootloader_version": {
6404
6366
  "type": "string",
6405
- "id": 2
6367
+ "id": 510
6406
6368
  },
6407
- "use_passphrase": {
6408
- "type": "bool",
6409
- "id": 3
6369
+ "serial_no": {
6370
+ "type": "string",
6371
+ "id": 511
6410
6372
  },
6411
- "homescreen": {
6412
- "type": "bytes",
6413
- "id": 4
6373
+ "spi_flash": {
6374
+ "type": "string",
6375
+ "id": 512
6414
6376
  },
6415
- "_passphrase_source": {
6377
+ "initstates": {
6416
6378
  "type": "uint32",
6417
- "id": 5,
6418
- "options": {
6419
- "deprecated": true
6420
- }
6379
+ "id": 513
6421
6380
  },
6422
- "auto_lock_delay_ms": {
6423
- "type": "uint32",
6424
- "id": 6
6381
+ "NFT_voucher": {
6382
+ "type": "bytes",
6383
+ "id": 514
6425
6384
  },
6426
- "display_rotation": {
6385
+ "cpu_info": {
6386
+ "type": "string",
6387
+ "id": 515
6388
+ },
6389
+ "pre_firmware": {
6390
+ "type": "string",
6391
+ "id": 516
6392
+ },
6393
+ "coin_switch": {
6427
6394
  "type": "uint32",
6428
- "id": 7
6395
+ "id": 517
6429
6396
  },
6430
- "passphrase_always_on_device": {
6431
- "type": "bool",
6432
- "id": 8
6397
+ "build_id": {
6398
+ "type": "bytes",
6399
+ "id": 518
6433
6400
  },
6434
- "safety_checks": {
6435
- "type": "SafetyCheckLevel",
6436
- "id": 9
6401
+ "romloader_version": {
6402
+ "type": "string",
6403
+ "id": 519
6437
6404
  },
6438
- "experimental_features": {
6405
+ "busy": {
6439
6406
  "type": "bool",
6440
- "id": 10
6441
- }
6442
- }
6443
- },
6444
- "ApplyFlags": {
6445
- "fields": {
6446
- "flags": {
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
6761
+ }
6762
+ },
6763
+ "auto_lock_delay_ms": {
6764
+ "type": "uint32",
6765
+ "id": 6
6766
+ },
6767
+ "display_rotation": {
6768
+ "type": "uint32",
6769
+ "id": 7
6770
+ },
6771
+ "passphrase_always_on_device": {
6772
+ "type": "bool",
6773
+ "id": 8
6774
+ },
6775
+ "safety_checks": {
6776
+ "type": "SafetyCheckLevel",
6777
+ "id": 9
6778
+ },
6779
+ "experimental_features": {
6780
+ "type": "bool",
6781
+ "id": 10
6782
+ }
6783
+ }
6784
+ },
6785
+ "ApplyFlags": {
6786
+ "fields": {
6787
+ "flags": {
6447
6788
  "rule": "required",
6448
6789
  "type": "uint32",
6449
6790
  "id": 1
@@ -6916,49 +7257,6 @@
6916
7257
  }
6917
7258
  }
6918
7259
  },
6919
- "WallpaperTarget": {
6920
- "values": {
6921
- "Home": 0,
6922
- "Lock": 1
6923
- }
6924
- },
6925
- "SetWallpaper": {
6926
- "fields": {
6927
- "target": {
6928
- "rule": "required",
6929
- "type": "WallpaperTarget",
6930
- "id": 1
6931
- },
6932
- "path": {
6933
- "rule": "required",
6934
- "type": "string",
6935
- "id": 2
6936
- }
6937
- }
6938
- },
6939
- "GetWallpaper": {
6940
- "fields": {
6941
- "target": {
6942
- "rule": "required",
6943
- "type": "WallpaperTarget",
6944
- "id": 1
6945
- }
6946
- }
6947
- },
6948
- "Wallpaper": {
6949
- "fields": {
6950
- "target": {
6951
- "rule": "required",
6952
- "type": "WallpaperTarget",
6953
- "id": 1
6954
- },
6955
- "path": {
6956
- "rule": "required",
6957
- "type": "string",
6958
- "id": 2
6959
- }
6960
- }
6961
- },
6962
7260
  "ResourceUpdate": {
6963
7261
  "fields": {
6964
7262
  "file_name": {
@@ -7045,14 +7343,6 @@
7045
7343
  "passphrase_state": {
7046
7344
  "type": "string",
7047
7345
  "id": 1
7048
- },
7049
- "_only_main_pin": {
7050
- "type": "bool",
7051
- "id": 2
7052
- },
7053
- "allow_create_attach_pin": {
7054
- "type": "bool",
7055
- "id": 3
7056
7346
  }
7057
7347
  }
7058
7348
  },
@@ -11098,143 +11388,30 @@
11098
11388
  }
11099
11389
  }
11100
11390
  },
11101
- "ViewAmount": {
11102
- "fields": {
11103
- "is_unlimited": {
11104
- "rule": "required",
11105
- "type": "bool",
11106
- "id": 1
11107
- },
11108
- "num": {
11109
- "rule": "required",
11110
- "type": "string",
11111
- "id": 2
11112
- }
11113
- }
11114
- },
11115
- "ViewDetail": {
11116
- "fields": {
11117
- "key": {
11118
- "rule": "required",
11119
- "type": "uint32",
11120
- "id": 1
11121
- },
11122
- "value": {
11123
- "rule": "required",
11124
- "type": "string",
11125
- "id": 2
11126
- },
11127
- "is_overview": {
11128
- "rule": "required",
11129
- "type": "bool",
11130
- "id": 3
11131
- },
11132
- "has_icon": {
11133
- "rule": "required",
11134
- "type": "bool",
11135
- "id": 4
11136
- }
11137
- }
11138
- },
11139
- "ViewTipType": {
11391
+ "UiAnimationType": {
11140
11392
  "values": {
11141
- "Default": 0,
11142
- "Highlight": 1,
11143
- "Recommend": 2,
11144
- "Warning": 3,
11145
- "Danger": 4
11146
- }
11147
- },
11148
- "ViewTip": {
11149
- "fields": {
11150
- "type": {
11151
- "rule": "required",
11152
- "type": "ViewTipType",
11153
- "id": 1
11154
- },
11155
- "text": {
11156
- "rule": "required",
11157
- "type": "string",
11158
- "id": 2
11159
- }
11160
- }
11161
- },
11162
- "ViewRawData": {
11163
- "fields": {
11164
- "initial_data": {
11165
- "rule": "required",
11166
- "type": "string",
11167
- "id": 1
11168
- },
11169
- "placeholder": {
11170
- "rule": "required",
11171
- "type": "uint32",
11172
- "id": 2
11173
- }
11393
+ "Unknown": 0,
11394
+ "Signing": 1
11174
11395
  }
11175
11396
  },
11176
- "ViewSignLayout": {
11397
+ "UiAnimationCommand": {
11177
11398
  "values": {
11178
- "LayoutDefault": 0,
11179
- "LayoutSafeTxCreate": 1
11180
- }
11181
- },
11182
- "ViewSignPage": {
11183
- "fields": {
11184
- "title": {
11185
- "rule": "required",
11186
- "type": "string",
11187
- "id": 1
11188
- },
11189
- "amount": {
11190
- "type": "ViewAmount",
11191
- "id": 2
11192
- },
11193
- "general": {
11194
- "rule": "repeated",
11195
- "type": "ViewDetail",
11196
- "id": 3
11197
- },
11198
- "tip": {
11199
- "type": "ViewTip",
11200
- "id": 4
11201
- },
11202
- "raw_data": {
11203
- "type": "ViewRawData",
11204
- "id": 5
11205
- },
11206
- "slide_to_confirm": {
11207
- "type": "bool",
11208
- "id": 6,
11209
- "options": {
11210
- "default": true
11211
- }
11212
- },
11213
- "layout": {
11214
- "type": "ViewSignLayout",
11215
- "id": 7,
11216
- "options": {
11217
- "default": "LayoutDefault"
11218
- }
11219
- }
11399
+ "CommandUnknown": 0,
11400
+ "Start": 1,
11401
+ "Stop": 2,
11402
+ "Refresh": 3
11220
11403
  }
11221
11404
  },
11222
- "ViewVerifyPage": {
11405
+ "UiAnimationRequest": {
11223
11406
  "fields": {
11224
- "title": {
11407
+ "command": {
11225
11408
  "rule": "required",
11226
- "type": "string",
11409
+ "type": "UiAnimationCommand",
11227
11410
  "id": 1
11228
11411
  },
11229
- "address": {
11230
- "rule": "required",
11231
- "type": "string",
11412
+ "type": {
11413
+ "type": "UiAnimationType",
11232
11414
  "id": 2
11233
- },
11234
- "path": {
11235
- "rule": "required",
11236
- "type": "string",
11237
- "id": 3
11238
11415
  }
11239
11416
  }
11240
11417
  },
@@ -11321,7 +11498,15 @@
11321
11498
  }
11322
11499
  },
11323
11500
  "ProtocolInfoRequest": {
11324
- "fields": {}
11501
+ "fields": {
11502
+ "eventless_wallet_session": {
11503
+ "type": "bool",
11504
+ "id": 1,
11505
+ "options": {
11506
+ "default": false
11507
+ }
11508
+ }
11509
+ }
11325
11510
  },
11326
11511
  "ProtocolInfo": {
11327
11512
  "fields": {
@@ -11330,17 +11515,18 @@
11330
11515
  "type": "uint32",
11331
11516
  "id": 1
11332
11517
  },
11518
+ "build_fingerprint": {
11519
+ "rule": "required",
11520
+ "type": "string",
11521
+ "id": 2
11522
+ },
11333
11523
  "supported_messages": {
11334
11524
  "rule": "repeated",
11335
11525
  "type": "uint32",
11336
- "id": 2,
11526
+ "id": 3,
11337
11527
  "options": {
11338
11528
  "packed": false
11339
11529
  }
11340
- },
11341
- "protobuf_definition": {
11342
- "type": "string",
11343
- "id": 3
11344
11530
  }
11345
11531
  }
11346
11532
  },
@@ -11394,6 +11580,20 @@
11394
11580
  }
11395
11581
  }
11396
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
+ },
11397
11597
  "DeviceRebootType": {
11398
11598
  "values": {
11399
11599
  "Normal": 0,
@@ -11412,17 +11612,69 @@
11412
11612
  },
11413
11613
  "DeviceSettings": {
11414
11614
  "fields": {
11415
- "label": {
11416
- "type": "string",
11615
+ "bt_enable": {
11616
+ "type": "bool",
11417
11617
  "id": 1
11418
11618
  },
11419
- "bt_enable": {
11420
- "type": "bool",
11421
- "id": 2
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
11422
11674
  },
11423
- "language": {
11675
+ "label": {
11424
11676
  "type": "string",
11425
- "id": 3
11677
+ "id": 104
11426
11678
  }
11427
11679
  }
11428
11680
  },
@@ -11438,6 +11690,27 @@
11438
11690
  }
11439
11691
  }
11440
11692
  },
11693
+ "DeviceSettingsPage": {
11694
+ "values": {
11695
+ "DeviceReset": 0,
11696
+ "DevicePinChange": 1,
11697
+ "DevicePassphrase": 2,
11698
+ "DeviceAirgap": 3
11699
+ }
11700
+ },
11701
+ "DeviceSettingsPageShow": {
11702
+ "fields": {
11703
+ "page": {
11704
+ "rule": "required",
11705
+ "type": "DeviceSettingsPage",
11706
+ "id": 1
11707
+ },
11708
+ "field_name": {
11709
+ "type": "string",
11710
+ "id": 2
11711
+ }
11712
+ }
11713
+ },
11441
11714
  "DeviceCertificate": {
11442
11715
  "fields": {
11443
11716
  "cert_and_pubkey": {
@@ -11481,6 +11754,114 @@
11481
11754
  }
11482
11755
  }
11483
11756
  },
11757
+ "DeviceMiscUsbMscControl": {
11758
+ "fields": {
11759
+ "enable": {
11760
+ "rule": "required",
11761
+ "type": "bool",
11762
+ "id": 1
11763
+ }
11764
+ }
11765
+ },
11766
+ "DeviceFactoryAck": {
11767
+ "values": {
11768
+ "FACTORY_ACK_SUCCESS": 0,
11769
+ "FACTORY_ACK_FAIL": 1
11770
+ }
11771
+ },
11772
+ "DeviceFactoryInfoManufactureTime": {
11773
+ "fields": {
11774
+ "year": {
11775
+ "rule": "required",
11776
+ "type": "uint32",
11777
+ "id": 1
11778
+ },
11779
+ "month": {
11780
+ "rule": "required",
11781
+ "type": "uint32",
11782
+ "id": 2
11783
+ },
11784
+ "day": {
11785
+ "rule": "required",
11786
+ "type": "uint32",
11787
+ "id": 3
11788
+ },
11789
+ "hour": {
11790
+ "rule": "required",
11791
+ "type": "uint32",
11792
+ "id": 4
11793
+ },
11794
+ "minute": {
11795
+ "rule": "required",
11796
+ "type": "uint32",
11797
+ "id": 5
11798
+ },
11799
+ "second": {
11800
+ "rule": "required",
11801
+ "type": "uint32",
11802
+ "id": 6
11803
+ }
11804
+ }
11805
+ },
11806
+ "DeviceFactoryInfo": {
11807
+ "fields": {
11808
+ "version": {
11809
+ "type": "uint32",
11810
+ "id": 1
11811
+ },
11812
+ "serial_number": {
11813
+ "type": "string",
11814
+ "id": 2
11815
+ },
11816
+ "burn_in_completed": {
11817
+ "type": "bool",
11818
+ "id": 3
11819
+ },
11820
+ "factory_test_completed": {
11821
+ "type": "bool",
11822
+ "id": 4
11823
+ },
11824
+ "manufacture_time": {
11825
+ "type": "DeviceFactoryInfoManufactureTime",
11826
+ "id": 5
11827
+ }
11828
+ }
11829
+ },
11830
+ "DeviceFactoryInfoSet": {
11831
+ "fields": {
11832
+ "info": {
11833
+ "rule": "required",
11834
+ "type": "DeviceFactoryInfo",
11835
+ "id": 1
11836
+ }
11837
+ }
11838
+ },
11839
+ "DeviceFactoryInfoGet": {
11840
+ "fields": {}
11841
+ },
11842
+ "DeviceFactoryPermanentLock": {
11843
+ "fields": {
11844
+ "check_a": {
11845
+ "rule": "required",
11846
+ "type": "bytes",
11847
+ "id": 1
11848
+ },
11849
+ "check_b": {
11850
+ "rule": "required",
11851
+ "type": "bytes",
11852
+ "id": 2
11853
+ }
11854
+ }
11855
+ },
11856
+ "DeviceFactoryTest": {
11857
+ "fields": {
11858
+ "burn_in_test": {
11859
+ "rule": "required",
11860
+ "type": "bool",
11861
+ "id": 1
11862
+ }
11863
+ }
11864
+ },
11484
11865
  "DeviceFirmwareTargetType": {
11485
11866
  "values": {
11486
11867
  "FW_MGMT_TARGET_INVALID": 0,
@@ -11588,105 +11969,6 @@
11588
11969
  }
11589
11970
  }
11590
11971
  },
11591
- "DeviceFactoryAck": {
11592
- "values": {
11593
- "FACTORY_ACK_SUCCESS": 0,
11594
- "FACTORY_ACK_FAIL": 1
11595
- }
11596
- },
11597
- "DeviceFactoryInfoManufactureTime": {
11598
- "fields": {
11599
- "year": {
11600
- "rule": "required",
11601
- "type": "uint32",
11602
- "id": 1
11603
- },
11604
- "month": {
11605
- "rule": "required",
11606
- "type": "uint32",
11607
- "id": 2
11608
- },
11609
- "day": {
11610
- "rule": "required",
11611
- "type": "uint32",
11612
- "id": 3
11613
- },
11614
- "hour": {
11615
- "rule": "required",
11616
- "type": "uint32",
11617
- "id": 4
11618
- },
11619
- "minute": {
11620
- "rule": "required",
11621
- "type": "uint32",
11622
- "id": 5
11623
- },
11624
- "second": {
11625
- "rule": "required",
11626
- "type": "uint32",
11627
- "id": 6
11628
- }
11629
- }
11630
- },
11631
- "DeviceFactoryInfo": {
11632
- "fields": {
11633
- "version": {
11634
- "type": "uint32",
11635
- "id": 1
11636
- },
11637
- "serial_number": {
11638
- "type": "string",
11639
- "id": 2
11640
- },
11641
- "burn_in_completed": {
11642
- "type": "bool",
11643
- "id": 3
11644
- },
11645
- "factory_test_completed": {
11646
- "type": "bool",
11647
- "id": 4
11648
- },
11649
- "manufacture_time": {
11650
- "type": "DeviceFactoryInfoManufactureTime",
11651
- "id": 5
11652
- }
11653
- }
11654
- },
11655
- "DeviceFactoryInfoSet": {
11656
- "fields": {
11657
- "info": {
11658
- "rule": "required",
11659
- "type": "DeviceFactoryInfo",
11660
- "id": 1
11661
- }
11662
- }
11663
- },
11664
- "DeviceFactoryInfoGet": {
11665
- "fields": {}
11666
- },
11667
- "DeviceFactoryPermanentLock": {
11668
- "fields": {
11669
- "check_a": {
11670
- "rule": "required",
11671
- "type": "bytes",
11672
- "id": 1
11673
- },
11674
- "check_b": {
11675
- "rule": "required",
11676
- "type": "bytes",
11677
- "id": 2
11678
- }
11679
- }
11680
- },
11681
- "DeviceFactoryTest": {
11682
- "fields": {
11683
- "burn_in_test": {
11684
- "rule": "required",
11685
- "type": "bool",
11686
- "id": 1
11687
- }
11688
- }
11689
- },
11690
11972
  "DeviceType": {
11691
11973
  "values": {
11692
11974
  "CLASSIC1": 0,
@@ -11837,10 +12119,6 @@
11837
12119
  "se4": {
11838
12120
  "type": "bool",
11839
12121
  "id": 430
11840
- },
11841
- "status": {
11842
- "type": "bool",
11843
- "id": 10000
11844
12122
  }
11845
12123
  }
11846
12124
  },
@@ -11910,33 +12188,87 @@
11910
12188
  "se4": {
11911
12189
  "type": "DeviceSEInfo",
11912
12190
  "id": 430
12191
+ }
12192
+ }
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
+ },
12204
+ "DeviceSessionSeedDomain": {
12205
+ "values": {
12206
+ "SeedDomain_Standard": 1,
12207
+ "SeedDomain_Cardano": 2
12208
+ }
12209
+ },
12210
+ "DeviceSessionGet": {
12211
+ "fields": {
12212
+ "session_id": {
12213
+ "type": "bytes",
12214
+ "id": 1
12215
+ },
12216
+ "btc_test_address": {
12217
+ "type": "string",
12218
+ "id": 2
12219
+ },
12220
+ "seed_domains": {
12221
+ "rule": "repeated",
12222
+ "type": "DeviceSessionSeedDomain",
12223
+ "id": 3
12224
+ }
12225
+ }
12226
+ },
12227
+ "DeviceSession": {
12228
+ "fields": {
12229
+ "session_id": {
12230
+ "type": "bytes",
12231
+ "id": 1
11913
12232
  },
11914
- "status": {
11915
- "type": "DeviceStatus",
11916
- "id": 10000
12233
+ "btc_test_address": {
12234
+ "type": "string",
12235
+ "id": 2
11917
12236
  }
11918
12237
  }
11919
12238
  },
11920
- "DeviceSessionGet": {
12239
+ "DeviceSessionPinType": {
12240
+ "values": {
12241
+ "Any": 1,
12242
+ "Main": 2,
12243
+ "AttachToPin": 3
12244
+ }
12245
+ },
12246
+ "DeviceSessionAskPin": {
11921
12247
  "fields": {
11922
- "session_id": {
11923
- "type": "bytes",
12248
+ "type": {
12249
+ "type": "DeviceSessionPinType",
11924
12250
  "id": 1
11925
12251
  }
11926
12252
  }
11927
12253
  },
11928
- "DeviceSession": {
12254
+ "DeviceSessionAskPassphrase": {
11929
12255
  "fields": {
11930
- "session_id": {
11931
- "type": "bytes",
12256
+ "passphrase": {
12257
+ "type": "string",
11932
12258
  "id": 1
11933
12259
  },
11934
- "btc_test_address": {
11935
- "type": "string",
12260
+ "on_device": {
12261
+ "rule": "required",
12262
+ "type": "bool",
11936
12263
  "id": 2
11937
12264
  }
11938
12265
  }
11939
12266
  },
12267
+ "DeviceSessionAskPin_FailureSubCodes": {
12268
+ "values": {
12269
+ "UserCancel": 1
12270
+ }
12271
+ },
11940
12272
  "DeviceStatus": {
11941
12273
  "fields": {
11942
12274
  "device_id": {
@@ -11972,43 +12304,6 @@
11972
12304
  "DeviceStatusGet": {
11973
12305
  "fields": {}
11974
12306
  },
11975
- "DevOnboardingStage": {
11976
- "values": {
11977
- "DEV_ONBOARDING_STAGE_UNKNOWN": 0,
11978
- "DEV_ONBOARDING_STAGE_SAFETY_CHECK": 1,
11979
- "DEV_ONBOARDING_STAGE_PERSONALIZATION": 2,
11980
- "DEV_ONBOARDING_STAGE_SELECT_SETUP_METHOD": 3,
11981
- "DEV_ONBOARDING_STAGE_NEW_DEVICE": 4,
11982
- "DEV_ONBOARDING_STAGE_SELECT_RESTORE_METHOD": 5,
11983
- "DEV_ONBOARDING_STAGE_RESTORE_MNEMONIC": 6,
11984
- "DEV_ONBOARDING_STAGE_RESTORE_SEEDCARD": 7,
11985
- "DEV_ONBOARDING_STAGE_WALLET_READY": 8,
11986
- "DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP_PROMPT": 9,
11987
- "DEV_ONBOARDING_STAGE_SELECT_SEEDCARD_BACKUP_METHOD": 10,
11988
- "DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP": 11,
11989
- "DEV_ONBOARDING_STAGE_DONE": 12
11990
- }
11991
- },
11992
- "DevGetOnboardingStatus": {
11993
- "fields": {}
11994
- },
11995
- "DevOnboardingStatus": {
11996
- "fields": {
11997
- "stage": {
11998
- "rule": "required",
11999
- "type": "DevOnboardingStage",
12000
- "id": 1
12001
- },
12002
- "status_code": {
12003
- "type": "uint32",
12004
- "id": 2
12005
- },
12006
- "detail_code": {
12007
- "type": "uint32",
12008
- "id": 3
12009
- }
12010
- }
12011
- },
12012
12307
  "FilesystemPermissionFix": {
12013
12308
  "fields": {}
12014
12309
  },
@@ -12235,9 +12530,280 @@
12235
12530
  }
12236
12531
  }
12237
12532
  },
12533
+ "InternalMyAddressRequest": {
12534
+ "fields": {
12535
+ "coin_type": {
12536
+ "rule": "required",
12537
+ "type": "uint32",
12538
+ "id": 1
12539
+ },
12540
+ "chain_id": {
12541
+ "rule": "required",
12542
+ "type": "uint32",
12543
+ "id": 2
12544
+ },
12545
+ "account_index": {
12546
+ "rule": "required",
12547
+ "type": "uint32",
12548
+ "id": 3
12549
+ },
12550
+ "derive_type": {
12551
+ "rule": "required",
12552
+ "type": "uint32",
12553
+ "id": 4
12554
+ }
12555
+ }
12556
+ },
12557
+ "NftUpdate": {
12558
+ "fields": {
12559
+ "file_name_no_ext": {
12560
+ "rule": "required",
12561
+ "type": "string",
12562
+ "id": 1
12563
+ }
12564
+ }
12565
+ },
12566
+ "OnboardingStep": {
12567
+ "values": {
12568
+ "ONBOARDING_STEP_UNKNOWN": 0,
12569
+ "ONBOARDING_STEP_CHECKING": 1,
12570
+ "ONBOARDING_STEP_PERSONALIZATION": 2,
12571
+ "ONBOARDING_STEP_PIN": 3,
12572
+ "ONBOARDING_STEP_SETUP": 4,
12573
+ "ONBOARDING_STEP_DONE": 5
12574
+ }
12575
+ },
12576
+ "OnboardingPhase": {
12577
+ "values": {
12578
+ "ONBOARDING_PHASE_UNKNOWN": 0,
12579
+ "ONBOARDING_PHASE_SAFETY_CHECK": 1,
12580
+ "ONBOARDING_PHASE_PIN_SETUP": 2,
12581
+ "ONBOARDING_PHASE_FINGERPRINT_SETUP": 3,
12582
+ "ONBOARDING_PHASE_SETUP_CHOICE": 4,
12583
+ "ONBOARDING_PHASE_WALLET_CREATE_START": 5,
12584
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW": 6,
12585
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM": 7,
12586
+ "ONBOARDING_PHASE_RESTORE_METHOD_CHOICE": 8,
12587
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE": 9,
12588
+ "ONBOARDING_PHASE_SEEDCARD_RESTORE": 10,
12589
+ "ONBOARDING_PHASE_WALLET_READY": 11,
12590
+ "ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT": 12,
12591
+ "ONBOARDING_PHASE_SEEDCARD_BACKUP": 13
12592
+ }
12593
+ },
12594
+ "OnboardingSetupKind": {
12595
+ "values": {
12596
+ "ONBOARDING_SETUP_KIND_UNKNOWN": 0,
12597
+ "ONBOARDING_SETUP_KIND_CHOICE": 1,
12598
+ "ONBOARDING_SETUP_KIND_CREATE": 2,
12599
+ "ONBOARDING_SETUP_KIND_RESTORE": 3
12600
+ }
12601
+ },
12602
+ "OnboardingSetupMethod": {
12603
+ "values": {
12604
+ "ONBOARDING_SETUP_METHOD_UNKNOWN": 0,
12605
+ "ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE": 1,
12606
+ "ONBOARDING_SETUP_METHOD_SEEDCARD": 2
12607
+ }
12608
+ },
12609
+ "OnboardingSetupStatus": {
12610
+ "fields": {
12611
+ "kind": {
12612
+ "type": "OnboardingSetupKind",
12613
+ "id": 1
12614
+ },
12615
+ "method": {
12616
+ "type": "OnboardingSetupMethod",
12617
+ "id": 2
12618
+ }
12619
+ }
12620
+ },
12621
+ "OnboardingStatusGet": {
12622
+ "fields": {}
12623
+ },
12624
+ "OnboardingStatus": {
12625
+ "fields": {
12626
+ "step": {
12627
+ "type": "OnboardingStep",
12628
+ "id": 1
12629
+ },
12630
+ "phase": {
12631
+ "type": "OnboardingPhase",
12632
+ "id": 2
12633
+ },
12634
+ "setup": {
12635
+ "type": "OnboardingSetupStatus",
12636
+ "id": 3
12637
+ },
12638
+ "pin_set": {
12639
+ "type": "bool",
12640
+ "id": 4
12641
+ },
12642
+ "wallet_initialized": {
12643
+ "type": "bool",
12644
+ "id": 5
12645
+ }
12646
+ }
12647
+ },
12238
12648
  "PortfolioUpdate": {
12239
12649
  "fields": {}
12240
12650
  },
12651
+ "ViewAmount": {
12652
+ "fields": {
12653
+ "is_unlimited": {
12654
+ "rule": "required",
12655
+ "type": "bool",
12656
+ "id": 1
12657
+ },
12658
+ "num": {
12659
+ "rule": "required",
12660
+ "type": "string",
12661
+ "id": 2
12662
+ }
12663
+ }
12664
+ },
12665
+ "ViewDetail": {
12666
+ "fields": {
12667
+ "key": {
12668
+ "rule": "required",
12669
+ "type": "uint32",
12670
+ "id": 1
12671
+ },
12672
+ "value": {
12673
+ "rule": "required",
12674
+ "type": "string",
12675
+ "id": 2
12676
+ },
12677
+ "is_overview": {
12678
+ "rule": "required",
12679
+ "type": "bool",
12680
+ "id": 3
12681
+ },
12682
+ "has_icon": {
12683
+ "rule": "required",
12684
+ "type": "bool",
12685
+ "id": 4
12686
+ }
12687
+ }
12688
+ },
12689
+ "ViewTipType": {
12690
+ "values": {
12691
+ "Default": 0,
12692
+ "Highlight": 1,
12693
+ "Recommend": 2,
12694
+ "Warning": 3,
12695
+ "Danger": 4
12696
+ }
12697
+ },
12698
+ "ViewTip": {
12699
+ "fields": {
12700
+ "type": {
12701
+ "rule": "required",
12702
+ "type": "ViewTipType",
12703
+ "id": 1
12704
+ },
12705
+ "text": {
12706
+ "rule": "required",
12707
+ "type": "string",
12708
+ "id": 2
12709
+ }
12710
+ }
12711
+ },
12712
+ "ViewRawData": {
12713
+ "fields": {
12714
+ "initial_data": {
12715
+ "rule": "required",
12716
+ "type": "string",
12717
+ "id": 1
12718
+ },
12719
+ "placeholder": {
12720
+ "rule": "required",
12721
+ "type": "uint32",
12722
+ "id": 2
12723
+ }
12724
+ }
12725
+ },
12726
+ "ViewSignLayout": {
12727
+ "values": {
12728
+ "LayoutDefault": 0,
12729
+ "LayoutSafeTxCreate": 1,
12730
+ "LayoutFinalConfirm": 2,
12731
+ "Layout7702": 3,
12732
+ "LayoutFlat": 4,
12733
+ "LayoutEthApprove": 5
12734
+ }
12735
+ },
12736
+ "ViewSignPage": {
12737
+ "fields": {
12738
+ "title": {
12739
+ "rule": "required",
12740
+ "type": "string",
12741
+ "id": 1
12742
+ },
12743
+ "amount": {
12744
+ "type": "ViewAmount",
12745
+ "id": 2
12746
+ },
12747
+ "general": {
12748
+ "rule": "repeated",
12749
+ "type": "ViewDetail",
12750
+ "id": 3
12751
+ },
12752
+ "tip": {
12753
+ "type": "ViewTip",
12754
+ "id": 4
12755
+ },
12756
+ "raw_data": {
12757
+ "type": "ViewRawData",
12758
+ "id": 5
12759
+ },
12760
+ "slide_to_confirm": {
12761
+ "type": "bool",
12762
+ "id": 6,
12763
+ "options": {
12764
+ "default": true
12765
+ }
12766
+ },
12767
+ "layout": {
12768
+ "type": "ViewSignLayout",
12769
+ "id": 7,
12770
+ "options": {
12771
+ "default": "LayoutDefault"
12772
+ }
12773
+ }
12774
+ }
12775
+ },
12776
+ "ViewVerifyPage": {
12777
+ "fields": {
12778
+ "title": {
12779
+ "rule": "required",
12780
+ "type": "string",
12781
+ "id": 1
12782
+ },
12783
+ "address": {
12784
+ "rule": "required",
12785
+ "type": "string",
12786
+ "id": 2
12787
+ },
12788
+ "path": {
12789
+ "rule": "required",
12790
+ "type": "string",
12791
+ "id": 3
12792
+ },
12793
+ "network": {
12794
+ "type": "string",
12795
+ "id": 4
12796
+ },
12797
+ "derive_type": {
12798
+ "type": "string",
12799
+ "id": 5
12800
+ },
12801
+ "value_key": {
12802
+ "type": "uint32",
12803
+ "id": 6
12804
+ }
12805
+ }
12806
+ },
12241
12807
  "google": {
12242
12808
  "nested": {
12243
12809
  "protobuf": {