@onekeyfe/hd-core 1.2.0-alpha.34 → 1.2.0-alpha.35

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 (65) hide show
  1. package/__tests__/DeviceCommands.test.ts +84 -0
  2. package/__tests__/device-settings.test.ts +3 -0
  3. package/__tests__/device-wallet-session-store.test.ts +80 -7
  4. package/__tests__/evmSignTransaction.test.ts +69 -0
  5. package/__tests__/get-device-state.test.ts +78 -30
  6. package/__tests__/open-wallet-session.test.ts +186 -51
  7. package/__tests__/protocol-v2.test.ts +490 -112
  8. package/dist/api/FirmwareUpdateV4.d.ts +1 -0
  9. package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
  10. package/dist/api/GetPassphraseState.d.ts.map +1 -1
  11. package/dist/api/OpenWalletSession.d.ts.map +1 -1
  12. package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
  13. package/dist/api/evm/protocol.d.ts +3 -0
  14. package/dist/api/evm/protocol.d.ts.map +1 -0
  15. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +1 -1
  16. package/dist/device/Device.d.ts +3 -2
  17. package/dist/device/Device.d.ts.map +1 -1
  18. package/dist/device/DeviceCommands.d.ts.map +1 -1
  19. package/dist/device/DeviceWalletSessionStore.d.ts +0 -1
  20. package/dist/device/DeviceWalletSessionStore.d.ts.map +1 -1
  21. package/dist/index.d.ts +8 -6
  22. package/dist/index.js +606 -641
  23. package/dist/protocols/protocol-v2/features.d.ts +17 -6
  24. package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
  25. package/dist/protocols/protocol-v2/index.d.ts +2 -2
  26. package/dist/protocols/protocol-v2/index.d.ts.map +1 -1
  27. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts +1 -0
  28. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts.map +1 -1
  29. package/dist/protocols/protocol-v2/unlockRetry.d.ts.map +1 -1
  30. package/dist/protocols/protocol-v2/walletSession.d.ts +1 -0
  31. package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -1
  32. package/dist/types/api/openWalletSession.d.ts +1 -1
  33. package/dist/types/api/openWalletSession.d.ts.map +1 -1
  34. package/dist/types/api/protocolV2.d.ts +2 -2
  35. package/dist/types/api/protocolV2.d.ts.map +1 -1
  36. package/dist/types/device.d.ts +2 -1
  37. package/dist/types/device.d.ts.map +1 -1
  38. package/dist/utils/patch.d.ts +1 -1
  39. package/dist/utils/patch.d.ts.map +1 -1
  40. package/package.json +4 -4
  41. package/src/api/FirmwareUpdateV4.ts +26 -8
  42. package/src/api/GetPassphraseState.ts +11 -0
  43. package/src/api/OpenWalletSession.ts +15 -7
  44. package/src/api/evm/EVMGetAddress.ts +2 -2
  45. package/src/api/evm/EVMGetPublicKey.ts +2 -2
  46. package/src/api/evm/EVMSignMessage.ts +2 -2
  47. package/src/api/evm/EVMSignTransaction.ts +2 -2
  48. package/src/api/evm/EVMSignTypedData.ts +35 -45
  49. package/src/api/evm/EVMVerifyMessage.ts +2 -2
  50. package/src/api/evm/protocol.ts +6 -0
  51. package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +2 -2
  52. package/src/api/protocol-v2/DeviceUploadWallpaper.ts +1 -1
  53. package/src/data/messages/messages-protocol-v2.json +393 -485
  54. package/src/device/Device.ts +63 -37
  55. package/src/device/DeviceCommands.ts +12 -2
  56. package/src/device/DeviceWalletSessionStore.ts +0 -14
  57. package/src/deviceProfile/buildDeviceFeatures.ts +1 -1
  58. package/src/protocols/protocol-v2/features.ts +58 -16
  59. package/src/protocols/protocol-v2/index.ts +5 -0
  60. package/src/protocols/protocol-v2/settingsUnlockPolicy.ts +8 -3
  61. package/src/protocols/protocol-v2/unlockRetry.ts +18 -7
  62. package/src/protocols/protocol-v2/walletSession.ts +35 -35
  63. package/src/types/api/openWalletSession.ts +1 -1
  64. package/src/types/api/protocolV2.ts +2 -2
  65. package/src/types/device.ts +2 -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,19 +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
