@onekeyfe/hd-transport 1.2.0-alpha.1 → 1.2.0-alpha.10

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 (44) hide show
  1. package/README.md +1 -1
  2. package/__tests__/messages.test.js +76 -0
  3. package/__tests__/protocol-v2-link-manager.test.js +326 -0
  4. package/__tests__/protocol-v2-usb-transport-base.test.js +296 -0
  5. package/__tests__/protocol-v2.test.js +249 -81
  6. package/dist/constants.d.ts +4 -2
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/index.d.ts +501 -234
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +420 -72
  11. package/dist/protocols/index.d.ts +2 -0
  12. package/dist/protocols/index.d.ts.map +1 -1
  13. package/dist/protocols/v2/constants.d.ts +1 -0
  14. package/dist/protocols/v2/constants.d.ts.map +1 -1
  15. package/dist/protocols/v2/decode.d.ts +1 -0
  16. package/dist/protocols/v2/decode.d.ts.map +1 -1
  17. package/dist/protocols/v2/link-manager.d.ts +35 -0
  18. package/dist/protocols/v2/link-manager.d.ts.map +1 -0
  19. package/dist/protocols/v2/sequence-cursor.d.ts +5 -0
  20. package/dist/protocols/v2/sequence-cursor.d.ts.map +1 -0
  21. package/dist/protocols/v2/session.d.ts +16 -4
  22. package/dist/protocols/v2/session.d.ts.map +1 -1
  23. package/dist/protocols/v2/usb-transport-base.d.ts +31 -0
  24. package/dist/protocols/v2/usb-transport-base.d.ts.map +1 -0
  25. package/dist/serialization/protobuf/messages.d.ts.map +1 -1
  26. package/dist/types/messages.d.ts +291 -155
  27. package/dist/types/messages.d.ts.map +1 -1
  28. package/dist/types/transport.d.ts +1 -1
  29. package/dist/types/transport.d.ts.map +1 -1
  30. package/messages-protocol-v2.json +599 -1033
  31. package/package.json +2 -2
  32. package/scripts/protobuf-build.sh +60 -142
  33. package/src/constants.ts +8 -2
  34. package/src/index.ts +8 -0
  35. package/src/protocols/index.ts +4 -1
  36. package/src/protocols/v2/constants.ts +1 -0
  37. package/src/protocols/v2/decode.ts +36 -17
  38. package/src/protocols/v2/link-manager.ts +160 -0
  39. package/src/protocols/v2/sequence-cursor.ts +10 -0
  40. package/src/protocols/v2/session.ts +80 -45
  41. package/src/protocols/v2/usb-transport-base.ts +194 -0
  42. package/src/serialization/protobuf/messages.ts +6 -1
  43. package/src/types/messages.ts +359 -185
  44. package/src/types/transport.ts +1 -1
@@ -1193,12 +1193,16 @@ export enum FailureType {
1193
1193
  Failure_WipeCodeMismatch = 13,
1194
1194
  Failure_InvalidSession = 14,
1195
1195
  Failure_FirmwareError = 99,
1196
+ Failure_InvalidMessage = 1,
1197
+ Failure_UndefinedError = 2,
1198
+ Failure_UsageError = 3,
1196
1199
  }
1197
1200
 
1198
1201
  // Failure
1199
1202
  export type Failure = {
1200
1203
  code?: FailureType;
1201
1204
  message?: string;
1205
+ subcode?: number;
1202
1206
  };
1203
1207
 
