@onekeyfe/hd-core 1.1.27-alpha.41 → 1.1.27-alpha.42

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 (48) hide show
  1. package/__tests__/logBlockEvent.test.ts +37 -0
  2. package/__tests__/protocol-v2.test.ts +129 -12
  3. package/dist/api/device/DeviceLock.d.ts.map +1 -1
  4. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +1 -1
  5. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +1 -1
  6. package/dist/api/protocol-v2/FilesystemDiskControl.d.ts +1 -1
  7. package/dist/api/sui/SuiGetAddress.d.ts +3 -0
  8. package/dist/api/sui/SuiGetAddress.d.ts.map +1 -1
  9. package/dist/api/sui/SuiGetPublicKey.d.ts +3 -0
  10. package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -1
  11. package/dist/api/sui/SuiSignMessage.d.ts +3 -0
  12. package/dist/api/sui/SuiSignMessage.d.ts.map +1 -1
  13. package/dist/api/sui/SuiSignTransaction.d.ts +3 -0
  14. package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
  15. package/dist/api/ton/TonGetAddress.d.ts +3 -0
  16. package/dist/api/ton/TonGetAddress.d.ts.map +1 -1
  17. package/dist/api/ton/TonSignData.d.ts +5 -0
  18. package/dist/api/ton/TonSignData.d.ts.map +1 -1
  19. package/dist/api/ton/TonSignMessage.d.ts +3 -0
  20. package/dist/api/ton/TonSignMessage.d.ts.map +1 -1
  21. package/dist/api/ton/TonSignProof.d.ts +3 -0
  22. package/dist/api/ton/TonSignProof.d.ts.map +1 -1
  23. package/dist/device/Device.d.ts +2 -2
  24. package/dist/device/Device.d.ts.map +1 -1
  25. package/dist/events/logBlockEvent.d.ts +1 -0
  26. package/dist/events/logBlockEvent.d.ts.map +1 -1
  27. package/dist/index.d.ts +6 -5
  28. package/dist/index.js +513 -246
  29. package/dist/types/api/protocolV2.d.ts +2 -2
  30. package/dist/types/api/protocolV2.d.ts.map +1 -1
  31. package/dist/utils/patch.d.ts +1 -1
  32. package/dist/utils/patch.d.ts.map +1 -1
  33. package/package.json +4 -4
  34. package/src/api/device/DeviceLock.ts +1 -3
  35. package/src/api/evm/EVMSignTypedData.ts +1 -1
  36. package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +1 -5
  37. package/src/api/sui/SuiGetAddress.ts +3 -0
  38. package/src/api/sui/SuiGetPublicKey.ts +3 -0
  39. package/src/api/sui/SuiSignMessage.ts +3 -0
  40. package/src/api/sui/SuiSignTransaction.ts +3 -0
  41. package/src/api/ton/TonGetAddress.ts +3 -0
  42. package/src/api/ton/TonSignData.ts +10 -3
  43. package/src/api/ton/TonSignMessage.ts +3 -0
  44. package/src/api/ton/TonSignProof.ts +3 -0
  45. package/src/data/messages/messages-protocol-v2.json +489 -268
  46. package/src/device/Device.ts +6 -2
  47. package/src/events/logBlockEvent.ts +23 -0
  48. package/src/types/api/protocolV2.ts +2 -2