- "MessageType_DeviceSessionAskPassphrase": 60609,
489
453
  "MessageType_FilesystemPermissionFix": 60800,
490
454
  "MessageType_FilesystemPathInfo": 60801,
491
455
  "MessageType_FilesystemPathInfoQuery": 60802,
@@ -501,7 +465,13 @@
501
465
  "MessageType_DeviceFirmwareUpdateRequest": 61000,
502
466
  "MessageType_DeviceFirmwareUpdateStatusGet": 61001,
503
467
  "MessageType_DeviceFirmwareUpdateStatus": 61002,
504
- "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_OnboardingStatusGet": 61600,
474
+ "MessageType_OnboardingStatus": 61601
505
475
  },
506
476
  "reserved": [
507
477
  [90, 92],
@@ -5960,30 +5930,6 @@
5960
5930
  }
5961
5931
  }
5962
5932
  },
5963
- "InternalMyAddressRequest": {
5964
- "fields": {
5965
- "coin_type": {
5966
- "rule": "required",
5967
- "type": "uint32",
5968
- "id": 1
5969
- },
5970
- "chain_id": {
5971
- "rule": "required",
5972
- "type": "uint32",
5973
- "id": 2
5974
- },
5975
- "account_index": {
5976
- "rule": "required",
5977
- "type": "uint32",
5978
- "id": 3
5979
- },
5980
- "derive_type": {
5981
- "rule": "required",
5982
- "type": "uint32",
5983
- "id": 4
5984
- }
5985
- }
5986
- },
5987
5933
  "KaspaGetAddress": {
5988
5934
  "fields": {
5989
5935
  "address_n": {
@@ -6188,28 +6134,6 @@
6188
6134
  }
6189
6135
  }
6190
6136
  },
6191
- "StartSession": {
6192
- "fields": {
6193
- "session_id": {
6194
- "type": "bytes",
6195
- "id": 1
6196
- },
6197
- "_skip_passphrase": {
6198
- "type": "bool",
6199
- "id": 2,
6200
- "options": {
6201
- "deprecated": true
6202
- }
6203
- },
6204
- "derive_cardano": {
6205
- "type": "bool",
6206
- "id": 3
6207
- }
6208
- }
6209
- },
6210
- "EndSession": {
6211
- "fields": {}
6212
- },
6213
6137
  "GetFeatures": {
6214
6138
  "fields": {}
6215
6139
  },
@@ -7332,49 +7256,6 @@
7332
7256
  }
7333
7257
  }
7334
7258
  },
7335
- "WallpaperTarget": {
7336
- "values": {
7337
- "Home": 0,
7338
- "Lock": 1
7339
- }
7340
- },
7341
- "SetWallpaper": {
7342
- "fields": {
7343
- "target": {
7344
- "rule": "required",
7345
- "type": "WallpaperTarget",
7346
- "id": 1
7347
- },
7348
- "path": {
7349
- "rule": "required",
7350
- "type": "string",
7351
- "id": 2
7352
- }
7353
- }
7354
- },
7355
- "GetWallpaper": {
7356
- "fields": {
7357
- "target": {
7358
- "rule": "required",
7359
- "type": "WallpaperTarget",
7360
- "id": 1
7361
- }
7362
- }
7363
- },
7364
- "Wallpaper": {
7365
- "fields": {
7366
- "target": {
7367
- "rule": "required",
7368
- "type": "WallpaperTarget",
7369
- "id": 1
7370
- },
7371
- "path": {
7372
- "rule": "required",
7373
- "type": "string",
7374
- "id": 2
7375
- }
7376
- }
7377
- },
7378
7259
  "ResourceUpdate": {
7379
7260
  "fields": {
7380
7261
  "file_name": {
@@ -11533,162 +11414,6 @@
11533
11414
  }
11534
11415
  }
11535
11416
  },
