@onekeyfe/hd-transport 1.2.0-alpha.13 → 1.2.0-alpha.131

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 (59) hide show
  1. package/__tests__/messages.test.js +144 -4
  2. package/__tests__/protocol-v2-ble-frame-writer.test.js +119 -0
  3. package/__tests__/protocol-v2-link-manager.test.js +176 -9
  4. package/__tests__/protocol-v2-usb-transport-base.test.js +36 -2
  5. package/__tests__/protocol-v2.test.js +540 -108
  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 +645 -217
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +679 -153
  12. package/dist/protocols/index.d.ts +17 -1
  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 +11 -0
  17. package/dist/protocols/v2/decode.d.ts.map +1 -1
  18. package/dist/protocols/v2/errors.d.ts +16 -0
  19. package/dist/protocols/v2/errors.d.ts.map +1 -0
  20. package/dist/protocols/v2/frame-assembler.d.ts.map +1 -1
  21. package/dist/protocols/v2/index.d.ts +2 -0
  22. package/dist/protocols/v2/index.d.ts.map +1 -1
  23. package/dist/protocols/v2/link-manager.d.ts +5 -0
  24. package/dist/protocols/v2/link-manager.d.ts.map +1 -1
  25. package/dist/protocols/v2/session.d.ts +14 -4
  26. package/dist/protocols/v2/session.d.ts.map +1 -1
  27. package/dist/protocols/v2/usb-transport-base.d.ts +2 -0
  28. package/dist/protocols/v2/usb-transport-base.d.ts.map +1 -1
  29. package/dist/serialization/protobuf/decode.d.ts.map +1 -1
  30. package/dist/serialization/protobuf/encode.d.ts.map +1 -1
  31. package/dist/types/messages.d.ts +301 -156
  32. package/dist/types/messages.d.ts.map +1 -1
  33. package/dist/types/transport.d.ts +21 -3
  34. package/dist/types/transport.d.ts.map +1 -1
  35. package/dist/utils/transportLog.d.ts +9 -0
  36. package/dist/utils/transportLog.d.ts.map +1 -0
  37. package/messages-protocol-v2.json +523 -449
  38. package/package.json +2 -2
  39. package/scripts/protobuf-build.sh +112 -32
  40. package/scripts/protobuf-patches/index.js +1 -0
  41. package/scripts/protobuf-types.js +10 -1
  42. package/src/constants.ts +30 -16
  43. package/src/index.ts +5 -1
  44. package/src/protocols/index.ts +114 -3
  45. package/src/protocols/v2/ble-frame-writer.ts +77 -0
  46. package/src/protocols/v2/crc8.ts +1 -1
  47. package/src/protocols/v2/decode.ts +49 -12
  48. package/src/protocols/v2/encode.ts +1 -1
  49. package/src/protocols/v2/errors.ts +54 -0
  50. package/src/protocols/v2/frame-assembler.ts +6 -4
  51. package/src/protocols/v2/index.ts +2 -0
  52. package/src/protocols/v2/link-manager.ts +65 -5
  53. package/src/protocols/v2/session.ts +224 -80
  54. package/src/protocols/v2/usb-transport-base.ts +42 -10
  55. package/src/serialization/protobuf/decode.ts +4 -1
  56. package/src/serialization/protobuf/encode.ts +5 -1
  57. package/src/types/messages.ts +375 -198
  58. package/src/types/transport.ts +30 -3
  59. package/src/utils/transportLog.ts +102 -0
@@ -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,11 +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
428
  "MessageType_DeviceFactoryInfoSet": 60000,
457
429
  "MessageType_DeviceFactoryInfoGet": 60001,
458
430
  "MessageType_DeviceFactoryInfo": 60002,
@@ -473,18 +445,11 @@
473
445
  "MessageType_DeviceCertificateRead": 60422,
474
446
  "MessageType_DeviceCertificateSignature": 60423,
475
447
  "MessageType_DeviceCertificateSign": 60424,
476
- "MessageType_SetWallpaper": 60430,
477
- "MessageType_GetWallpaper": 60431,
478
- "MessageType_Wallpaper": 60432,
448
+ "MessageType_DeviceMiscUsbMscControl": 60440,
479
449
  "MessageType_DeviceInfoGet": 60600,
480
450
  "MessageType_DeviceInfo": 60601,
481
451
  "MessageType_DeviceStatusGet": 60602,
482
452
  "MessageType_DeviceStatus": 60603,
483
- "MessageType_DevGetOnboardingStatus": 60604,
484
- "MessageType_DevOnboardingStatus": 60605,
485
- "MessageType_DeviceSessionGet": 60606,
486
- "MessageType_DeviceSession": 60607,
487
- "MessageType_DeviceSessionAskPin": 60608,
488
453
  "MessageType_FilesystemPermissionFix": 60800,
489
454
  "MessageType_FilesystemPathInfo": 60801,
490
455
  "MessageType_FilesystemPathInfoQuery": 60802,
@@ -497,10 +462,18 @@
497
462
  "MessageType_FilesystemDirMake": 60809,