package/dist/index.js CHANGED
@@ -25738,6 +25738,8 @@ var nested = {
25738
25738
  MessageType_TonSignProof: 11905,
25739
25739
  MessageType_TonSignedProof: 11906,
25740
25740
  MessageType_TonTxAck: 11907,
25741
+ MessageType_TonSignData: 11908,
25742
+ MessageType_TonSignedData: 11909,
25741
25743
  MessageType_ScdoGetAddress: 12001,
25742
25744
  MessageType_ScdoAddress: 12002,
25743
25745
  MessageType_ScdoSignTx: 12003,
@@ -25767,11 +25769,6 @@ var nested = {
25767
25769
  MessageType_NeoAddress: 12302,
25768
25770
  MessageType_NeoSignTx: 12303,
25769
25771
  MessageType_NeoSignedTx: 12304,
25770
- MessageType_UiviewShowAddressRequest: 30200,
25771
- MessageType_UiviewShowPublicKeyRequest: 30201,
25772
- MessageType_UiviewConfirmTxRequest: 30202,
25773
- MessageType_UiviewConfirmSignMessageRequest: 30203,
25774
- MessageType_UiviewResponse: 30204,
25775
25772
  MessageType_ReadSEPublicKey: 10004,
25776
25773
  MessageType_SEPublicKey: 10005,
25777
25774
  MessageType_WriteSEPublicCert: 10006,
@@ -25782,6 +25779,9 @@ var nested = {
25782
25779
  MessageType_ResourceUpload: 10018,
25783
25780
  MessageType_ZoomRequest: 10019,
25784
25781
  MessageType_BlurRequest: 10032,
25782
+ MessageType_SetWallpaper: 10033,
25783
+ MessageType_GetWallpaper: 10034,
25784
+ MessageType_Wallpaper: 10035,
25785
25785
  MessageType_ResourceRequest: 10020,
25786
25786
  MessageType_ResourceAck: 10021,
25787
25787
  MessageType_ResourceUpdate: 10022,
@@ -25806,8 +25806,8 @@ var nested = {
25806
25806
  MessageType_DeviceReboot: 60400,
25807
25807
  MessageType_DeviceGetDeviceInfo: 60600,
25808
25808
  MessageType_DeviceInfo: 60601,
25809
- MessageType_DeviceGetOnboardingStatus: 60602,
25810
- MessageType_DeviceOnboardingStatus: 60603,
25809
+ MessageType_GetOnboardingStatus: 60602,
25810
+ MessageType_OnboardingStatus: 60603,
25811
25811
  MessageType_FilesystemFixPermission: 60800,
25812
25812
  MessageType_FilesystemPathInfo: 60801,
25813
25813
  MessageType_FilesystemPathInfoQuery: 60802,
@@ -25820,7 +25820,6 @@ var nested = {
25820
25820
  MessageType_FilesystemDirMake: 60809,
25821
25821
  MessageType_FilesystemDirRemove: 60810,
25822
25822
  MessageType_FilesystemFormat: 60811,
25823
- MessageType_FilesystemDiskControl: 60812,
25824
25823
  MessageType_DeviceFirmwareUpdate: 61000,
25825
25824
  MessageType_DeviceFirmwareInstallProgress: 61001,
25826
25825
  MessageType_DeviceGetFirmwareUpdateStatus: 61002,
@@ -29419,6 +29418,208 @@ var nested = {
29419
29418
  }
29420
29419
  }
29421
29420
  },
29421
+ DebugLinkInput: {
29422
+ fields: {
29423
+ x: {
29424
+ type: "uint32",
29425
+ id: 1
29426
+ },
29427
+ y: {
29428
+ type: "uint32",
29429
+ id: 2
29430
+ },
29431
+ duration_ms: {
29432
+ type: "uint32",
29433
+ id: 3
29434
+ },
29435
+ x_end: {
29436
+ type: "uint32",
29437
+ id: 4
29438
+ },
29439
+ y_end: {
29440
+ type: "uint32",
29441
+ id: 5
29442
+ }
29443
+ }
29444
+ },
29445
+ DebugLinkLayout: {
29446
+ fields: {
29447
+ lines: {
29448
+ rule: "repeated",
29449
+ type: "string",
29450
+ id: 1
29451
+ }
29452
+ }
29453
+ },
29454
+ DebugLinkReseedRandom: {
29455
+ fields: {
29456
+ value: {
29457
+ type: "uint32",
29458
+ id: 1
29459
+ }
29460
+ }
29461
+ },
29462
+ DebugLinkRecordScreen: {
29463
+ fields: {
29464
+ target_directory: {
29465
+ type: "string",
29466
+ id: 1
29467
+ }
29468
+ }
29469
+ },
29470
+ DebugLinkGetState: {
29471
+ fields: {
29472
+ wait_word_list: {
29473
+ type: "bool",
29474
+ id: 1
29475
+ },
29476
+ wait_word_pos: {
29477
+ type: "bool",
29478
+ id: 2
29479
+ },
29480
+ wait_layout: {
29481
+ type: "bool",
29482
+ id: 3
29483
+ }
29484
+ }
29485
+ },
29486
+ DebugLinkState: {
29487
+ fields: {
29488
+ layout: {
29489
+ type: "bytes",
29490
+ id: 1
29491
+ },
29492
+ pin: {
29493
+ type: "string",
29494
+ id: 2
29495
+ },
29496
+ matrix: {
29497
+ type: "string",
29498
+ id: 3
29499
+ },
29500
+ mnemonic_secret: {
29501
+ type: "bytes",
29502
+ id: 4
29503
+ },
29504
+ node: {
29505
+ type: "HDNodeType",
29506
+ id: 5
29507
+ },
29508
+ passphrase_protection: {
29509
+ type: "bool",
29510
+ id: 6
29511
+ },
29512
+ reset_word: {
29513
+ type: "string",
29514
+ id: 7
29515
+ },
29516
+ reset_entropy: {
29517
+ type: "bytes",
29518
+ id: 8
29519
+ },
29520
+ recovery_fake_word: {
29521
+ type: "string",
29522
+ id: 9
29523
+ },
29524
+ recovery_word_pos: {
29525
+ type: "uint32",
29526
+ id: 10
29527
+ },
29528
+ reset_word_pos: {
29529
+ type: "uint32",
29530
+ id: 11
29531
+ },
29532
+ mnemonic_type: {
29533
+ type: "BackupType",
29534
+ id: 12
29535
+ },
29536
+ layout_lines: {
29537
+ rule: "repeated",
29538
+ type: "string",
29539
+ id: 13
29540
+ }
29541
+ }
29542
+ },
29543
+ DebugLinkStop: {
29544
+ fields: {
29545
+ }
29546
+ },
29547
+ DebugLinkLog: {
29548
+ fields: {
29549
+ level: {
29550
+ type: "uint32",
29551
+ id: 1
29552
+ },
29553
+ bucket: {
29554
+ type: "string",
29555
+ id: 2
29556
+ },
29557
+ text: {
29558
+ type: "string",
29559
+ id: 3
29560
+ }
29561
+ }
29562
+ },
29563
+ DebugLinkMemoryRead: {
29564
+ fields: {
29565
+ address: {
29566
+ type: "uint32",
29567
+ id: 1
29568
+ },
29569
+ length: {
29570
+ type: "uint32",
29571
+ id: 2
29572
+ }
29573
+ }
29574
+ },
29575
+ DebugLinkMemory: {
29576
+ fields: {
29577
+ memory: {
29578
+ type: "bytes",
29579
+ id: 1
29580
+ }
29581
+ }
29582
+ },
29583
+ DebugLinkMemoryWrite: {
29584
+ fields: {
29585
+ address: {
29586
+ type: "uint32",
29587
+ id: 1
29588
+ },
29589
+ memory: {
29590
+ type: "bytes",
29591
+ id: 2
29592
+ },
29593
+ flash: {
29594
+ type: "bool",
29595
+ id: 3
29596
+ }
29597
+ }
29598
+ },
29599
+ DebugLinkFlashErase: {
29600
+ fields: {
29601
+ sector: {
29602
+ type: "uint32",
29603
+ id: 1
29604
+ }
29605
+ }
29606
+ },
29607
+ DebugLinkEraseSdCard: {
29608
+ fields: {
29609
+ format: {
29610
+ type: "bool",
29611
+ id: 1
29612
+ }
29613
+ }
29614
+ },
29615
+ DebugLinkWatchLayout: {
29616
+ fields: {
29617
+ watch: {
29618
+ type: "bool",
29619
+ id: 1
29620
+ }
29621
+ }
29622
+ },
29422
29623
  EosGetPublicKey: {
29423
29624
  fields: {
29424
29625
  address_n: {
@@ -31252,6 +31453,30 @@ var nested = {
31252
31453
  }
31253
31454
  }
31254
31455
  },
31456
+ InternalMyAddressRequest: {
31457
+ fields: {
31458
+ coin_type: {
31459
+ rule: "required",
31460
+ type: "uint32",
31461
+ id: 1
31462
+ },
31463
+ chain_id: {
31464
+ rule: "required",
31465
+ type: "uint32",
31466
+ id: 2
31467
+ },
31468
+ account_index: {
31469
+ rule: "required",
31470
+ type: "uint32",
31471
+ id: 3
31472
+ },
31473
+ derive_type: {
31474
+ rule: "required",
31475
+ type: "uint32",
31476
+ id: 4
31477
+ }
31478
+ }
31479
+ },
31255
31480
  KaspaGetAddress: {
31256
31481
  fields: {
31257
31482
  address_n: {
@@ -32596,6 +32821,49 @@ var nested = {
32596
32821
  }
32597
32822
  }
32598
32823
  },
32824
+ WallpaperTarget: {
32825
+ values: {
32826
+ Home: 0,
32827
+ Lock: 1
32828
+ }
32829
+ },
32830
+ SetWallpaper: {
32831
+ fields: {
32832
+ target: {
32833
+ rule: "required",
32834
+ type: "WallpaperTarget",
32835
+ id: 1
32836
+ },
32837
+ path: {
32838
+ rule: "required",
32839
+ type: "string",
32840
+ id: 2
32841
+ }
32842
+ }
32843
+ },
32844
+ GetWallpaper: {
32845
+ fields: {
32846
+ target: {
32847
+ rule: "required",
32848
+ type: "WallpaperTarget",
32849
+ id: 1
32850
+ }
32851
+ }
32852
+ },
32853
+ Wallpaper: {
32854
+ fields: {
32855
+ target: {
32856
+ rule: "required",
32857
+ type: "WallpaperTarget",
32858
+ id: 1
32859
+ },
32860
+ path: {
32861
+ rule: "required",
32862
+ type: "string",
32863
+ id: 2
32864
+ }
32865
+ }
32866
+ },
32599
32867
  ResourceUpdate: {
32600
32868
  fields: {
32601
32869
  file_name: {
@@ -34753,164 +35021,28 @@ var nested = {
34753
35021
  id: 1
34754
35022
  },
34755
35023
  destination: {
34756
- rule: "required",
34757
- type: "string",
34758
- id: 2
34759
- },
34760
- destination_tag: {
34761
- type: "uint32",
34762
- id: 3
34763
- }
34764
- }
34765
- }
34766
- }
34767
- },
34768
- RippleSignedTx: {
34769
- fields: {
34770
- signature: {
34771
- rule: "required",
34772
- type: "bytes",
34773
- id: 1
34774
- },
34775
- serialized_tx: {
34776
- rule: "required",
34777
- type: "bytes",
34778
- id: 2
34779
- }
34780
- }
34781
- },
34782
- ScdoGetAddress: {
34783
- fields: {
34784
- address_n: {
34785
- rule: "repeated",
34786
- type: "uint32",
34787
- id: 1,
34788
- options: {
34789
- packed: false
34790
- }
34791
- },
34792
- show_display: {
34793
- type: "bool",
34794
- id: 2
34795
- }
34796
- }
34797
- },
34798
- ScdoAddress: {
34799
- fields: {
34800
- address: {
34801
- rule: "required",
34802
- type: "string",
34803
- id: 1
34804
- }
34805
- }
34806
- },
34807
- ScdoSignTx: {
34808
- fields: {
34809
- address_n: {
34810
- rule: "repeated",
34811
- type: "uint32",
34812
- id: 1,
34813
- options: {
34814
- packed: false
34815
- }
34816
- },
34817
- nonce: {
34818
- rule: "required",
34819
- type: "bytes",
34820
- id: 2
34821
- },
34822
- gas_price: {
34823
- rule: "required",
34824
- type: "bytes",
34825
- id: 3
34826
- },
34827
- gas_limit: {
34828
- rule: "required",
34829
- type: "bytes",
34830
- id: 4
34831
- },
34832
- to: {
34833
- rule: "required",
34834
- type: "string",
34835
- id: 5
34836
- },
34837
- value: {
34838
- rule: "required",
34839
- type: "bytes",
34840
- id: 6
34841
- },
34842
- timestamp: {
34843
- rule: "required",
34844
- type: "bytes",
34845
- id: 7
34846
- },
34847
- data_initial_chunk: {
34848
- type: "bytes",
34849
- id: 8,
34850
- options: {
34851
- "default": ""
34852
- }
34853
- },
34854
- data_length: {
34855
- type: "uint32",
34856
- id: 9,
34857
- options: {
34858
- "default": 0
34859
- }
34860
- },
34861
- tx_type: {
34862
- type: "uint32",
34863
- id: 10,
34864
- options: {
34865
- "default": 0
34866
- }
34867
- }
34868
- }
34869
- },
34870
- ScdoSignedTx: {
34871
- fields: {
34872
- data_length: {
34873
- type: "uint32",
34874
- id: 1
34875
- },
34876
- signature: {
34877
- type: "bytes",
34878
- id: 2
34879
- }
34880
- }
34881
- },
34882
- ScdoTxAck: {
34883
- fields: {
34884
- data_chunk: {
34885
- type: "bytes",
34886
- id: 1
34887
- }
34888
- }
34889
- },
34890
- ScdoSignMessage: {
34891
- fields: {
34892
- address_n: {
34893
- rule: "repeated",
34894
- type: "uint32",
34895
- id: 1,
34896
- options: {
34897
- packed: false
35024
+ rule: "required",
35025
+ type: "string",
35026
+ id: 2
35027
+ },
35028
+ destination_tag: {
35029
+ type: "uint32",
35030
+ id: 3
35031
+ }
34898
35032
  }
34899
- },
34900
- message: {
34901
- type: "bytes",
34902
- id: 2
34903
35033
  }
34904
35034
  }
34905
35035
  },
34906
- ScdoSignedMessage: {
35036
+ RippleSignedTx: {
34907
35037
  fields: {
34908
35038
  signature: {
35039
+ rule: "required",
34909
35040
  type: "bytes",
34910
35041
  id: 1
34911
35042
  },
34912
- address: {
34913
- type: "string",
35043
+ serialized_tx: {
35044
+ rule: "required",
35045
+ type: "bytes",
34914
35046
  id: 2
34915
35047
  }
34916
35048
  }
@@ -36883,16 +37015,16 @@ var nested = {
36883
37015
  }
36884
37016
  }
36885
37017
  },
36886
- TxDetailsAmount: {
37018
+ ViewAmount: {
36887
37019
  fields: {
36888
- num: {
37020
+ is_unlimited: {
36889
37021
  rule: "required",
36890
- type: "string",
37022
+ type: "bool",
36891
37023
  id: 1
36892
37024
  },
36893
- decimals: {
37025
+ num: {
36894
37026
  rule: "required",
36895
- type: "uint32",
37027
+ type: "string",
36896
37028
  id: 2
36897
37029
  },
36898
37030
  symbol: {
@@ -36902,95 +37034,64 @@ var nested = {
36902
37034
  }
36903
37035
  }
36904
37036
  },
36905
- TxDetailsAddress: {
37037
+ ViewDetail: {
36906
37038
  fields: {
36907
37039
  key: {
36908
37040
  rule: "required",
36909
37041
  type: "uint32",
36910
37042
  id: 1
36911
37043
  },
36912
- address: {
37044
+ value: {
36913
37045
  rule: "required",
36914
37046
  type: "string",
36915
37047
  id: 2
36916
37048
  },
36917
- owner: {
36918
- type: "string",
37049
+ is_overview: {
37050
+ rule: "required",
37051
+ type: "bool",
36919
37052
  id: 3
36920
37053
  },
36921
- icon: {
36922
- type: "string",
36923
- id: 4
36924
- }
36925
- }
36926
- },
36927
- TxDetailsNetwork: {
36928
- fields: {
36929
- coin_type: {
37054
+ has_icon: {
36930
37055
  rule: "required",
36931
- type: "uint64",
36932
- id: 1
36933
- },
36934
- chain_id: {
36935
- type: "uint64",
36936
- id: 2
37056
+ type: "bool",
37057
+ id: 4
36937
37058
  }
36938
37059
  }
36939
37060
  },
36940
- TxDetailsGeneral: {
37061
+ ViewSignPage: {
36941
37062
  fields: {
36942
- key: {
37063
+ title: {
36943
37064
  rule: "required",
36944
- type: "uint32",
37065
+ type: "string",
36945
37066
  id: 1
36946
37067
  },
36947
- value: {
36948
- rule: "required",
36949
- type: "string",
37068
+ amount: {
37069
+ type: "ViewAmount",
36950
37070
  id: 2
36951
37071
  },
36952
- is_overview: {
36953
- rule: "required",
36954
- type: "bool",
37072
+ general: {
37073
+ rule: "repeated",
37074
+ type: "ViewDetail",
36955
37075
  id: 3
36956
37076
  }
36957
37077
  }
36958
37078
  },
36959
- TxDetailsDisplayType: {
36960
- values: {
36961
- DISPLAY_TYPE_INFO: 0,
36962
- DISPLAY_TYPE_SIGN: 1
36963
- }
36964
- },
36965
- TxDetailsPage: {
37079
+ ViewVerifyPage: {
36966
37080
  fields: {
36967
37081
  title: {
36968
37082
  rule: "required",
36969
37083
  type: "string",
36970
37084
  id: 1
36971
37085
  },
36972
- display_type: {
37086
+ address: {
36973
37087
  rule: "required",
36974
- type: "TxDetailsDisplayType",
37088
+ type: "string",
36975
37089
  id: 2
36976
37090
  },
36977
- amount: {
36978
- type: "TxDetailsAmount",
37091
+ path: {
37092
+ rule: "required",
37093
+ type: "string",
36979
37094
  id: 3
36980
- },
36981
- network: {
36982
- type: "TxDetailsNetwork",
36983
- id: 4
36984
- },
36985
- address: {
36986
- rule: "repeated",
36987
- type: "TxDetailsAddress",
36988
- id: 5
36989
- },
36990
- general: {
36991
- rule: "repeated",
36992
- type: "TxDetailsGeneral",
36993
- id: 6
36994
37095
  }
36995
37096
  }
36996
37097
  },
@@ -37077,6 +37178,102 @@ var nested = {
37077
37178
  }
37078
37179
  }
37079
37180
  },
37181
+ TonSignData: {
37182
+ fields: {
37183
+ address_n: {
37184
+ rule: "repeated",
37185
+ type: "uint32",
37186
+ id: 1,
37187
+ options: {
37188
+ packed: false
37189
+ }
37190
+ },
37191
+ type: {
37192
+ rule: "required",
37193
+ type: "TonSignDataType",
37194
+ id: 2
37195
+ },
37196
+ payload: {
37197
+ rule: "required",
37198
+ type: "bytes",
37199
+ id: 3
37200
+ },
37201
+ schema: {
37202
+ type: "string",
37203
+ id: 4
37204
+ },
37205
+ appdomain: {
37206
+ rule: "required",
37207
+ type: "string",
37208
+ id: 5
37209
+ },
37210
+ timestamp: {
37211
+ rule: "required",
37212
+ type: "uint64",
37213
+ id: 6
37214
+ },
37215
+ from_address: {
37216
+ type: "string",
37217
+ id: 7
37218
+ },
37219
+ wallet_version: {
37220
+ type: "TonWalletVersion",
37221
+ id: 8,
37222
+ options: {
37223
+ "default": "V4R2"
37224
+ }
37225
+ },
37226
+ wallet_id: {
37227
+ type: "uint32",
37228
+ id: 9,
37229
+ options: {
37230
+ "default": 698983191
37231
+ }
37232
+ },
37233
+ workchain: {
37234
+ type: "TonWorkChain",
37235
+ id: 10,
37236
+ options: {
37237
+ "default": "BASECHAIN"
37238
+ }
37239
+ },
37240
+ is_bounceable: {
37241
+ type: "bool",
37242
+ id: 11,
37243
+ options: {
37244
+ "default": false
37245
+ }
37246
+ },
37247
+ is_testnet_only: {
37248
+ type: "bool",
37249
+ id: 12,
37250
+ options: {
37251
+ "default": false
37252
+ }
37253
+ }
37254
+ },
37255
+ nested: {
37256
+ TonSignDataType: {
37257
+ values: {
37258
+ TEXT: 0,
37259
+ BINARY: 1,
37260
+ CELL: 2
37261
+ }
37262
+ }
37263
+ }
37264
+ },
37265
+ TonSignedData: {
37266
+ fields: {
37267
+ signature: {
37268
+ type: "bytes",
37269
+ id: 1
37270
+ },
37271
+ digest: {
37272
+ type: "bytes",
37273
+ id: 2
37274
+ }
37275
+ }
37276
+ },
37080
37277
  GetProtoVersion: {
37081
37278
  fields: {
37082
37279
  }
@@ -37202,7 +37399,7 @@ var nested = {
37202
37399
  },
37203
37400
  DeviceHardwareInfo: {
37204
37401
  fields: {
37205
- Device_type: {
37402
+ device_type: {
37206
37403
  type: "DeviceType",
37207
37404
  id: 10
37208
37405
  },
@@ -37445,10 +37642,6 @@ var nested = {
37445
37642
  rule: "repeated",
37446
37643
  type: "DeviceFirmwareTarget",
37447
37644
  id: 1
37448
- },
37449
- max_concurrent: {
37450
- type: "uint32",
37451
- id: 2
37452
37645
  }
37453
37646
  }
37454
37647
  },
@@ -37762,44 +37955,73 @@ var nested = {
37762
37955
  fields: {
37763
37956
  }
37764
37957
  },
37765
- FilesystemDiskControl: {
37766
- fields: {
37767
- enable: {
37768
- rule: "required",
37769
- type: "uint32",
37770
- id: 1
37771
- }
37772
- }
37773
- },
37774
37958
  OnboardingStep: {
37775
37959
  values: {
37776
37960
  ONBOARDING_STEP_UNKNOWN: 0,
37777
- ONBOARDING_STEP_SECURITY_CHECK: 1,
37778
- ONBOARDING_STEP_PIN: 2,
37779
- ONBOARDING_STEP_SETUP_CHOICE: 3,
37780
- ONBOARDING_STEP_CREATE_NEW: 4,
37781
- ONBOARDING_STEP_SEEDCARD_BACKUP: 5,
37782
- ONBOARDING_STEP_RESTORE_CHOICE: 6,
37783
- ONBOARDING_STEP_RESTORE_MNEMONIC: 7,
37784
- ONBOARDING_STEP_RESTORE_MNEMONIC_SEEDCARD_BACKUP: 8,
37785
- ONBOARDING_STEP_RESTORE_SEEDCARD: 9,
37786
- ONBOARDING_STEP_DONE: 100
37961
+ ONBOARDING_STEP_DEVICE_VERIFICATION: 1,
37962
+ ONBOARDING_STEP_PERSONALIZATION: 2,
37963
+ ONBOARDING_STEP_SETUP: 3,
37964
+ ONBOARDING_STEP_FIRMWARE: 4
37787
37965
  }
37788
37966
  },
37789
- DeviceGetOnboardingStatus: {
37967
+ GetOnboardingStatus: {
37790
37968
  fields: {
37791
37969
  }
37792
37970
  },
37793
- DeviceOnboardingStatus: {
37971
+ OnboardingStatus: {
37794
37972
  fields: {
37795
37973
  step: {
37796
37974
  rule: "required",
37797
37975
  type: "OnboardingStep",
37798
37976
  id: 1
37799
37977
  },
37800
- page_name: {
37801
- type: "string",
37978
+ setup: {
37979
+ type: "Setup",
37802
37980
  id: 2
37981
+ },
37982
+ detail_code: {
37983
+ type: "uint32",
37984
+ id: 3
37985
+ },
37986
+ detail_str: {
37987
+ type: "string",
37988
+ id: 4
37989
+ }
37990
+ },
37991
+ nested: {
37992
+ Setup: {
37993
+ fields: {
37994
+ new_device: {
37995
+ type: "NewDevice",
37996
+ id: 1
37997
+ },
37998
+ restore: {
37999
+ type: "Restore",
38000
+ id: 2
38001
+ }
38002
+ },
38003
+ nested: {
38004
+ NewDevice: {
38005
+ fields: {
38006
+ seedcard_backup: {
38007
+ type: "bool",
38008
+ id: 1
38009
+ }
38010
+ }
38011
+ },
38012
+ Restore: {
38013
+ fields: {
38014
+ mnemonic: {
38015
+ type: "bool",
38016
+ id: 1
38017
+ },
38018
+ seedcard: {
38019
+ type: "bool",
38020
+ id: 2
38021
+ }
38022
+ }
38023
+ }
38024
+ }
37803
38025
  }
37804
38026
  }
37805
38027
  },
@@ -39962,6 +40184,20 @@ const LogBlockEvent = new Set([
39962
40184
  UI_RESPONSE.RECEIVE_PIN,
39963
40185
  UI_RESPONSE.RECEIVE_PASSPHRASE,
39964
40186
  ]);
40187
+ const LogBlockMethod = new Set(['evmSignTypedData']);
40188
+ function getLogBlockLabel(message) {
40189
+ if (!message || typeof message !== 'object')
40190
+ return undefined;
40191
+ const { type, payload, method } = message;
40192
+ if (type && LogBlockEvent.has(type)) {
40193
+ return type;
40194
+ }
40195
+ const methodName = method !== null && method !== void 0 ? method : payload === null || payload === void 0 ? void 0 : payload.method;
40196
+ if (methodName && LogBlockMethod.has(methodName)) {
40197
+ return methodName;
40198
+ }
40199
+ return undefined;
40200
+ }
39965
40201
 
39966
40202
  const Log$e = getLogger(exports.LoggerNames.DevicePool);
39967
40203
  const getDiff = (current, descriptors) => {
@@ -41574,6 +41810,9 @@ class Device extends events.exports {
41574
41810
  }
41575
41811
  lockDevice() {
41576
41812
  return __awaiter(this, void 0, void 0, function* () {
41813
+ if (getDeviceType(this.features) === hdShared.EDeviceType.Pro2) {
41814
+ return { message: 'LockDevice skipped for Pro2' };
41815
+ }
41577
41816
  const res = yield this.commands.typedCall('LockDevice', 'Success', {});
41578
41817
  return res.message;
41579
41818
  });
@@ -44097,8 +44336,7 @@ class DeviceLock extends BaseMethod {
44097
44336
  }
44098
44337
  run() {
44099
44338
  return __awaiter(this, void 0, void 0, function* () {
44100
- const res = yield this.device.commands.typedCall('LockDevice', 'Success');
44101
- return Promise.resolve(res.message);
44339
+ return this.device.lockDevice();
44102
44340
  });
44103
44341
  }
44104
44342
  }
@@ -45922,7 +46160,7 @@ class DeviceGetOnboardingStatus extends BaseMethod {
45922
46160
  }
45923
46161
  run() {
45924
46162
  return __awaiter(this, void 0, void 0, function* () {
45925
- const res = yield this.device.commands.typedCall('DeviceGetOnboardingStatus', 'DeviceOnboardingStatus', {});
46163
+ const res = yield this.device.commands.typedCall('GetOnboardingStatus', 'OnboardingStatus', {});
45926
46164
  return Promise.resolve(res.message);
45927
46165
  });
45928
46166
  }
@@ -51603,6 +51841,9 @@ class SuiGetAddress extends BaseMethod {
51603
51841
  }
51604
51842
  getVersionRange() {
51605
51843
  return {
51844
+ pro2: {
51845
+ min: '0.0.0',
51846
+ },
51606
51847
  model_mini: {
51607
51848
  min: '3.0.0',
51608
51849
  },
@@ -51692,6 +51933,9 @@ class SuiGetPublicKey extends BaseMethod {
51692
51933
  }
51693
51934
  getVersionRange() {
51694
51935
  return {
51936
+ pro2: {
51937
+ min: '0.0.0',
51938
+ },
51695
51939
  model_mini: {
51696
51940
  min: '3.0.0',
51697
51941
  },
@@ -51733,6 +51977,9 @@ class SuiSignMessage extends BaseMethod {
51733
51977
  }
51734
51978
  getVersionRange() {
51735
51979
  return {
51980
+ pro2: {
51981
+ min: '0.0.0',
51982
+ },
51736
51983
  model_mini: {
51737
51984
  min: '3.4.0',
51738
51985
  },
@@ -51786,6 +52033,9 @@ class SuiSignTransaction extends BaseMethod {
51786
52033
  }
51787
52034
  getVersionRange() {
51788
52035
  return {
52036
+ pro2: {
52037
+ min: '0.0.0',
52038
+ },
51789
52039
  model_mini: {
51790
52040
  min: '3.0.0',
51791
52041
  },
@@ -54402,6 +54652,9 @@ class TonGetAddress extends BaseMethod {
54402
54652
  }
54403
54653
  getVersionRange() {
54404
54654
  return {
54655
+ pro2: {
54656
+ min: '0.0.0',
54657
+ },
54405
54658
  model_touch: {
54406
54659
  min: '4.10.0',
54407
54660
  },
@@ -54510,6 +54763,9 @@ class TonSignMessage extends BaseMethod {
54510
54763
  }
54511
54764
  getVersionRange() {
54512
54765
  return {
54766
+ pro2: {
54767
+ min: '0.0.0',
54768
+ },
54513
54769
  model_touch: {
54514
54770
  min: '4.10.0',
54515
54771
  },
@@ -54627,6 +54883,9 @@ class TonSignProof extends BaseMethod {
54627
54883
  }
54628
54884
  getVersionRange() {
54629
54885
  return {
54886
+ pro2: {
54887
+ min: '0.0.0',
54888
+ },
54630
54889
  model_touch: {
54631
54890
  min: '4.10.0',
54632
54891
  },
@@ -54679,6 +54938,13 @@ class TonSignData extends BaseMethod {
54679
54938
  is_testnet_only: this.payload.isTestnetOnly,
54680
54939
  };
54681
54940
  }
54941
+ getVersionRange() {
54942
+ return {
54943
+ pro2: {
54944
+ min: '0.0.0',
54945
+ },
54946
+ };
54947
+ }
54682
54948
  run() {
54683
54949
  return __awaiter(this, void 0, void 0, function* () {
54684
54950
  const res = yield this.device.commands.typedCall('TonSignData', 'TonSignedData', Object.assign({}, this.params));
@@ -56873,6 +57139,7 @@ exports.getHomeScreenHex = getHomeScreenHex;
56873
57139
  exports.getHomeScreenSize = getHomeScreenSize;
56874
57140
  exports.getLanguageConfig = getLanguageConfig;
56875
57141
  exports.getLog = getLog;
57142
+ exports.getLogBlockLabel = getLogBlockLabel;
56876
57143
  exports.getLogger = getLogger;
56877
57144
  exports.getMethodVersionRange = getMethodVersionRange;
56878
57145
  exports.getOutputScriptType = getOutputScriptType;