11536
- "ViewAmount": {
11537
- "fields": {
11538
- "is_unlimited": {
11539
- "rule": "required",
11540
- "type": "bool",
11541
- "id": 1
11542
- },
11543
- "num": {
11544
- "rule": "required",
11545
- "type": "string",
11546
- "id": 2
11547
- }
11548
- }
11549
- },
11550
- "ViewDetail": {
11551
- "fields": {
11552
- "key": {
11553
- "rule": "required",
11554
- "type": "uint32",
11555
- "id": 1
11556
- },
11557
- "value": {
11558
- "rule": "required",
11559
- "type": "string",
11560
- "id": 2
11561
- },
11562
- "is_overview": {
11563
- "rule": "required",
11564
- "type": "bool",
11565
- "id": 3
11566
- },
11567
- "has_icon": {
11568
- "rule": "required",
11569
- "type": "bool",
11570
- "id": 4
11571
- }
11572
- }
11573
- },
11574
- "ViewTipType": {
11575
- "values": {
11576
- "Default": 0,
11577
- "Highlight": 1,
11578
- "Recommend": 2,
11579
- "Warning": 3,
11580
- "Danger": 4
11581
- }
11582
- },
11583
- "ViewTip": {
11584
- "fields": {
11585
- "type": {
11586
- "rule": "required",
11587
- "type": "ViewTipType",
11588
- "id": 1
11589
- },
11590
- "text": {
11591
- "rule": "required",
11592
- "type": "string",
11593
- "id": 2
11594
- }
11595
- }
11596
- },
11597
- "ViewRawData": {
11598
- "fields": {
11599
- "initial_data": {
11600
- "rule": "required",
11601
- "type": "string",
11602
- "id": 1
11603
- },
11604
- "placeholder": {
11605
- "rule": "required",
11606
- "type": "uint32",
11607
- "id": 2
11608
- }
11609
- }
11610
- },
11611
- "ViewSignLayout": {
11612
- "values": {
11613
- "LayoutDefault": 0,
11614
- "LayoutSafeTxCreate": 1,
11615
- "LayoutFinalConfirm": 2,
11616
- "Layout7702": 3,
11617
- "LayoutFlat": 4,
11618
- "LayoutEthApprove": 5
11619
- }
11620
- },
11621
- "ViewSignPage": {
11622
- "fields": {
11623
- "title": {
11624
- "rule": "required",
11625
- "type": "string",
11626
- "id": 1
11627
- },
11628
- "amount": {
11629
- "type": "ViewAmount",
11630
- "id": 2
11631
- },
11632
- "general": {
11633
- "rule": "repeated",
11634
- "type": "ViewDetail",
11635
- "id": 3
11636
- },
11637
- "tip": {
11638
- "type": "ViewTip",
11639
- "id": 4
11640
- },
11641
- "raw_data": {
11642
- "type": "ViewRawData",
11643
- "id": 5
11644
- },
11645
- "slide_to_confirm": {
11646
- "type": "bool",
11647
- "id": 6,
11648
- "options": {
11649
- "default": true
11650
- }
11651
- },
11652
- "layout": {
11653
- "type": "ViewSignLayout",
11654
- "id": 7,
11655
- "options": {
11656
- "default": "LayoutDefault"
11657
- }
11658
- }
11659
- }
11660
- },
11661
- "ViewVerifyPage": {
11662
- "fields": {
11663
- "title": {
11664
- "rule": "required",
11665
- "type": "string",
11666
- "id": 1
11667
- },
11668
- "address": {
11669
- "rule": "required",
11670
- "type": "string",
11671
- "id": 2
11672
- },
11673
- "path": {
11674
- "rule": "required",
11675
- "type": "string",
11676
- "id": 3
11677
- },
11678
- "network": {
11679
- "type": "string",
11680
- "id": 4
11681
- },
11682
- "derive_type": {
11683
- "type": "string",
11684
- "id": 5
11685
- },
11686
- "value_key": {
11687
- "type": "uint32",
11688
- "id": 6
11689
- }
11690
- }
11691
- },
11692
11417
  "WebAuthnListResidentCredentials": {
11693
11418
  "fields": {}
11694
11419
  },
@@ -11789,17 +11514,18 @@
11789
11514
  "type": "uint32",
11790
11515
  "id": 1
11791
11516
  },