498
463
  "MessageType_FilesystemDirRemove": 60810,
499
464
  "MessageType_FilesystemFormat": 60811,
500
- "MessageType_DeviceFirmwareUpdateRequest": 61000,
501
- "MessageType_DeviceFirmwareUpdateStatusGet": 61001,
502
- "MessageType_DeviceFirmwareUpdateStatus": 61002,
503
- "MessageType_PortfolioUpdate": 61200
465
+ "MessageType_DeviceFirmwareUpdateStage": 61000,
466
+ "MessageType_DeviceFirmwareUpdateRequest": 61001,
467
+ "MessageType_DeviceFirmwareUpdateStatusGet": 61002,
468
+ "MessageType_DeviceFirmwareUpdateStatus": 61003,
469
+ "MessageType_DeviceSessionGet": 61200,
470
+ "MessageType_DeviceSession": 61201,
471
+ "MessageType_DeviceSessionAskPin": 61202,
472
+ "MessageType_DeviceSessionAskPassphrase": 61203,
473
+ "MessageType_PortfolioUpdate": 61400,
474
+ "MessageType_NftUpdate": 61500,
475
+ "MessageType_OnboardingStatusGet": 61600,
476
+ "MessageType_OnboardingStatus": 61601
504
477
  },
505
478
  "reserved": [
506
479
  [90, 92],
@@ -5959,30 +5932,6 @@
5959
5932
  }
5960
5933
  }
5961
5934
  },
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
5935
  "KaspaGetAddress": {
5987
5936
  "fields": {
5988
5937
  "address_n": {
@@ -6187,28 +6136,6 @@
6187
6136
  }
6188
6137
  }
6189
6138
  },
6190
- "StartSession": {
6191
- "fields": {
6192
- "session_id": {
6193
- "type": "bytes",
6194
- "id": 1
6195
- },
6196
- "_skip_passphrase": {
6197
- "type": "bool",
6198
- "id": 2,
6199
- "options": {
6200
- "deprecated": true
6201
- }
6202
- },
6203
- "derive_cardano": {
6204
- "type": "bool",
6205
- "id": 3
6206
- }
6207
- }
6208
- },
6209
- "EndSession": {
6210
- "fields": {}
6211
- },
6212
6139
  "GetFeatures": {
6213
6140
  "fields": {}
6214
6141
  },
@@ -7331,49 +7258,6 @@
7331
7258
  }
7332
7259
  }
7333
7260
  },
7334
- "WallpaperTarget": {
7335
- "values": {
7336
- "Home": 0,
7337
- "Lock": 1
7338
- }
7339
- },
7340
- "SetWallpaper": {
7341
- "fields": {
7342
- "target": {
7343
- "rule": "required",
7344
- "type": "WallpaperTarget",
7345
- "id": 1
7346
- },
7347
- "path": {
7348
- "rule": "required",
7349
- "type": "string",
7350
- "id": 2
7351
- }
7352
- }
7353
- },
7354
- "GetWallpaper": {
7355
- "fields": {
7356
- "target": {
7357
- "rule": "required",
7358
- "type": "WallpaperTarget",
7359
- "id": 1
7360
- }
7361
- }
7362
- },
7363
- "Wallpaper": {
7364
- "fields": {
7365
- "target": {
7366
- "rule": "required",
7367
- "type": "WallpaperTarget",
7368
- "id": 1
7369
- },
7370
- "path": {
7371
- "rule": "required",
7372
- "type": "string",
7373
- "id": 2
7374
- }
7375
- }
7376
- },
7377
7261
  "ResourceUpdate": {
7378
7262
  "fields": {
7379
7263
  "file_name": {
@@ -11505,146 +11389,30 @@
11505
11389
  }
11506
11390
  }
11507
11391
  },