1204
1208
  export enum Enum_ButtonRequestType {
@@ -2456,6 +2460,28 @@ export type OnekeyFeatures = {
2456
2460
  onekey_se02_boot_build_id?: string;
2457
2461
  onekey_se03_boot_build_id?: string;
2458
2462
  onekey_se04_boot_build_id?: string;
2463
+ onekey_romloader_version?: string;
2464
+ onekey_bootloader_version?: string;
2465
+ onekey_romloader_hash?: string;
2466
+ onekey_bootloader_hash?: string;
2467
+ onekey_romloader_build_id?: string;
2468
+ onekey_bootloader_build_id?: string;
2469
+ onekey_coprocessor_bt_name?: string;
2470
+ onekey_coprocessor_version?: string;
2471
+ onekey_coprocessor_build_id?: string;
2472
+ onekey_coprocessor_hash?: string;
2473
+ onekey_se01_bootloader_version?: string;
2474
+ onekey_se02_bootloader_version?: string;
2475
+ onekey_se03_bootloader_version?: string;
2476
+ onekey_se04_bootloader_version?: string;
2477
+ onekey_se01_bootloader_hash?: string;
2478
+ onekey_se02_bootloader_hash?: string;
2479
+ onekey_se03_bootloader_hash?: string;
2480
+ onekey_se04_bootloader_hash?: string;
2481
+ onekey_se01_bootloader_build_id?: string;
2482
+ onekey_se02_bootloader_build_id?: string;
2483
+ onekey_se03_bootloader_build_id?: string;
2484
+ onekey_se04_bootloader_build_id?: string;
2459
2485
  };
2460
2486
 
2461
2487
  // LockDevice
@@ -4452,13 +4478,13 @@ export type TxAckPaymentRequest = {
4452
4478
  signature: string;
4453
4479
  };
4454
4480
 
4455
- // DebugLinkInput
4456
- export type DebugLinkInput = {
4457
- x?: number;
4458
- y?: number;
4459
- duration_ms?: number;
4460
- x_end?: number;
4461
- y_end?: number;
4481
+ // EthereumSignTypedDataQR
4482
+ export type EthereumSignTypedDataQR = {
4483
+ address_n: number[];
4484
+ json_data?: string;
4485
+ chain_id?: number;
4486
+ metamask_v4_compat?: boolean;
4487
+ request_id?: string;
4462
4488
  };
4463
4489
 
4464
4490
  // InternalMyAddressRequest
@@ -4469,6 +4495,13 @@ export type InternalMyAddressRequest = {
4469
4495
  derive_type: number;
4470
4496
  };
4471
4497
 
4498
+ // StartSession
4499
+ export type StartSession = {
4500
+ session_id?: string;
4501
+ _skip_passphrase?: boolean;
4502
+ derive_cardano?: boolean;
4503
+ };
4504
+
4472
4505
  // SetBusy
4473
4506
  export type SetBusy = {
4474
4507
  expiry_ms?: number;
@@ -4565,12 +4598,26 @@ export type ViewTip = {
4565
4598
  text: string;
4566
4599
  };
4567
4600
 
4601
+ // ViewRawData
4602
+ export type ViewRawData = {
4603
+ initial_data: string;
4604
+ placeholder: number;
4605
+ };
4606
+
4607
+ export enum ViewSignLayout {
4608
+ LayoutDefault = 0,
4609
+ LayoutSafeTxCreate = 1,
4610
+ }
4611
+
4568
4612
  // ViewSignPage
4569
4613
  export type ViewSignPage = {
4570
4614
  title: string;
4571
4615
  amount?: UintType;
4572
4616
  general: ViewDetail[];
4573
4617
  tip?: ViewTip;
4618
+ raw_data?: ViewRawData;
4619
+ slide_to_confirm?: boolean;
4620
+ layout?: ViewSignLayout;
4574
4621
  };
4575
4622
 
4576
4623
  // ViewVerifyPage
@@ -4580,23 +4627,171 @@ export type ViewVerifyPage = {
4580
4627
  path: string;
4581
4628
  };
4582
4629
 
4583
- // GetProtoVersion
4584
- export type GetProtoVersion = {};
4630
+ // ProtocolInfoRequest
4631
+ export type ProtocolInfoRequest = {};
4585
4632
 
4586
- // ProtoVersion
4587
- export type ProtoVersion = {
4588
- proto_version: number;
4633
+ // ProtocolInfo
4634
+ export type ProtocolInfo = {
4635
+ version: number;
4636
+ supported_messages: number[];
4637
+ protobuf_definition?: string;
4589
4638
  };
4590
4639
 
4591
- export enum DevRebootType {
4640
+ export enum DeviceRebootType {
4592
4641
  Normal = 0,
4593
- Boardloader = 1,
4642
+ Romloader = 1,
4594
4643
  Bootloader = 2,
4595
4644
  }
4596
4645
 
4597
- // DevReboot
4598
- export type DevReboot = {
4599
- reboot_type: DevRebootType;
4646
+ // DeviceReboot
4647
+ export type DeviceReboot = {
4648
+ reboot_type: DeviceRebootType;
4649
+ };
4650
+
4651
+ // DeviceSettings
4652
+ export type DeviceSettings = {
4653
+ label?: string;
4654
+ bt_enable?: boolean;
4655
+ language?: string;
4656
+ };
4657
+
4658
+ // DeviceSettingsGet
4659
+ export type DeviceSettingsGet = {};
4660
+
4661
+ // DeviceSettingsSet
4662
+ export type DeviceSettingsSet = {
4663
+ settings: DeviceSettings;
4664
+ };
4665
+
4666
+ // DeviceCertificate
4667
+ export type DeviceCertificate = {
4668
+ cert_and_pubkey: string;
4669
+ private_key?: string;
4670
+ };
4671
+
4672
+ // DeviceCertificateWrite
4673
+ export type DeviceCertificateWrite = {
4674
+ cert: DeviceCertificate;
4675
+ };
4676
+
4677
+ // DeviceCertificateRead
4678
+ export type DeviceCertificateRead = {};
4679
+
4680
+ // DeviceCertificateSignature
4681
+ export type DeviceCertificateSignature = {
4682
+ data: string;
4683
+ };
4684
+
4685
+ // DeviceCertificateSign
4686
+ export type DeviceCertificateSign = {
4687
+ data: string;
4688
+ };
4689
+
4690
+ export enum DeviceFirmwareTargetType {
4691
+ FW_MGMT_TARGET_INVALID = 0,
4692
+ FW_MGMT_TARGET_CRATE = 1,
4693
+ FW_MGMT_TARGET_ROMLOADER = 2,
4694
+ FW_MGMT_TARGET_BOOTLOADER = 3,
4695
+ FW_MGMT_TARGET_APPLICATION_P1 = 4,
4696
+ FW_MGMT_TARGET_APPLICATION_P2 = 5,
4697
+ FW_MGMT_TARGET_COPROCESSOR = 6,
4698
+ FW_MGMT_TARGET_SE01 = 7,
4699
+ FW_MGMT_TARGET_SE02 = 8,
4700
+ FW_MGMT_TARGET_SE03 = 9,
4701
+ FW_MGMT_TARGET_SE04 = 10,
4702
+ }
4703
+
4704
+ export enum DeviceFirmwareUpdateTaskStatus {
4705
+ FW_MGMT_UPDATER_TASK_STATUS_PENDING = 0,
4706
+ FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS = 1,
4707
+ FW_MGMT_UPDATER_TASK_STATUS_FINISHED = 2,
4708
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND = 3,
4709
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ = 4,
4710
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE = 5,
4711
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY = 6,
4712
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL = 7,
4713
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT = 8,
4714
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY = 9,
4715
+ FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS = 10,
4716
+ }
4717
+
4718
+ // DeviceFirmwareTarget
4719
+ export type DeviceFirmwareTarget = {
4720
+ target_id: DeviceFirmwareTargetType;
4721
+ path: string;
4722
+ };
4723
+
4724
+ // DeviceFirmwareUpdateRequest
4725
+ export type DeviceFirmwareUpdateRequest = {
4726
+ targets: DeviceFirmwareTarget[];
4727
+ };
4728
+
4729
+ // DeviceFirmwareUpdateRecord
4730
+ export type DeviceFirmwareUpdateRecord = {
4731
+ target_id: DeviceFirmwareTargetType;
4732
+ status?: DeviceFirmwareUpdateTaskStatus;
4733
+ payload_version?: number;
4734
+ path?: string;
4735
+ };
4736
+
4737
+ // DeviceFirmwareUpdateRecordFields
4738
+ export type DeviceFirmwareUpdateRecordFields = {
4739
+ status?: boolean;
4740
+ payload_version?: boolean;
4741
+ path?: boolean;
4742
+ };
4743
+
4744
+ // DeviceFirmwareUpdateStatusGet
4745
+ export type DeviceFirmwareUpdateStatusGet = {
4746
+ fields?: DeviceFirmwareUpdateRecordFields;
4747
+ };
4748
+
4749
+ // DeviceFirmwareUpdateStatus
4750
+ export type DeviceFirmwareUpdateStatus = {
4751
+ records: DeviceFirmwareUpdateRecord[];
4752
+ };
4753
+
4754
+ export enum DeviceFactoryAck {
4755
+ FACTORY_ACK_SUCCESS = 0,
4756
+ FACTORY_ACK_FAIL = 1,
4757
+ }
4758
+
4759
+ // DeviceFactoryInfoManufactureTime
4760
+ export type DeviceFactoryInfoManufactureTime = {
4761
+ year: number;
4762
+ month: number;
4763
+ day: number;
4764
+ hour: number;
4765
+ minute: number;
4766
+ second: number;
4767
+ };
4768
+
4769
+ // DeviceFactoryInfo
4770
+ export type DeviceFactoryInfo = {
4771
+ version?: number;
4772
+ serial_number?: string;
4773
+ burn_in_completed?: boolean;
4774
+ factory_test_completed?: boolean;
4775
+ manufacture_time?: DeviceFactoryInfoManufactureTime;
4776
+ };
4777
+
4778
+ // DeviceFactoryInfoSet
4779
+ export type DeviceFactoryInfoSet = {
4780
+ info: DeviceFactoryInfo;
4781
+ };
4782
+
4783
+ // DeviceFactoryInfoGet
4784
+ export type DeviceFactoryInfoGet = {};
4785
+
4786
+ // DeviceFactoryPermanentLock
4787
+ export type DeviceFactoryPermanentLock = {
4788
+ check_a: string;
4789
+ check_b: string;
4790
+ };
4791
+
4792
+ // DeviceFactoryTest
4793
+ export type DeviceFactoryTest = {
4794
+ burn_in_test: boolean;
4600
4795
  };
4601
4796
 
4602
4797
  export enum DeviceType {
@@ -4606,63 +4801,65 @@ export enum DeviceType {
4606
4801
  TOUCH = 3,
4607
4802
  PRO = 5,
4608
4803
  CLASSIC1S_PURE = 6,
4804
+ PRO2 = 7,
4805
+ NEO = 8,
4609
4806
  }
4610
4807
 
4611
- export enum DevSeType {
4808
+ export enum DeviceSeType {
4612
4809
  THD89 = 0,
4613
4810
  SE608A = 1,
4614
4811
  }
4615
4812
 
4616
- export enum DevSEState {
4813
+ export enum DeviceSEState {
4617
4814
  BOOT = 0,
4618
4815
  APP_FACTORY = 51,
4619
4816
  APP = 85,
4620
4817
  }
4621
4818
 
4622
- // DevFirmwareImageInfo
4623
- export type DevFirmwareImageInfo = {
4819
+ // DeviceFirmwareImageInfo
4820
+ export type DeviceFirmwareImageInfo = {
4624
4821
  version?: string;
4625
4822
  build_id?: string;
4626
4823
  hash?: string;
4627
4824
  };
4628
4825
 
4629
- // DevHardwareInfo
4630
- export type DevHardwareInfo = {
4631
- device_type?: DeviceType;
4826
+ // DeviceHardwareInfo
4827
+ export type DeviceHardwareInfo = {
4828
+ Device_type?: DeviceType;
4632
4829
  serial_no?: string;
4633
- device_id?: string;
4634
4830
  hardware_version?: string;
4635
4831
  hardware_version_raw_adc?: number;
4636
4832
  };
4637
4833
 
4638
- // DevMainMcuInfo
4639
- export type DevMainMcuInfo = {
4640
- board?: DevFirmwareImageInfo;
4641
- boot?: DevFirmwareImageInfo;
4642
- app?: DevFirmwareImageInfo;
4834
+ // DeviceMainMcuInfo
4835
+ export type DeviceMainMcuInfo = {
4836
+ romloader?: DeviceFirmwareImageInfo;
4837
+ bootloader?: DeviceFirmwareImageInfo;
4838
+ application?: DeviceFirmwareImageInfo;
4839
+ application_data?: DeviceFirmwareImageInfo;
4643
4840
  };
4644
4841
 
4645
- // DevBluetoothInfo
4646
- export type DevBluetoothInfo = {
4647
- boot?: DevFirmwareImageInfo;
4648
- app?: DevFirmwareImageInfo;
4649
- adv_name?: string;
4650
- mac?: string;
4842
+ // DeviceCoprocessorInfo
4843
+ export type DeviceCoprocessorInfo = {
4844
+ bootloader?: DeviceFirmwareImageInfo;
4845
+ application?: DeviceFirmwareImageInfo;
4846
+ bt_adv_name?: string;
4847
+ bt_mac?: string;
4651
4848
  };
4652
4849
 
4653
- // DevSEInfo
4654
- export type DevSEInfo = {
4655
- boot?: DevFirmwareImageInfo;
4656
- app?: DevFirmwareImageInfo;
4657
- type?: DevSeType;
4658
- state?: DevSEState;
4850
+ // DeviceSEInfo
4851
+ export type DeviceSEInfo = {
4852
+ bootloader?: DeviceFirmwareImageInfo;
4853
+ application?: DeviceFirmwareImageInfo;
4854
+ type?: DeviceSeType;
4855
+ state?: DeviceSEState;
4659
4856
  };
4660
4857
 
4661
- // DevInfoTargets
4662
- export type DevInfoTargets = {
4858
+ // DeviceInfoTargets
4859
+ export type DeviceInfoTargets = {
4663
4860
  hw?: boolean;
4664
4861
  fw?: boolean;
4665
- bt?: boolean;
4862
+ coprocessor?: boolean;
4666
4863
  se1?: boolean;
4667
4864
  se2?: boolean;
4668
4865
  se3?: boolean;
@@ -4670,108 +4867,96 @@ export type DevInfoTargets = {
4670
4867
  status?: boolean;
4671
4868
  };
4672
4869
 
4673
- // DevInfoTypes
4674
- export type DevInfoTypes = {
4870
+ // DeviceInfoTypes
4871
+ export type DeviceInfoTypes = {
4675
4872
  version?: boolean;
4676
4873
  build_id?: boolean;
4677
4874
  hash?: boolean;
4678
4875
  specific?: boolean;
4679
4876
  };
4680
4877
 
4681
- // DevStatus
4682
- export type DevStatus = {
4683
- language?: string;
4684
- bt_enable?: boolean;
4685
- init_states?: boolean;
4686
- backup_required?: boolean;
4687
- passphrase_protection?: boolean;
4688
- label?: string;
4689
- };
4690
-
4691
- // DevGetDeviceInfo
4692
- export type DevGetDeviceInfo = {
4693
- targets?: DevInfoTargets;
4694
- types?: DevInfoTypes;
4878
+ // DeviceInfoGet
4879
+ export type DeviceInfoGet = {
4880
+ targets?: DeviceInfoTargets;
4881
+ types?: DeviceInfoTypes;
4695
4882
  };
4696
4883
 
4697
4884
  // ProtocolV2DeviceInfo
4698
4885
  export type ProtocolV2DeviceInfo = {
4699
4886
  protocol_version: number;
4700
- hw?: DevHardwareInfo;
4701
- fw?: DevMainMcuInfo;
4702
- bt?: DevBluetoothInfo;
4703
- se1?: DevSEInfo;
4704
- se2?: DevSEInfo;
4705
- se3?: DevSEInfo;
4706
- se4?: DevSEInfo;
4707
- status?: DevStatus;
4708
- };
4709
-
4710
- export enum DevFirmwareTargetType {
4711
- TARGET_MAIN_APP = 0,
4712
- TARGET_MAIN_BOOT = 1,
4713
- TARGET_BT = 2,
4714
- TARGET_SE1 = 3,
4715
- TARGET_SE2 = 4,
4716
- TARGET_SE3 = 5,
4717
- TARGET_SE4 = 6,
4718
- TARGET_RESOURCE = 10,
4719
- }
4720
-
4721
- // DevFirmwareTarget
4722
- export type DevFirmwareTarget = {
4723
- target_id: DevFirmwareTargetType;
4724
- path: string;
4725
- };
4726
-
4727
- // DevFirmwareUpdate
4728
- export type DevFirmwareUpdate = {
4729
- targets: DevFirmwareTarget[];
4730
- };
4731
-
4732
- // DevFirmwareInstallProgress
4733
- export type DevFirmwareInstallProgress = {
4734
- target_id: DevFirmwareTargetType;
4735
- progress: number;
4736
- stage?: string;
4887
+ hw?: DeviceHardwareInfo;
4888
+ fw?: DeviceMainMcuInfo;
4889
+ coprocessor?: DeviceCoprocessorInfo;
4890
+ se1?: DeviceSEInfo;
4891
+ se2?: DeviceSEInfo;
4892
+ se3?: DeviceSEInfo;
4893
+ se4?: DeviceSEInfo;
4894
+ status?: DeviceStatus;
4895
+ };
4896
+
4897
+ // DeviceSessionGet
4898
+ export type DeviceSessionGet = {
4899
+ session_id?: string;
4737
4900
  };
4738
4901
 
4739
- // DevFirmwareUpdateStatusEntry
4740
- export type DevFirmwareUpdateStatusEntry = {
4741
- target_id: DevFirmwareTargetType;
4742
- status: number;
4902
+ // DeviceSession
4903
+ export type DeviceSession = {
4904
+ session_id?: string;
4905
+ btc_test_address?: string;
4743
4906
  };
4744
4907
 
4745
- // DevGetFirmwareUpdateStatus
4746
- export type DevGetFirmwareUpdateStatus = {};
4908
+ // DeviceSessionAskPin
4909
+ export type DeviceSessionAskPin = {};
4747
4910
 
4748
- // DevFirmwareUpdateStatus
4749
- export type DevFirmwareUpdateStatus = {
4750
- targets: DevFirmwareUpdateStatusEntry[];
4911
+ // DeviceSessionPinResult
4912
+ export type DeviceSessionPinResult = {
4913
+ unlocked?: boolean;
4914
+ unlocked_attach_pin?: boolean;
4915
+ passphrase_protection?: boolean;
4751
4916
  };
4752
4917
 
4753
- // FactoryDeviceInfoSettings
4754
- export type FactoryDeviceInfoSettings = {
4755
- serial_no?: string;
4756
- cpu_info?: string;
4757
- pre_firmware?: string;
4758
- };
4918
+ // DeviceStatus
4919
+ export type DeviceStatus = {
4920
+ device_id?: string;
4921
+ unlocked?: boolean;
4922
+ init_states?: boolean;
4923
+ backup_required?: boolean;
4924
+ passphrase_enabled?: boolean;
4925
+ attach_to_pin_enabled?: boolean;
4926
+ unlocked_by_attach_to_pin?: boolean;
4927
+ };
4928
+
4929
+ // DeviceStatusGet
4930
+ export type DeviceStatusGet = {};
4931
+
4932
+ export enum DevOnboardingStage {
4933
+ DEV_ONBOARDING_STAGE_UNKNOWN = 0,
4934
+ DEV_ONBOARDING_STAGE_SAFETY_CHECK = 1,
4935
+ DEV_ONBOARDING_STAGE_PERSONALIZATION = 2,
4936
+ DEV_ONBOARDING_STAGE_SELECT_SETUP_METHOD = 3,
4937
+ DEV_ONBOARDING_STAGE_NEW_DEVICE = 4,
4938
+ DEV_ONBOARDING_STAGE_SELECT_RESTORE_METHOD = 5,
4939
+ DEV_ONBOARDING_STAGE_RESTORE_MNEMONIC = 6,
4940
+ DEV_ONBOARDING_STAGE_RESTORE_SEEDCARD = 7,
4941
+ DEV_ONBOARDING_STAGE_WALLET_READY = 8,
4942
+ DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP_PROMPT = 9,
4943
+ DEV_ONBOARDING_STAGE_SELECT_SEEDCARD_BACKUP_METHOD = 10,
4944
+ DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP = 11,
4945
+ DEV_ONBOARDING_STAGE_DONE = 12,
4946
+ }
4759
4947
 
4760
- // FactoryGetDeviceInfo
4761
- export type FactoryGetDeviceInfo = {};
4948
+ // DevGetOnboardingStatus
4949
+ export type DevGetOnboardingStatus = {};
4762
4950
 
4763
- // FactoryDeviceInfo
4764
- export type FactoryDeviceInfo = {
4765
- serial_no?: string;
4766
- spi_flash_info?: string;
4767
- se_info?: string;
4768
- nft_voucher?: string;
4769
- cpu_info?: string;
4770
- pre_firmware?: string;
4951
+ // DevOnboardingStatus
4952
+ export type DevOnboardingStatus = {
4953
+ stage: DevOnboardingStage;
4954
+ status_code?: number;
4955
+ detail_code?: number;
4771
4956
  };
4772
4957
 
4773
- // FilesystemFixPermission
4774
- export type FilesystemFixPermission = {};
4958
+ // FilesystemPermissionFix
4959
+ export type FilesystemPermissionFix = {};
4775
4960
 
4776
4961
  // FilesystemPathInfo
4777
4962
  export type FilesystemPathInfo = {
@@ -4849,40 +5034,13 @@ export type FilesystemDirRemove = {
4849
5034
  };
4850
5035
 
4851
5036
  // FilesystemFormat
4852
- export type FilesystemFormat = {};
4853
-
4854
- export enum OnboardingStep {
4855
- ONBOARDING_STEP_UNKNOWN = 0,
4856
- ONBOARDING_STEP_DEVICE_VERIFICATION = 1,
4857
- ONBOARDING_STEP_PERSONALIZATION = 2,
4858
- ONBOARDING_STEP_SETUP = 3,
4859
- ONBOARDING_STEP_FIRMWARE = 4,
4860
- }
4861
-
4862
- // GetOnboardingStatus
4863
- export type GetOnboardingStatus = {};
4864
-
4865
- export type NewDevice = {
4866
- seedcard_backup?: boolean;
4867
- };
4868
-
4869
- export type Restore = {
4870
- mnemonic?: boolean;
4871
- seedcard?: boolean;
5037
+ export type FilesystemFormat = {
5038
+ data: boolean;
5039
+ user: boolean;
4872
5040
  };
4873
5041
 
4874
- export type Setup = {
4875
- new_device?: NewDevice;
4876
- restore?: Restore;
4877
- };
4878
-
4879
- // OnboardingStatus
4880
- export type OnboardingStatus = {
4881
- step: OnboardingStep;
4882
- setup?: Setup;
4883
- detail_code?: number;
4884
- detail_str?: string;
4885
- };
5042
+ // PortfolioUpdate
5043
+ export type PortfolioUpdate = {};
4886
5044
 
4887
5045
  // custom connect definitions
4888
5046
  export type MessageType = {
@@ -5448,8 +5606,9 @@ export type MessageType = {
5448
5606
  CoinPurchaseMemo: CoinPurchaseMemo;
5449
5607
  PaymentRequestMemo: PaymentRequestMemo;
5450
5608
  TxAckPaymentRequest: TxAckPaymentRequest;
5451
- DebugLinkInput: DebugLinkInput;
5609
+ EthereumSignTypedDataQR: EthereumSignTypedDataQR;
5452
5610
  InternalMyAddressRequest: InternalMyAddressRequest;
5611
+ StartSession: StartSession;
5453
5612
  SetBusy: SetBusy;
5454
5613
  GetFirmwareHash: GetFirmwareHash;
5455
5614
  FirmwareHash: FirmwareHash;
@@ -5464,30 +5623,49 @@ export type MessageType = {
5464
5623
  ViewAmount: ViewAmount;
5465
5624
  ViewDetail: ViewDetail;
5466
5625
  ViewTip: ViewTip;
5626
+ ViewRawData: ViewRawData;
5467
5627
  ViewSignPage: ViewSignPage;
5468
5628
  ViewVerifyPage: ViewVerifyPage;
5469
- GetProtoVersion: GetProtoVersion;
5470
- ProtoVersion: ProtoVersion;
5471
- DevReboot: DevReboot;
5472
- DevFirmwareImageInfo: DevFirmwareImageInfo;
5473
- DevHardwareInfo: DevHardwareInfo;
5474
- DevMainMcuInfo: DevMainMcuInfo;
5475
- DevBluetoothInfo: DevBluetoothInfo;
5476
- DevSEInfo: DevSEInfo;
5477
- DevInfoTargets: DevInfoTargets;
5478
- DevInfoTypes: DevInfoTypes;
5479
- DevStatus: DevStatus;
5480
- DevGetDeviceInfo: DevGetDeviceInfo;
5481
- DevFirmwareTarget: DevFirmwareTarget;
5482
- DevFirmwareUpdate: DevFirmwareUpdate;
5483
- DevFirmwareInstallProgress: DevFirmwareInstallProgress;
5484
- DevFirmwareUpdateStatusEntry: DevFirmwareUpdateStatusEntry;
5485
- DevGetFirmwareUpdateStatus: DevGetFirmwareUpdateStatus;
5486
- DevFirmwareUpdateStatus: DevFirmwareUpdateStatus;
5487
- FactoryDeviceInfoSettings: FactoryDeviceInfoSettings;
5488
- FactoryGetDeviceInfo: FactoryGetDeviceInfo;
5489
- FactoryDeviceInfo: FactoryDeviceInfo;
5490
- FilesystemFixPermission: FilesystemFixPermission;
5629
+ ProtocolInfoRequest: ProtocolInfoRequest;
5630
+ ProtocolInfo: ProtocolInfo;
5631
+ DeviceReboot: DeviceReboot;
5632
+ DeviceSettings: DeviceSettings;
5633
+ DeviceSettingsGet: DeviceSettingsGet;
5634
+ DeviceSettingsSet: DeviceSettingsSet;
5635
+ DeviceCertificate: DeviceCertificate;
5636
+ DeviceCertificateWrite: DeviceCertificateWrite;
5637
+ DeviceCertificateRead: DeviceCertificateRead;
5638
+ DeviceCertificateSignature: DeviceCertificateSignature;
5639
+ DeviceCertificateSign: DeviceCertificateSign;
5640
+ DeviceFirmwareTarget: DeviceFirmwareTarget;
5641
+ DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
5642
+ DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
5643
+ DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
5644
+ DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
5645
+ DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
5646
+ DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
5647
+ DeviceFactoryInfo: DeviceFactoryInfo;
5648
+ DeviceFactoryInfoSet: DeviceFactoryInfoSet;
5649
+ DeviceFactoryInfoGet: DeviceFactoryInfoGet;
5650
+ DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
5651
+ DeviceFactoryTest: DeviceFactoryTest;
5652
+ DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
5653
+ DeviceHardwareInfo: DeviceHardwareInfo;
5654
+ DeviceMainMcuInfo: DeviceMainMcuInfo;
5655
+ DeviceCoprocessorInfo: DeviceCoprocessorInfo;
5656
+ DeviceSEInfo: DeviceSEInfo;
5657
+ DeviceInfoTargets: DeviceInfoTargets;
5658
+ DeviceInfoTypes: DeviceInfoTypes;
5659
+ DeviceInfoGet: DeviceInfoGet;
5660
+ DeviceSessionGet: DeviceSessionGet;
5661
+ DeviceSession: DeviceSession;
5662
+ DeviceSessionAskPin: DeviceSessionAskPin;
5663
+ DeviceSessionPinResult: DeviceSessionPinResult;
5664
+ DeviceStatus: DeviceStatus;
5665
+ DeviceStatusGet: DeviceStatusGet;
5666
+ DevGetOnboardingStatus: DevGetOnboardingStatus;
5667
+ DevOnboardingStatus: DevOnboardingStatus;
5668
+ FilesystemPermissionFix: FilesystemPermissionFix;
5491
5669
  FilesystemPathInfo: FilesystemPathInfo;
5492
5670
  FilesystemPathInfoQuery: FilesystemPathInfoQuery;
5493
5671
  FilesystemFile: FilesystemFile;
@@ -5499,11 +5677,7 @@ export type MessageType = {
5499
5677
  FilesystemDirMake: FilesystemDirMake;
5500
5678
  FilesystemDirRemove: FilesystemDirRemove;
5501
5679
  FilesystemFormat: FilesystemFormat;
5502
- GetOnboardingStatus: GetOnboardingStatus;
5503
- NewDevice: NewDevice;
5504
- Restore: Restore;
5505
- Setup: Setup;
5506
- OnboardingStatus: OnboardingStatus;
5680
+ PortfolioUpdate: PortfolioUpdate;
5507
5681
  };
5508
5682
 
5509
5683
  export type MessageKey = keyof MessageType;