11517
+ "build_fingerprint": {
11518
+ "rule": "required",
11519
+ "type": "string",
11520
+ "id": 2
11521
+ },
11792
11522
  "supported_messages": {
11793
11523
  "rule": "repeated",
11794
11524
  "type": "uint32",
11795
- "id": 2,
11525
+ "id": 3,
11796
11526
  "options": {
11797
11527
  "packed": false
11798
11528
  }
11799
- },
11800
- "protobuf_definition": {
11801
- "type": "string",
11802
- "id": 3
11803
11529
  }
11804
11530
  }
11805
11531
  },
@@ -12027,15 +11753,123 @@
12027
11753
  }
12028
11754
  }
12029
11755
  },
12030
- "DeviceFirmwareTargetType": {
11756
+ "DeviceMiscUsbMscControl": {
11757
+ "fields": {
11758
+ "enable": {
11759
+ "rule": "required",
11760
+ "type": "bool",
11761
+ "id": 1
11762
+ }
11763
+ }
11764
+ },
11765
+ "DeviceFactoryAck": {
12031
11766
  "values": {
12032
- "FW_MGMT_TARGET_INVALID": 0,
12033
- "FW_MGMT_TARGET_CRATE": 1,
12034
- "FW_MGMT_TARGET_ROMLOADER": 2,
12035
- "FW_MGMT_TARGET_BOOTLOADER": 3,
12036
- "FW_MGMT_TARGET_APPLICATION_P1": 4,
12037
- "FW_MGMT_TARGET_APPLICATION_P2": 5,
12038
- "FW_MGMT_TARGET_COPROCESSOR": 6,
11767
+ "FACTORY_ACK_SUCCESS": 0,
11768
+ "FACTORY_ACK_FAIL": 1
11769
+ }
11770
+ },
11771
+ "DeviceFactoryInfoManufactureTime": {
11772
+ "fields": {
11773
+ "year": {
11774
+ "rule": "required",
11775
+ "type": "uint32",
11776
+ "id": 1
11777
+ },
11778
+ "month": {
11779
+ "rule": "required",
11780
+ "type": "uint32",
11781
+ "id": 2
11782
+ },
11783
+ "day": {
11784
+ "rule": "required",
11785
+ "type": "uint32",
11786
+ "id": 3
11787
+ },
11788
+ "hour": {
11789
+ "rule": "required",
11790
+ "type": "uint32",
11791
+ "id": 4
11792
+ },
11793
+ "minute": {
11794
+ "rule": "required",
11795
+ "type": "uint32",
11796
+ "id": 5
11797
+ },
11798
+ "second": {
11799
+ "rule": "required",
11800
+ "type": "uint32",
11801
+ "id": 6
11802
+ }
11803
+ }
11804
+ },
11805
+ "DeviceFactoryInfo": {
11806
+ "fields": {
11807
+ "version": {
11808
+ "type": "uint32",
11809
+ "id": 1
11810
+ },
11811
+ "serial_number": {
11812
+ "type": "string",
11813
+ "id": 2
11814
+ },
11815
+ "burn_in_completed": {
11816
+ "type": "bool",
11817
+ "id": 3
11818
+ },
11819
+ "factory_test_completed": {
11820
+ "type": "bool",
11821
+ "id": 4
11822
+ },
11823
+ "manufacture_time": {
11824
+ "type": "DeviceFactoryInfoManufactureTime",
11825
+ "id": 5
11826
+ }
11827
+ }
11828
+ },
11829
+ "DeviceFactoryInfoSet": {
11830
+ "fields": {
11831
+ "info": {
11832
+ "rule": "required",
11833
+ "type": "DeviceFactoryInfo",
11834
+ "id": 1
11835
+ }
11836
+ }
11837
+ },
11838
+ "DeviceFactoryInfoGet": {
11839
+ "fields": {}
11840
+ },
11841
+ "DeviceFactoryPermanentLock": {
11842
+ "fields": {
11843
+ "check_a": {
11844
+ "rule": "required",
11845
+ "type": "bytes",
11846
+ "id": 1
11847
+ },
11848
+ "check_b": {
11849
+ "rule": "required",
11850
+ "type": "bytes",
11851
+ "id": 2
11852
+ }
11853
+ }
11854
+ },
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,
12039
11873
  "FW_MGMT_TARGET_SE01": 7,
12040
11874
  "FW_MGMT_TARGET_SE02": 8,
12041
11875
  "FW_MGMT_TARGET_SE03": 9,
@@ -12134,105 +11968,6 @@
12134
11968
  }