11508
- "ViewAmount": {
11509
- "fields": {
11510
- "is_unlimited": {
11511
- "rule": "required",
11512
- "type": "bool",
11513
- "id": 1
11514
- },
11515
- "num": {
11516
- "rule": "required",
11517
- "type": "string",
11518
- "id": 2
11519
- }
11520
- }
11521
- },
11522
- "ViewDetail": {
11523
- "fields": {
11524
- "key": {
11525
- "rule": "required",
11526
- "type": "uint32",
11527
- "id": 1
11528
- },
11529
- "value": {
11530
- "rule": "required",
11531
- "type": "string",
11532
- "id": 2
11533
- },
11534
- "is_overview": {
11535
- "rule": "required",
11536
- "type": "bool",
11537
- "id": 3
11538
- },
11539
- "has_icon": {
11540
- "rule": "required",
11541
- "type": "bool",
11542
- "id": 4
11543
- }
11544
- }
11545
- },
11546
- "ViewTipType": {
11392
+ "UiAnimationType": {
11547
11393
  "values": {
11548
- "Default": 0,
11549
- "Highlight": 1,
11550
- "Recommend": 2,
11551
- "Warning": 3,
11552
- "Danger": 4
11553
- }
11554
- },
11555
- "ViewTip": {
11556
- "fields": {
11557
- "type": {
11558
- "rule": "required",
11559
- "type": "ViewTipType",
11560
- "id": 1
11561
- },
11562
- "text": {
11563
- "rule": "required",
11564
- "type": "string",
11565
- "id": 2
11566
- }
11567
- }
11568
- },
11569
- "ViewRawData": {
11570
- "fields": {
11571
- "initial_data": {
11572
- "rule": "required",
11573
- "type": "string",
11574
- "id": 1
11575
- },
11576
- "placeholder": {
11577
- "rule": "required",
11578
- "type": "uint32",
11579
- "id": 2
11580
- }
11394
+ "Unknown": 0,
11395
+ "Signing": 1
11581
11396
  }
11582
11397
  },
11583
- "ViewSignLayout": {
11398
+ "UiAnimationCommand": {
11584
11399
  "values": {
11585
- "LayoutDefault": 0,
11586
- "LayoutSafeTxCreate": 1,
11587
- "LayoutFinalConfirm": 2,
11588
- "Layout7702": 3,
11589
- "LayoutFlat": 4
11590
- }
11591
- },
11592
- "ViewSignPage": {
11593
- "fields": {
11594
- "title": {
11595
- "rule": "required",
11596
- "type": "string",
11597
- "id": 1
11598
- },
11599
- "amount": {
11600
- "type": "ViewAmount",
11601
- "id": 2
11602
- },
11603
- "general": {
11604
- "rule": "repeated",
11605
- "type": "ViewDetail",
11606
- "id": 3
11607
- },
11608
- "tip": {
11609
- "type": "ViewTip",
11610
- "id": 4
11611
- },
11612
- "raw_data": {
11613
- "type": "ViewRawData",
11614
- "id": 5
11615
- },
11616
- "slide_to_confirm": {
11617
- "type": "bool",
11618
- "id": 6,
11619
- "options": {
11620
- "default": true
11621
- }
11622
- },
11623
- "layout": {
11624
- "type": "ViewSignLayout",
11625
- "id": 7,
11626
- "options": {
11627
- "default": "LayoutDefault"
11628
- }
11629
- }
11400
+ "CommandUnknown": 0,
11401
+ "Start": 1,
11402
+ "Stop": 2,
11403
+ "Refresh": 3
11630
11404
  }
11631
11405
  },
11632
- "ViewVerifyPage": {
11406
+ "UiAnimationRequest": {
11633
11407
  "fields": {
11634
- "title": {
11408
+ "command": {
11635
11409
  "rule": "required",
11636
- "type": "string",
11410
+ "type": "UiAnimationCommand",
11637
11411
  "id": 1
11638
11412
  },
11639
- "address": {
11640
- "rule": "required",
11641
- "type": "string",
11413
+ "type": {
11414
+ "type": "UiAnimationType",
11642
11415
  "id": 2
11643
- },
11644
- "path": {
11645
- "rule": "required",
11646
- "type": "string",
11647
- "id": 3
11648
11416
  }
11649
11417
  }
11650
11418
  },
@@ -11731,7 +11499,15 @@
11731
11499
  }
11732
11500
  },
11733
11501
  "ProtocolInfoRequest": {
11734
- "fields": {}
11502
+ "fields": {
11503
+ "eventless_wallet_session": {
11504
+ "type": "bool",
11505
+ "id": 1,
11506
+ "options": {
11507
+ "default": false
11508
+ }
11509
+ }
11510
+ }
11735
11511
  },
11736
11512
  "ProtocolInfo": {
11737
11513
  "fields": {
@@ -11740,17 +11516,18 @@
11740
11516
  "type": "uint32",
11741
11517
  "id": 1
11742
11518
  },
11519
+ "build_fingerprint": {
11520
+ "rule": "required",
11521
+ "type": "string",
11522
+ "id": 2
11523
+ },
11743
11524
  "supported_messages": {
11744
11525
  "rule": "repeated",
11745
11526
  "type": "uint32",
11746
- "id": 2,
11527
+ "id": 3,
11747
11528
  "options": {
11748
11529
  "packed": false
11749
11530
  }
11750
- },
11751
- "protobuf_definition": {
11752
- "type": "string",
11753
- "id": 3
11754
11531
  }
11755
11532
  }
11756
11533
  },
@@ -11836,73 +11613,69 @@
11836
11613
  },
11837
11614
  "DeviceSettings": {
11838
11615
  "fields": {
11839
- "label": {
11840
- "type": "string",
11841
- "id": 1
11842
- },
11843
11616
  "bt_enable": {
11844
11617
  "type": "bool",
11845
- "id": 2
11618
+ "id": 1
11846
11619
  },
11847
11620
  "language": {
11848
11621
  "type": "string",
11849
- "id": 3
11622
+ "id": 2
11850
11623
  },
11851
11624
  "wallpaper_path": {
11852
11625
  "type": "string",
11853
- "id": 4
11854
- },
11855
- "passphrase_enable": {
11856
- "type": "bool",
11857
- "id": 6
11626
+ "id": 3
11858
11627
  },
11859
11628
  "brightness": {
11860
11629
  "type": "uint32",
11861
- "id": 7
11862
- },
11863
- "autolock_delay_ms": {
11864
- "type": "uint32",
11865
- "id": 8
11866
- },
11867
- "autoshutdown_delay_ms": {
11868
- "type": "uint32",
11869
- "id": 9
11630
+ "id": 4
11870
11631
  },
11871
11632
  "animation_enable": {
11872
11633
  "type": "bool",
11873
- "id": 10
11634
+ "id": 5
11874
11635
  },
11875
11636
  "tap_to_wake": {
11876
11637
  "type": "bool",
11877
- "id": 11
11638
+ "id": 6
11878
11639
  },
11879
11640
  "haptic_feedback": {
11880
11641
  "type": "bool",
11881
- "id": 12
11642
+ "id": 7
11882
11643
  },
11883
11644
  "device_name_display_enabled": {
11884
11645
  "type": "bool",
11885
- "id": 13
11646
+ "id": 8
11886
11647
  },
11887
11648
  "airgap_mode": {
11888
11649
  "type": "bool",
11889
- "id": 14
11650
+ "id": 9
11890
11651
  },
11891
- "fido_enabled": {
11652
+ "usb_lock_enable": {
11892
11653
  "type": "bool",
11893
- "id": 15
11654
+ "id": 10
11894
11655
  },
11895
- "experimental_features": {
11656
+ "random_keypad": {
11896
11657
  "type": "bool",
11897
- "id": 16
11658
+ "id": 11
11898
11659
  },
11899
- "usb_lock_enable": {
11660
+ "passphrase_enable": {
11900
11661
  "type": "bool",
11901
- "id": 17
11662
+ "id": 100
11902
11663
  },
11903
- "random_keypad": {
11664
+ "fido_enabled": {
11904
11665
  "type": "bool",
11905
- "id": 18
11666
+ "id": 101
11667
+ },
11668
+ "autolock_delay_ms": {
11669
+ "type": "uint32",
11670
+ "id": 102
11671
+ },
11672
+ "autoshutdown_delay_ms": {
11673
+ "type": "uint32",
11674
+ "id": 103
11675
+ },
11676
+ "label": {
11677
+ "type": "string",
11678
+ "id": 104
11906
11679
  }
11907
11680
  }
11908
11681
  },
@@ -11982,6 +11755,114 @@
11982
11755
  }
11983
11756
  }
11984
11757
  },
11758
+ "DeviceMiscUsbMscControl": {
11759
+ "fields": {
11760
+ "enable": {
11761
+ "rule": "required",
11762
+ "type": "bool",
11763
+ "id": 1
11764
+ }
11765
+ }
11766
+ },
11767
+ "DeviceFactoryAck": {
11768
+ "values": {
11769
+ "FACTORY_ACK_SUCCESS": 0,
11770
+ "FACTORY_ACK_FAIL": 1
11771
+ }
11772
+ },
11773
+ "DeviceFactoryInfoManufactureTime": {
11774
+ "fields": {
11775
+ "year": {
11776
+ "rule": "required",
11777
+ "type": "uint32",
11778
+ "id": 1
11779
+ },
11780
+ "month": {
11781
+ "rule": "required",
11782
+ "type": "uint32",
11783
+ "id": 2
11784
+ },
11785
+ "day": {
11786
+ "rule": "required",
11787
+ "type": "uint32",
11788
+ "id": 3
11789
+ },
11790
+ "hour": {
11791
+ "rule": "required",
11792
+ "type": "uint32",
11793
+ "id": 4
11794
+ },
11795
+ "minute": {
11796
+ "rule": "required",
11797
+ "type": "uint32",
11798
+ "id": 5
11799
+ },
11800
+ "second": {
11801
+ "rule": "required",
11802
+ "type": "uint32",
11803
+ "id": 6
11804
+ }
11805
+ }
11806
+ },
11807
+ "DeviceFactoryInfo": {
11808
+ "fields": {
11809
+ "version": {
11810
+ "type": "uint32",
11811
+ "id": 1
11812
+ },
11813
+ "serial_number": {
11814
+ "type": "string",
11815
+ "id": 2
11816
+ },
11817
+ "factory_test_completed": {
11818
+ "type": "bool",
11819
+ "id": 4
11820
+ },
11821
+ "factory_burn_in_completed": {
11822
+ "type": "bool",
11823
+ "id": 3
11824
+ },
11825
+ "manufacture_time": {
11826
+ "type": "DeviceFactoryInfoManufactureTime",
11827
+ "id": 5
11828
+ }
11829
+ }
11830
+ },
11831
+ "DeviceFactoryInfoSet": {
11832
+ "fields": {
11833
+ "info": {
11834
+ "rule": "required",
11835
+ "type": "DeviceFactoryInfo",
11836
+ "id": 1
11837
+ }
11838
+ }
11839
+ },
11840
+ "DeviceFactoryInfoGet": {
11841
+ "fields": {}
11842
+ },
11843
+ "DeviceFactoryPermanentLock": {
11844
+ "fields": {
11845
+ "check_a": {
11846
+ "rule": "required",
11847
+ "type": "bytes",
11848
+ "id": 1
11849
+ },
11850
+ "check_b": {
11851
+ "rule": "required",
11852
+ "type": "bytes",
11853
+ "id": 2
11854
+ }
11855
+ }
11856
+ },
11857
+ "DeviceFactoryTest": {
11858
+ "fields": {
11859
+ "burn_in_test": {
11860
+ "rule": "required",
11861
+ "type": "bool",
11862
+ "id": 1
11863
+ }
11864
+ }
11865
+ },
11985
11866
  "DeviceFirmwareTargetType": {
11986
11867
  "values": {
11987
11868
  "FW_MGMT_TARGET_INVALID": 0,
@@ -12026,7 +11907,7 @@
12026
11907
  }
12027
11908
  }
12028
11909
  },
12029
- "DeviceFirmwareUpdateRequest": {
11910
+ "DeviceFirmwareUpdateStage": {
12030
11911
  "fields": {
12031
11912
  "targets": {
12032
11913
  "rule": "repeated",
@@ -12035,6 +11916,9 @@
12035
11916
  }
12036
11917
  }
12037
11918
  },
11919
+ "DeviceFirmwareUpdateRequest": {
11920
+ "fields": {}
11921
+ },
12038
11922
  "DeviceFirmwareUpdateRecord": {
12039
11923
  "fields": {
12040
11924
  "target_id": {
@@ -12089,105 +11973,6 @@
12089
11973
  }
12090
11974
  }
12091
11975
  },
12092
- "DeviceFactoryAck": {
12093
- "values": {
12094
- "FACTORY_ACK_SUCCESS": 0,
12095
- "FACTORY_ACK_FAIL": 1
12096
- }
12097
- },
12098
- "DeviceFactoryInfoManufactureTime": {
12099
- "fields": {
12100
- "year": {
12101
- "rule": "required",
12102
- "type": "uint32",
12103
- "id": 1
12104
- },
12105
- "month": {
12106
- "rule": "required",
12107
- "type": "uint32",
12108
- "id": 2
12109
- },
12110
- "day": {
12111
- "rule": "required",
12112
- "type": "uint32",
12113
- "id": 3
12114
- },
12115
- "hour": {
12116
- "rule": "required",
12117
- "type": "uint32",
12118
- "id": 4
12119
- },
12120
- "minute": {
12121
- "rule": "required",
12122
- "type": "uint32",
12123
- "id": 5
12124
- },
12125
- "second": {
12126
- "rule": "required",
12127
- "type": "uint32",
12128
- "id": 6
12129
- }
12130
- }
12131
- },
12132
- "DeviceFactoryInfo": {
12133
- "fields": {
12134
- "version": {
12135
- "type": "uint32",
12136
- "id": 1
12137
- },
12138
- "serial_number": {
12139
- "type": "string",
12140
- "id": 2
12141
- },
12142
- "burn_in_completed": {
12143
- "type": "bool",
12144
- "id": 3
12145
- },
12146
- "factory_test_completed": {
12147
- "type": "bool",
12148
- "id": 4
12149
- },
12150
- "manufacture_time": {
12151
- "type": "DeviceFactoryInfoManufactureTime",
12152
- "id": 5
12153
- }
12154
- }
12155
- },
12156
- "DeviceFactoryInfoSet": {
12157
- "fields": {
12158
- "info": {
12159
- "rule": "required",
12160
- "type": "DeviceFactoryInfo",
12161
- "id": 1
12162
- }
12163
- }
12164
- },
12165
- "DeviceFactoryInfoGet": {
12166
- "fields": {}
12167
- },
12168
- "DeviceFactoryPermanentLock": {
12169
- "fields": {
12170
- "check_a": {
12171
- "rule": "required",
12172
- "type": "bytes",
12173
- "id": 1
12174
- },
12175
- "check_b": {
12176
- "rule": "required",
12177
- "type": "bytes",
12178
- "id": 2
12179
- }
12180
- }
12181
- },
12182
- "DeviceFactoryTest": {
12183
- "fields": {
12184
- "burn_in_test": {
12185
- "rule": "required",
12186
- "type": "bool",
12187
- "id": 1
12188
- }
12189
- }
12190
- },
12191
11976
  "DeviceType": {
12192
11977
  "values": {
12193
11978
  "CLASSIC1": 0,
@@ -12315,7 +12100,7 @@
12315
12100
  "type": "bool",
12316
12101
  "id": 100
12317
12102
  },
12318
- "fw": {
12103
+ "main_mcu": {
12319
12104
  "type": "bool",
12320
12105
  "id": 200
12321
12106
  },
@@ -12338,10 +12123,6 @@
12338
12123
  "se4": {
12339
12124
  "type": "bool",
12340
12125
  "id": 430
12341
- },
12342
- "status": {
12343
- "type": "bool",
12344
- "id": 10000
12345
12126
  }
12346
12127
  }
12347
12128
  },
@@ -12388,7 +12169,7 @@
12388
12169
  "type": "DeviceHardwareInfo",
12389
12170
  "id": 100
12390
12171
  },
12391
- "fw": {
12172
+ "main_mcu": {
12392
12173
  "type": "DeviceMainMcuInfo",
12393
12174
  "id": 200
12394
12175
  },
@@ -12411,18 +12192,39 @@
12411
12192
  "se4": {
12412
12193
  "type": "DeviceSEInfo",
12413
12194
  "id": 430
12414
- },
12415
- "status": {
12416
- "type": "DeviceStatus",
12417
- "id": 10000
12418
12195
  }
12419
12196
  }
12420
12197
  },