12135
11969
  }
12136
11970
  },
12137
- "DeviceFactoryAck": {
12138
- "values": {
12139
- "FACTORY_ACK_SUCCESS": 0,
12140
- "FACTORY_ACK_FAIL": 1
12141
- }
12142
- },
12143
- "DeviceFactoryInfoManufactureTime": {
12144
- "fields": {
12145
- "year": {
12146
- "rule": "required",
12147
- "type": "uint32",
12148
- "id": 1
12149
- },
12150
- "month": {
12151
- "rule": "required",
12152
- "type": "uint32",
12153
- "id": 2
12154
- },
12155
- "day": {
12156
- "rule": "required",
12157
- "type": "uint32",
12158
- "id": 3
12159
- },
12160
- "hour": {
12161
- "rule": "required",
12162
- "type": "uint32",
12163
- "id": 4
12164
- },
12165
- "minute": {
12166
- "rule": "required",
12167
- "type": "uint32",
12168
- "id": 5
12169
- },
12170
- "second": {
12171
- "rule": "required",
12172
- "type": "uint32",
12173
- "id": 6
12174
- }
12175
- }
12176
- },
12177
- "DeviceFactoryInfo": {
12178
- "fields": {
12179
- "version": {
12180
- "type": "uint32",
12181
- "id": 1
12182
- },
12183
- "serial_number": {
12184
- "type": "string",
12185
- "id": 2
12186
- },
12187
- "burn_in_completed": {
12188
- "type": "bool",
12189
- "id": 3
12190
- },
12191
- "factory_test_completed": {
12192
- "type": "bool",
12193
- "id": 4
12194
- },
12195
- "manufacture_time": {
12196
- "type": "DeviceFactoryInfoManufactureTime",
12197
- "id": 5
12198
- }
12199
- }
12200
- },
12201
- "DeviceFactoryInfoSet": {
12202
- "fields": {
12203
- "info": {
12204
- "rule": "required",
12205
- "type": "DeviceFactoryInfo",
12206
- "id": 1
12207
- }
12208
- }
12209
- },
12210
- "DeviceFactoryInfoGet": {
12211
- "fields": {}
12212
- },
12213
- "DeviceFactoryPermanentLock": {
12214
- "fields": {
12215
- "check_a": {
12216
- "rule": "required",
12217
- "type": "bytes",
12218
- "id": 1
12219
- },
12220
- "check_b": {
12221
- "rule": "required",
12222
- "type": "bytes",
12223
- "id": 2
12224
- }
12225
- }
12226
- },
12227
- "DeviceFactoryTest": {
12228
- "fields": {
12229
- "burn_in_test": {
12230
- "rule": "required",
12231
- "type": "bool",
12232
- "id": 1
12233
- }
12234
- }
12235
- },
12236
11971
  "DeviceType": {
12237
11972
  "values": {
12238
11973
  "CLASSIC1": 0,
@@ -12383,10 +12118,6 @@
12383
12118
  "se4": {
12384
12119
  "type": "bool",
12385
12120
  "id": 430
12386
- },
12387
- "status": {
12388
- "type": "bool",
12389
- "id": 10000
12390
12121
  }
12391
12122
  }
12392
12123
  },
@@ -12456,10 +12187,6 @@
12456
12187
  "se4": {
12457
12188
  "type": "DeviceSEInfo",
12458
12189
  "id": 430
12459
- },
12460
- "status": {
12461
- "type": "DeviceStatus",
12462
- "id": 10000
12463
12190
  }
12464
12191
  }
12465
12192
  },
@@ -12515,6 +12242,7 @@
12515
12242
  "id": 1
12516
12243
  },
12517
12244
  "on_device": {
12245
+ "rule": "required",
12518
12246
  "type": "bool",
12519
12247
  "id": 2
12520
12248
  }
@@ -12560,88 +12288,6 @@
12560
12288
  "DeviceStatusGet": {
12561
12289
  "fields": {}
12562
12290
  },