12198
+ "DeviceSessionErrorCode": {
12199
+ "values": {
12200
+ "DeviceSessionError_None": 0,
12201
+ "DeviceSessionError_UserCancelled": 1,
12202
+ "DeviceSessionError_InvalidSession": 2,
12203
+ "DeviceSessionError_AttachPinUnavailable": 3,
12204
+ "DeviceSessionError_PassphraseDisabled": 4,
12205
+ "DeviceSessionError_Busy": 5
12206
+ }
12207
+ },
12208
+ "DeviceSessionSeedDomain": {
12209
+ "values": {
12210
+ "SeedDomain_Standard": 1,
12211
+ "SeedDomain_Cardano": 2
12212
+ }
12213
+ },
12421
12214
  "DeviceSessionGet": {
12422
12215
  "fields": {
12423
12216
  "session_id": {
12424
12217
  "type": "bytes",
12425
12218
  "id": 1
12219
+ },
12220
+ "btc_test_address": {
12221
+ "type": "string",
12222
+ "id": 2
12223
+ },
12224
+ "seed_domains": {
12225
+ "rule": "repeated",
12226
+ "type": "DeviceSessionSeedDomain",
12227
+ "id": 3
12426
12228
  }
12427
12229
  }
12428
12230
  },
@@ -12438,12 +12240,37 @@
12438
12240
  }
12439
12241
  }
12440
12242
  },
12441
- "DeviceSessionAskPin": {
12442
- "fields": {}
12443
- },
12444
- "DeviceSessionAskPin_FailureSubCodes": {
12243
+ "DeviceSessionPinType": {
12445
12244
  "values": {
12446
- "UserCancel": 1
12245
+ "Any": 1,
12246
+ "Main": 2,
12247
+ "AttachToPin": 3
12248
+ }
12249
+ },
12250
+ "DeviceSessionAskPin": {
12251
+ "fields": {
12252
+ "type": {
12253
+ "type": "DeviceSessionPinType",
12254
+ "id": 1
12255
+ }
12256
+ }
12257
+ },
12258
+ "DeviceSessionAskPassphrase": {
12259
+ "fields": {
12260
+ "passphrase": {
12261
+ "type": "string",
12262
+ "id": 1
12263
+ },
12264
+ "on_device": {
12265
+ "rule": "required",
12266
+ "type": "bool",
12267
+ "id": 2
12268
+ }
12269
+ }
12270
+ },
12271
+ "DeviceSessionAskPin_FailureSubCodes": {
12272
+ "values": {
12273
+ "UserCancel": 1
12447
12274
  }
12448
12275
  },
12449
12276
  "DeviceStatus": {
@@ -12481,43 +12308,6 @@
12481
12308
  "DeviceStatusGet": {
12482
12309
  "fields": {}
12483
12310
  },
12484
- "DevOnboardingStage": {
12485
- "values": {
12486
- "DEV_ONBOARDING_STAGE_UNKNOWN": 0,
12487
- "DEV_ONBOARDING_STAGE_SAFETY_CHECK": 1,
12488
- "DEV_ONBOARDING_STAGE_PERSONALIZATION": 2,
12489
- "DEV_ONBOARDING_STAGE_SELECT_SETUP_METHOD": 3,
12490
- "DEV_ONBOARDING_STAGE_NEW_DEVICE": 4,
12491
- "DEV_ONBOARDING_STAGE_SELECT_RESTORE_METHOD": 5,
12492
- "DEV_ONBOARDING_STAGE_RESTORE_MNEMONIC": 6,
12493
- "DEV_ONBOARDING_STAGE_RESTORE_SEEDCARD": 7,
12494
- "DEV_ONBOARDING_STAGE_WALLET_READY": 8,
12495
- "DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP_PROMPT": 9,
12496
- "DEV_ONBOARDING_STAGE_SELECT_SEEDCARD_BACKUP_METHOD": 10,
12497
- "DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP": 11,
12498
- "DEV_ONBOARDING_STAGE_DONE": 12
12499
- }
12500
- },
12501
- "DevGetOnboardingStatus": {
12502
- "fields": {}
12503
- },
12504
- "DevOnboardingStatus": {
12505
- "fields": {
12506
- "stage": {
12507
- "rule": "required",
12508
- "type": "DevOnboardingStage",
12509
- "id": 1
12510
- },
12511
- "status_code": {
12512
- "type": "uint32",
12513
- "id": 2
12514
- },
12515
- "detail_code": {
12516
- "type": "uint32",
12517
- "id": 3
12518
- }
12519
- }
12520
- },
12521
12311
  "FilesystemPermissionFix": {
12522
12312
  "fields": {}
12523
12313
  },
@@ -12744,9 +12534,293 @@
12744
12534
  }
12745
12535
  }