12563
- "DevOnboardingStep": {
12564
- "values": {
12565
- "DEV_ONBOARDING_STEP_UNKNOWN": 0,
12566
- "DEV_ONBOARDING_STEP_CHECKING": 1,
12567
- "DEV_ONBOARDING_STEP_PERSONALIZATION": 2,
12568
- "DEV_ONBOARDING_STEP_PIN": 3,
12569
- "DEV_ONBOARDING_STEP_SETUP": 4,
12570
- "DEV_ONBOARDING_STEP_DONE": 5
12571
- }
12572
- },
12573
- "DevOnboardingPhase": {
12574
- "values": {
12575
- "DEV_ONBOARDING_PHASE_UNKNOWN": 0,
12576
- "DEV_ONBOARDING_PHASE_SAFETY_CHECK": 1,
12577
- "DEV_ONBOARDING_PHASE_PIN_SETUP": 2,
12578
- "DEV_ONBOARDING_PHASE_FINGERPRINT_SETUP": 3,
12579
- "DEV_ONBOARDING_PHASE_SETUP_CHOICE": 4,
12580
- "DEV_ONBOARDING_PHASE_WALLET_CREATE_START": 5,
12581
- "DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_VIEW": 6,
12582
- "DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_CONFIRM": 7,
12583
- "DEV_ONBOARDING_PHASE_RESTORE_METHOD_CHOICE": 8,
12584
- "DEV_ONBOARDING_PHASE_RECOVERY_PHRASE_RESTORE": 9,
12585
- "DEV_ONBOARDING_PHASE_SEEDCARD_RESTORE": 10,
12586
- "DEV_ONBOARDING_PHASE_WALLET_READY": 11,
12587
- "DEV_ONBOARDING_PHASE_SEEDCARD_BACKUP_PROMPT": 12,
12588
- "DEV_ONBOARDING_PHASE_SEEDCARD_BACKUP": 13
12589
- }
12590
- },
12591
- "DevOnboardingSetupKind": {
12592
- "values": {
12593
- "DEV_ONBOARDING_SETUP_KIND_UNKNOWN": 0,
12594
- "DEV_ONBOARDING_SETUP_KIND_CHOICE": 1,
12595
- "DEV_ONBOARDING_SETUP_KIND_CREATE": 2,
12596
- "DEV_ONBOARDING_SETUP_KIND_RESTORE": 3
12597
- }
12598
- },
12599
- "DevOnboardingSetupMethod": {
12600
- "values": {
12601
- "DEV_ONBOARDING_SETUP_METHOD_UNKNOWN": 0,
12602
- "DEV_ONBOARDING_SETUP_METHOD_RECOVERY_PHRASE": 1,
12603
- "DEV_ONBOARDING_SETUP_METHOD_SEEDCARD": 2
12604
- }
12605
- },
12606
- "DevOnboardingSetupStatus": {
12607
- "fields": {
12608
- "kind": {
12609
- "type": "DevOnboardingSetupKind",
12610
- "id": 1
12611
- },
12612
- "method": {
12613
- "type": "DevOnboardingSetupMethod",
12614
- "id": 2
12615
- }
12616
- }
12617
- },
12618
- "DevGetOnboardingStatus": {
12619
- "fields": {}
12620
- },
12621
- "DevOnboardingStatus": {
12622
- "fields": {
12623
- "step": {
12624
- "type": "DevOnboardingStep",
12625
- "id": 1
12626
- },
12627
- "phase": {
12628
- "type": "DevOnboardingPhase",
12629
- "id": 2
12630
- },
12631
- "setup": {
12632
- "type": "DevOnboardingSetupStatus",
12633
- "id": 3
12634
- },
12635
- "pin_set": {
12636
- "type": "bool",
12637
- "id": 4
12638
- },
12639
- "wallet_initialized": {
12640
- "type": "bool",
12641
- "id": 5
12642
- }
12643
- }
12644
- },
12645
12291
  "FilesystemPermissionFix": {
12646
12292
  "fields": {}
12647
12293
  },
@@ -12868,9 +12514,271 @@
12868
12514
  }
12869
12515
  }
12870
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
+ },
12871
12623
  "PortfolioUpdate": {
12872
12624
  "fields": {}
12873
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
+ },
12874
12782
  "google": {
12875
12783
  "nested": {
12876
12784
  "protobuf": {