12746
12536
  },
12537
+ "InternalMyAddressRequest": {
12538
+ "fields": {
12539
+ "coin_type": {
12540
+ "rule": "required",
12541
+ "type": "uint32",
12542
+ "id": 1
12543
+ },
12544
+ "chain_id": {
12545
+ "rule": "required",
12546
+ "type": "uint32",
12547
+ "id": 2
12548
+ },
12549
+ "account_index": {
12550
+ "rule": "required",
12551
+ "type": "uint32",
12552
+ "id": 3
12553
+ },
12554
+ "derive_type": {
12555
+ "rule": "required",
12556
+ "type": "uint32",
12557
+ "id": 4
12558
+ }
12559
+ }
12560
+ },
12561
+ "NftUpdate": {
12562
+ "fields": {
12563
+ "file_name_no_ext": {
12564
+ "rule": "required",
12565
+ "type": "string",
12566
+ "id": 1
12567
+ }
12568
+ }
12569
+ },
12570
+ "OnboardingStep": {
12571
+ "values": {
12572
+ "ONBOARDING_STEP_UNKNOWN": 0,
12573
+ "ONBOARDING_STEP_CHECKING": 1,
12574
+ "ONBOARDING_STEP_PERSONALIZATION": 2,
12575
+ "ONBOARDING_STEP_PIN": 3,
12576
+ "ONBOARDING_STEP_SETUP": 4,
12577
+ "ONBOARDING_STEP_DONE": 5
12578
+ }
12579
+ },
12580
+ "OnboardingPhase": {
12581
+ "values": {
12582
+ "ONBOARDING_PHASE_UNKNOWN": 0,
12583
+ "ONBOARDING_PHASE_SAFETY_CHECK": 1,
12584
+ "ONBOARDING_PHASE_PIN_SETUP": 2,
12585
+ "ONBOARDING_PHASE_FINGERPRINT_SETUP": 3,
12586
+ "ONBOARDING_PHASE_SETUP_CHOICE": 4,
12587
+ "ONBOARDING_PHASE_WALLET_CREATE_START": 5,
12588
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW": 6,
12589
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM": 7,
12590
+ "ONBOARDING_PHASE_RESTORE_METHOD_CHOICE": 8,
12591
+ "ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE": 9,
12592
+ "ONBOARDING_PHASE_SEEDCARD_RESTORE": 10,
12593
+ "ONBOARDING_PHASE_WALLET_READY": 11,
12594
+ "ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT": 12,
12595
+ "ONBOARDING_PHASE_SEEDCARD_BACKUP": 13
12596
+ }
12597
+ },
12598
+ "OnboardingSetupKind": {
12599
+ "values": {
12600
+ "ONBOARDING_SETUP_KIND_UNKNOWN": 0,
12601
+ "ONBOARDING_SETUP_KIND_CHOICE": 1,
12602
+ "ONBOARDING_SETUP_KIND_CREATE": 2,
12603
+ "ONBOARDING_SETUP_KIND_RESTORE": 3
12604
+ }
12605
+ },
12606
+ "OnboardingSetupMethod": {
12607
+ "values": {
12608
+ "ONBOARDING_SETUP_METHOD_UNKNOWN": 0,
12609
+ "ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE": 1,
12610
+ "ONBOARDING_SETUP_METHOD_SEEDCARD": 2
12611
+ }
12612
+ },
12613
+ "OnboardingSetupStatus": {
12614
+ "fields": {
12615
+ "kind": {
12616
+ "type": "OnboardingSetupKind",
12617
+ "id": 1
12618
+ },
12619
+ "method": {
12620
+ "type": "OnboardingSetupMethod",
12621
+ "id": 2
12622
+ }
12623
+ }
12624
+ },
12625
+ "OnboardingStatusGet": {
12626
+ "fields": {}
12627
+ },
12628
+ "OnboardingStatus": {
12629
+ "fields": {
12630
+ "step": {
12631
+ "type": "OnboardingStep",
12632
+ "id": 1
12633
+ },
12634
+ "phase": {
12635
+ "type": "OnboardingPhase",
12636
+ "id": 2
12637
+ },
12638
+ "setup": {
12639
+ "type": "OnboardingSetupStatus",
12640
+ "id": 3
12641
+ },
12642
+ "pin_set": {
12643
+ "type": "bool",
12644
+ "id": 4
12645
+ },
12646
+ "wallet_initialized": {
12647
+ "type": "bool",
12648
+ "id": 5
12649
+ }
12650
+ }
12651
+ },
12747
12652
  "PortfolioUpdate": {
12748
12653
  "fields": {}
12749
12654
  },
12655
+ "ViewAmount": {
12656
+ "fields": {
12657
+ "is_unlimited": {
12658
+ "rule": "required",
12659
+ "type": "bool",
12660
+ "id": 1
12661
+ },
12662
+ "num": {
12663
+ "rule": "required",
12664
+ "type": "string",
12665
+ "id": 2
12666
+ }
12667
+ }
12668
+ },
12669
+ "ViewDetail": {
12670
+ "fields": {
12671
+ "key": {
12672
+ "rule": "required",
12673
+ "type": "uint32",
12674
+ "id": 1
12675
+ },
12676
+ "value": {
12677
+ "rule": "required",
12678
+ "type": "string",
12679
+ "id": 2
12680
+ },
12681
+ "is_overview": {
12682
+ "rule": "required",
12683
+ "type": "bool",
12684
+ "id": 3
12685
+ },
12686
+ "has_icon": {
12687
+ "rule": "required",
12688
+ "type": "bool",
12689
+ "id": 4
12690
+ }
12691
+ }
12692
+ },
12693
+ "ViewTipType": {
12694
+ "values": {
12695
+ "Default": 0,
12696
+ "Highlight": 1,
12697
+ "Recommend": 2,
12698
+ "Warning": 3,
12699
+ "Danger": 4
12700
+ }
12701
+ },
12702
+ "ViewTip": {
12703
+ "fields": {
12704
+ "type": {
12705
+ "rule": "required",
12706
+ "type": "ViewTipType",
12707
+ "id": 1
12708
+ },
12709
+ "text": {
12710
+ "type": "string",
12711
+ "id": 2
12712
+ },
12713
+ "text_id": {
12714
+ "type": "uint32",
12715
+ "id": 3
12716
+ }
12717
+ }
12718
+ },
12719
+ "ViewRawData": {
12720
+ "fields": {
12721
+ "initial_data": {
12722
+ "rule": "required",
12723
+ "type": "string",
12724
+ "id": 1
12725
+ },
12726
+ "placeholder": {
12727
+ "rule": "required",
12728
+ "type": "uint32",
12729
+ "id": 2
12730
+ }
12731
+ }
12732
+ },
12733
+ "ViewSignLayout": {
12734
+ "values": {
12735
+ "LayoutDefault": 0,
12736
+ "LayoutSafeTxCreate": 1,
12737
+ "LayoutFinalConfirm": 2,
12738
+ "Layout7702": 3,
12739
+ "LayoutFlat": 4,
12740
+ "LayoutEthApprove": 5
12741
+ }
12742
+ },
12743
+ "ViewSignPage": {
12744
+ "fields": {
12745
+ "title": {
12746
+ "type": "string",
12747
+ "id": 1
12748
+ },
12749
+ "amount": {
12750
+ "type": "ViewAmount",
12751
+ "id": 2
12752
+ },
12753
+ "general": {
12754
+ "rule": "repeated",
12755
+ "type": "ViewDetail",
12756
+ "id": 3
12757
+ },
12758
+ "tip": {
12759
+ "type": "ViewTip",
12760
+ "id": 4
12761
+ },
12762
+ "raw_data": {
12763
+ "type": "ViewRawData",
12764
+ "id": 5
12765
+ },
12766
+ "slide_to_confirm": {
12767
+ "type": "bool",
12768
+ "id": 6,
12769
+ "options": {
12770
+ "default": true
12771
+ }
12772
+ },
12773
+ "layout": {
12774
+ "type": "ViewSignLayout",
12775
+ "id": 7,
12776
+ "options": {
12777
+ "default": "LayoutDefault"
12778
+ }
12779
+ },
12780
+ "title_id": {
12781
+ "type": "uint32",
12782
+ "id": 8
12783
+ }
12784
+ }
12785
+ },
12786
+ "ViewVerifyPage": {
12787
+ "fields": {
12788
+ "title": {
12789
+ "type": "string",
12790
+ "id": 1
12791
+ },
12792
+ "address": {
12793
+ "rule": "required",
12794
+ "type": "string",
12795
+ "id": 2
12796
+ },
12797
+ "path": {
12798
+ "rule": "required",
12799
+ "type": "string",
12800
+ "id": 3
12801
+ },
12802
+ "network": {
12803
+ "type": "string",
12804
+ "id": 4
12805
+ },
12806
+ "derive_type": {
12807
+ "type": "string",
12808
+ "id": 5
12809
+ },
12810
+ "value_key": {
12811
+ "type": "uint32",
12812
+ "id": 6
12813
+ },
12814
+ "title_id": {
12815
+ "type": "uint32",
12816
+ "id": 7
12817
+ },
12818
+ "chain_id": {
12819
+ "type": "uint32",
12820
+ "id": 8
12821
+ }
12822
+ }
12823
+ },
12750
12824
  "google": {
12751
12825
  "nested": {
12752
12826
  "protobuf": {