@onekeyfe/hd-transport 1.2.0-alpha.0 → 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 +252 -84
  6. package/dist/constants.d.ts +4 -2
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/index.d.ts +564 -326
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +434 -102
  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 +337 -221
  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 +992 -1420
  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 +86 -51
  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 +419 -272
  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,6 +4478,30 @@ export type TxAckPaymentRequest = {
4452
4478
  signature: string;
4453
4479
  };
4454
4480
 
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;
4488
+ };
4489
+
4490
+ // InternalMyAddressRequest
4491
+ export type InternalMyAddressRequest = {
4492
+ coin_type: number;
4493
+ chain_id: number;
4494
+ account_index: number;
4495
+ derive_type: number;
4496
+ };
4497
+
4498
+ // StartSession
4499
+ export type StartSession = {
4500
+ session_id?: string;
4501
+ _skip_passphrase?: boolean;
4502
+ derive_cardano?: boolean;
4503
+ };
4504
+
4455
4505
  // SetBusy
4456
4506
  export type SetBusy = {
4457
4507
  expiry_ms?: number;
@@ -4480,6 +4530,28 @@ export type WriteSEPrivateKey = {
4480
4530
  private_key: string;
4481
4531
  };
4482
4532
 
4533
+ export enum WallpaperTarget {
4534
+ Home = 0,
4535
+ Lock = 1,
4536
+ }
4537
+
4538
+ // SetWallpaper
4539
+ export type SetWallpaper = {
4540
+ target: WallpaperTarget;
4541
+ path: string;
4542
+ };
4543
+
4544
+ // GetWallpaper
4545
+ export type GetWallpaper = {
4546
+ target: WallpaperTarget;
4547
+ };
4548
+
4549
+ // Wallpaper
4550
+ export type Wallpaper = {
4551
+ target: WallpaperTarget;
4552
+ path: string;
4553
+ };
4554
+
4483
4555
  // UnlockPath
4484
4556
  export type UnlockPath = {
4485
4557
  address_n: number[];
@@ -4498,62 +4570,72 @@ export enum MoneroNetworkType {
4498
4570
  FAKECHAIN = 3,
4499
4571
  }
4500
4572
 
4501
- // TxDetailsAmount
4502
- export type TxDetailsAmount = {
4573
+ // ViewAmount
4574
+ export type ViewAmount = {
4575
+ is_unlimited: boolean;
4503
4576
  num: string;
4504
- decimals: number;
4505
- symbol: string;
4506
4577
  };
4507
4578
 
4508
- // TxDetailsAddress
4509
- export type TxDetailsAddress = {
4579
+ // ViewDetail
4580
+ export type ViewDetail = {
4510
4581
  key: number;
4511
- address: string;
4512
- owner?: string;
4513
- icon?: string;
4582
+ value: string;
4583
+ is_overview: boolean;
4584
+ has_icon: boolean;
4514
4585
  };
4515
4586
 
4516
- // TxDetailsNetwork
4517
- export type TxDetailsNetwork = {
4518
- coin_type: number;
4519
- chain_id?: number;
4587
+ export enum ViewTipType {
4588
+ Default = 0,
4589
+ Highlight = 1,
4590
+ Recommend = 2,
4591
+ Warning = 3,
4592
+ Danger = 4,
4593
+ }
4594
+
4595
+ // ViewTip
4596
+ export type ViewTip = {
4597
+ type: ViewTipType;
4598
+ text: string;
4520
4599
  };
4521
4600
 
4522
- // TxDetailsGeneral
4523
- export type TxDetailsGeneral = {
4524
- key: number;
4525
- value: string;
4526
- is_overview: boolean;
4601
+ // ViewRawData
4602
+ export type ViewRawData = {
4603
+ initial_data: string;
4604
+ placeholder: number;
4527
4605
  };
4528
4606
 
4529
- export enum TxDetailsDisplayType {
4530
- DISPLAY_TYPE_INFO = 0,
4531
- DISPLAY_TYPE_SIGN = 1,
4607
+ export enum ViewSignLayout {
4608
+ LayoutDefault = 0,
4609
+ LayoutSafeTxCreate = 1,
4532
4610
  }
4533
4611
 
4534
- // TxDetailsPage
4535
- export type TxDetailsPage = {
4612
+ // ViewSignPage
4613
+ export type ViewSignPage = {
4536
4614
  title: string;
4537
- display_type: TxDetailsDisplayType;
4538
4615
  amount?: UintType;
4539
- network?: TxDetailsNetwork;
4540
- address: TxDetailsAddress[];
4541
- general: TxDetailsGeneral[];
4616
+ general: ViewDetail[];
4617
+ tip?: ViewTip;
4618
+ raw_data?: ViewRawData;
4619
+ slide_to_confirm?: boolean;
4620
+ layout?: ViewSignLayout;
4542
4621
  };
4543
4622
 
4544
- // GetProtoVersion
4545
- export type GetProtoVersion = {};
4546
-
4547
- // ProtoVersion
4548
- export type ProtoVersion = {
4549
- proto_version: number;
4623
+ // ViewVerifyPage
4624
+ export type ViewVerifyPage = {
4625
+ title: string;
4626
+ address: string;
4627
+ path: string;
4550
4628
  };
4551
4629
 
4552
- export enum DevRebootType {
4553
- Normal = 0,
4554
- Boardloader = 1,
4555
- Bootloader = 2,
4556
- }
4630
+ // ProtocolInfoRequest
4631
+ export type ProtocolInfoRequest = {};
4632
+
4633
+ // ProtocolInfo
4634
+ export type ProtocolInfo = {
4635
+ version: number;
4636
+ supported_messages: number[];
4637
+ protobuf_definition?: string;
4638
+ };
4557
4639
 
4558
4640
  export enum DeviceRebootType {
4559
4641
  Normal = 0,
@@ -4561,16 +4643,157 @@ export enum DeviceRebootType {
4561
4643
  Bootloader = 2,
4562
4644
  }
4563
4645
 
4564
- // DevReboot
4565
- export type DevReboot = {
4566
- reboot_type: DevRebootType;
4567
- };
4568
-
4569
4646
  // DeviceReboot
4570
4647
  export type DeviceReboot = {
4571
4648
  reboot_type: DeviceRebootType;
4572
4649
  };
4573
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;
4795
+ };
4796
+
4574
4797
  export enum DeviceType {
4575
4798
  CLASSIC1 = 0,
4576
4799
  CLASSIC1S = 1,
@@ -4578,62 +4801,65 @@ export enum DeviceType {
4578
4801
  TOUCH = 3,
4579
4802
  PRO = 5,
4580
4803
  CLASSIC1S_PURE = 6,
4804
+ PRO2 = 7,
4805
+ NEO = 8,
4581
4806
  }
4582
4807
 
4583
- export enum DevSeType {
4808
+ export enum DeviceSeType {
4584
4809
  THD89 = 0,
4585
4810
  SE608A = 1,
4586
4811
  }
4587
4812
 
4588
- export enum DevSEState {
4813
+ export enum DeviceSEState {
4589
4814
  BOOT = 0,
4590
4815
  APP_FACTORY = 51,
4591
4816
  APP = 85,
4592
4817
  }
4593
4818
 
4594
- // DevFirmwareImageInfo
4595
- export type DevFirmwareImageInfo = {
4819
+ // DeviceFirmwareImageInfo
4820
+ export type DeviceFirmwareImageInfo = {
4596
4821
  version?: string;
4597
4822
  build_id?: string;
4598
4823
  hash?: string;
4599
4824
  };
4600
4825
 
4601
- // DevHardwareInfo
4602
- export type DevHardwareInfo = {
4603
- device_type?: DeviceType;
4826
+ // DeviceHardwareInfo
4827
+ export type DeviceHardwareInfo = {
4828
+ Device_type?: DeviceType;
4604
4829
  serial_no?: string;
4605
4830
  hardware_version?: string;
4606
4831
  hardware_version_raw_adc?: number;
4607
4832
  };
4608
4833
 
4609
- // DevMainMcuInfo
4610
- export type DevMainMcuInfo = {
4611
- board?: DevFirmwareImageInfo;
4612
- boot?: DevFirmwareImageInfo;
4613
- app?: DevFirmwareImageInfo;
4834
+ // DeviceMainMcuInfo
4835
+ export type DeviceMainMcuInfo = {
4836
+ romloader?: DeviceFirmwareImageInfo;
4837
+ bootloader?: DeviceFirmwareImageInfo;
4838
+ application?: DeviceFirmwareImageInfo;
4839
+ application_data?: DeviceFirmwareImageInfo;
4614
4840
  };
4615
4841
 
4616
- // DevBluetoothInfo
4617
- export type DevBluetoothInfo = {
4618
- boot?: DevFirmwareImageInfo;
4619
- app?: DevFirmwareImageInfo;
4620
- adv_name?: string;
4621
- mac?: string;
4842
+ // DeviceCoprocessorInfo
4843
+ export type DeviceCoprocessorInfo = {
4844
+ bootloader?: DeviceFirmwareImageInfo;
4845
+ application?: DeviceFirmwareImageInfo;
4846
+ bt_adv_name?: string;
4847
+ bt_mac?: string;
4622
4848
  };
4623
4849
 
4624
- // DevSEInfo
4625
- export type DevSEInfo = {
4626
- boot?: DevFirmwareImageInfo;
4627
- app?: DevFirmwareImageInfo;
4628
- type?: DevSeType;
4629
- state?: DevSEState;
4850
+ // DeviceSEInfo
4851
+ export type DeviceSEInfo = {
4852
+ bootloader?: DeviceFirmwareImageInfo;
4853
+ application?: DeviceFirmwareImageInfo;
4854
+ type?: DeviceSeType;
4855
+ state?: DeviceSEState;
4630
4856
  };
4631
4857
 
4632
- // DevInfoTargets
4633
- export type DevInfoTargets = {
4858
+ // DeviceInfoTargets
4859
+ export type DeviceInfoTargets = {
4634
4860
  hw?: boolean;
4635
4861
  fw?: boolean;
4636
- bt?: boolean;
4862
+ coprocessor?: boolean;
4637
4863
  se1?: boolean;
4638
4864
  se2?: boolean;
4639
4865
  se3?: boolean;
@@ -4641,161 +4867,96 @@ export type DevInfoTargets = {
4641
4867
  status?: boolean;
4642
4868
  };
4643
4869
 
4644
- // DevInfoTypes
4645
- export type DevInfoTypes = {
4870
+ // DeviceInfoTypes
4871
+ export type DeviceInfoTypes = {
4646
4872
  version?: boolean;
4647
4873
  build_id?: boolean;
4648
4874
  hash?: boolean;
4649
4875
  specific?: boolean;
4650
4876
  };
4651
4877
 
4652
- // DevStatus
4653
- export type DevStatus = {
4654
- language?: string;
4655
- bt_enable?: boolean;
4656
- init_states?: boolean;
4657
- backup_required?: boolean;
4658
- passphrase_protection?: boolean;
4659
- label?: string;
4660
- };
4661
-
4662
- // DevGetDeviceInfo
4663
- export type DevGetDeviceInfo = {
4664
- targets?: DevInfoTargets;
4665
- types?: DevInfoTypes;
4878
+ // DeviceInfoGet
4879
+ export type DeviceInfoGet = {
4880
+ targets?: DeviceInfoTargets;
4881
+ types?: DeviceInfoTypes;
4666
4882
  };
4667
4883
 
4668
- // DeviceGetDeviceInfo
4669
- export type DeviceGetDeviceInfo = DevGetDeviceInfo;
4670
-
4671
4884
  // ProtocolV2DeviceInfo
4672
4885
  export type ProtocolV2DeviceInfo = {
4673
4886
  protocol_version: number;
4674
- hw?: DevHardwareInfo;
4675
- fw?: DevMainMcuInfo;
4676
- bt?: DevBluetoothInfo;
4677
- se1?: DevSEInfo;
4678
- se2?: DevSEInfo;
4679
- se3?: DevSEInfo;
4680
- se4?: DevSEInfo;
4681
- status?: DevStatus;
4682
- };
4683
-
4684
- export enum DevFirmwareTargetType {
4685
- TARGET_INVALID = 0,
4686
- TARGET_ROMLOADER = 1,
4687
- TARGET_BOOTLOADER = 2,
4688
- TARGET_APPLICATION_P1 = 3,
4689
- TARGET_APPLICATION_P2 = 4,
4690
- TARGET_COPROCESSOR = 5,
4691
- TARGET_SE01 = 6,
4692
- TARGET_SE02 = 7,
4693
- TARGET_SE03 = 8,
4694
- TARGET_SE04 = 9,
4695
- TARGET_RESOURCE = 10,
4696
- }
4697
-
4698
- export enum DeviceFirmwareTargetType {
4699
- TARGET_INVALID = 0,
4700
- TARGET_ROMLOADER = 1,
4701
- TARGET_BOOTLOADER = 2,
4702
- TARGET_APPLICATION_P1 = 3,
4703
- TARGET_APPLICATION_P2 = 4,
4704
- TARGET_COPROCESSOR = 5,
4705
- TARGET_SE01 = 6,
4706
- TARGET_SE02 = 7,
4707
- TARGET_SE03 = 8,
4708
- TARGET_SE04 = 9,
4709
- TARGET_RESOURCE = 10,
4710
- }
4711
-
4712
- // DevFirmwareTarget
4713
- export type DevFirmwareTarget = {
4714
- target_id: DevFirmwareTargetType;
4715
- path: string;
4716
- };
4717
-
4718
- // DeviceFirmwareTarget
4719
- export type DeviceFirmwareTarget = {
4720
- target_id: DeviceFirmwareTargetType;
4721
- path: string;
4722
- };
4723
-
4724
- // DevFirmwareUpdate
4725
- export type DevFirmwareUpdate = {
4726
- targets: DevFirmwareTarget[];
4727
- };
4728
-
4729
- // DeviceFirmwareUpdate
4730
- export type DeviceFirmwareUpdate = {
4731
- targets: DeviceFirmwareTarget[];
4732
- max_concurrent?: number;
4733
- };
4734
-
4735
- // DevFirmwareInstallProgress
4736
- export type DevFirmwareInstallProgress = {
4737
- target_id: DevFirmwareTargetType;
4738
- progress: number;
4739
- stage?: string;
4740
- };
4741
-
4742
- // DeviceFirmwareInstallProgress
4743
- export type DeviceFirmwareInstallProgress = {
4744
- target_id: DeviceFirmwareTargetType;
4745
- progress: number;
4746
- stage?: string;
4747
- };
4748
-
4749
- // DevFirmwareUpdateStatusEntry
4750
- export type DevFirmwareUpdateStatusEntry = {
4751
- target_id: DevFirmwareTargetType;
4752
- status: number;
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;
4753
4900
  };
4754
4901
 
4755
- // DeviceFirmwareUpdateStatusEntry
4756
- export type DeviceFirmwareUpdateStatusEntry = {
4757
- target_id: DeviceFirmwareTargetType;
4758
- status: number;
4902
+ // DeviceSession
4903
+ export type DeviceSession = {
4904
+ session_id?: string;
4905
+ btc_test_address?: string;
4759
4906
  };
4760
4907
 
4761
- // DevGetFirmwareUpdateStatus
4762
- export type DevGetFirmwareUpdateStatus = {};
4763
-
4764
- // DeviceGetFirmwareUpdateStatus
4765
- export type DeviceGetFirmwareUpdateStatus = {};
4908
+ // DeviceSessionAskPin
4909
+ export type DeviceSessionAskPin = {};
4766
4910
 
4767
- // DevFirmwareUpdateStatus
4768
- export type DevFirmwareUpdateStatus = {
4769
- targets: DevFirmwareUpdateStatusEntry[];
4770
- };
4771
-
4772
- // DeviceFirmwareUpdateStatus
4773
- export type DeviceFirmwareUpdateStatus = {
4774
- targets: DeviceFirmwareUpdateStatusEntry[];
4911
+ // DeviceSessionPinResult
4912
+ export type DeviceSessionPinResult = {
4913
+ unlocked?: boolean;
4914
+ unlocked_attach_pin?: boolean;
4915
+ passphrase_protection?: boolean;
4775
4916
  };
4776
4917
 
4777
- // FactoryDeviceInfoSettings
4778
- export type FactoryDeviceInfoSettings = {
4779
- serial_no?: string;
4780
- cpu_info?: string;
4781
- pre_firmware?: string;
4782
- };
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
+ }
4783
4947
 
4784
- // FactoryGetDeviceInfo
4785
- export type FactoryGetDeviceInfo = {};
4948
+ // DevGetOnboardingStatus
4949
+ export type DevGetOnboardingStatus = {};
4786
4950
 
4787
- // FactoryDeviceInfo
4788
- export type FactoryDeviceInfo = {
4789
- serial_no?: string;
4790
- spi_flash_info?: string;
4791
- se_info?: string;
4792
- nft_voucher?: string;
4793
- cpu_info?: string;
4794
- pre_firmware?: string;
4951
+ // DevOnboardingStatus
4952
+ export type DevOnboardingStatus = {
4953
+ stage: DevOnboardingStage;
4954
+ status_code?: number;
4955
+ detail_code?: number;
4795
4956
  };
4796
4957
 
4797
- // FilesystemFixPermission
4798
- export type FilesystemFixPermission = {};
4958
+ // FilesystemPermissionFix
4959
+ export type FilesystemPermissionFix = {};
4799
4960
 
4800
4961
  // FilesystemPathInfo
4801
4962
  export type FilesystemPathInfo = {
@@ -4873,40 +5034,13 @@ export type FilesystemDirRemove = {
4873
5034
  };
4874
5035
 
4875
5036
  // FilesystemFormat
4876
- export type FilesystemFormat = {};
4877
-
4878
- export enum OnboardingStep {
4879
- ONBOARDING_STEP_UNKNOWN = 0,
4880
- ONBOARDING_STEP_DEVICE_VERIFICATION = 1,
4881
- ONBOARDING_STEP_PERSONALIZATION = 2,
4882
- ONBOARDING_STEP_SETUP = 3,
4883
- ONBOARDING_STEP_FIRMWARE = 4,
4884
- }
4885
-
4886
- // GetOnboardingStatus
4887
- export type GetOnboardingStatus = {};
4888
-
4889
- export type NewDevice = {
4890
- seedcard_backup?: boolean;
5037
+ export type FilesystemFormat = {
5038
+ data: boolean;
5039
+ user: boolean;
4891
5040
  };
4892
5041
 
4893
- export type Restore = {
4894
- mnemonic?: boolean;
4895
- seedcard?: boolean;
4896
- };
4897
-
4898
- export type Setup = {
4899
- new_device?: NewDevice;
4900
- restore?: Restore;
4901
- };
4902
-
4903
- // OnboardingStatus
4904
- export type OnboardingStatus = {
4905
- step: OnboardingStep;
4906
- setup?: Setup;
4907
- detail_code?: number;
4908
- detail_str?: string;
4909
- };
5042
+ // PortfolioUpdate
5043
+ export type PortfolioUpdate = {};
4910
5044
 
4911
5045
  // custom connect definitions
4912
5046
  export type MessageType = {
@@ -5472,49 +5606,66 @@ export type MessageType = {
5472
5606
  CoinPurchaseMemo: CoinPurchaseMemo;
5473
5607
  PaymentRequestMemo: PaymentRequestMemo;
5474
5608
  TxAckPaymentRequest: TxAckPaymentRequest;
5609
+ EthereumSignTypedDataQR: EthereumSignTypedDataQR;
5610
+ InternalMyAddressRequest: InternalMyAddressRequest;
5611
+ StartSession: StartSession;
5475
5612
  SetBusy: SetBusy;
5476
5613
  GetFirmwareHash: GetFirmwareHash;
5477
5614
  FirmwareHash: FirmwareHash;
5478
5615
  GetNonce: GetNonce;
5479
5616
  Nonce: Nonce;
5480
5617
  WriteSEPrivateKey: WriteSEPrivateKey;
5618
+ SetWallpaper: SetWallpaper;
5619
+ GetWallpaper: GetWallpaper;
5620
+ Wallpaper: Wallpaper;
5481
5621
  UnlockPath: UnlockPath;
5482
5622
  UnlockedPathRequest: UnlockedPathRequest;
5483
- TxDetailsAmount: TxDetailsAmount;
5484
- TxDetailsAddress: TxDetailsAddress;
5485
- TxDetailsNetwork: TxDetailsNetwork;
5486
- TxDetailsGeneral: TxDetailsGeneral;
5487
- TxDetailsPage: TxDetailsPage;
5488
- GetProtoVersion: GetProtoVersion;
5489
- ProtoVersion: ProtoVersion;
5490
- DevReboot: DevReboot;
5623
+ ViewAmount: ViewAmount;
5624
+ ViewDetail: ViewDetail;
5625
+ ViewTip: ViewTip;
5626
+ ViewRawData: ViewRawData;
5627
+ ViewSignPage: ViewSignPage;
5628
+ ViewVerifyPage: ViewVerifyPage;
5629
+ ProtocolInfoRequest: ProtocolInfoRequest;
5630
+ ProtocolInfo: ProtocolInfo;
5491
5631
  DeviceReboot: DeviceReboot;
5492
- DevFirmwareImageInfo: DevFirmwareImageInfo;
5493
- DevHardwareInfo: DevHardwareInfo;
5494
- DevMainMcuInfo: DevMainMcuInfo;
5495
- DevBluetoothInfo: DevBluetoothInfo;
5496
- DevSEInfo: DevSEInfo;
5497
- DevInfoTargets: DevInfoTargets;
5498
- DevInfoTypes: DevInfoTypes;
5499
- DevStatus: DevStatus;
5500
- DevGetDeviceInfo: DevGetDeviceInfo;
5501
- DeviceGetDeviceInfo: DeviceGetDeviceInfo;
5502
- DevFirmwareTarget: DevFirmwareTarget;
5632
+ DeviceSettings: DeviceSettings;
5633
+ DeviceSettingsGet: DeviceSettingsGet;
5634
+ DeviceSettingsSet: DeviceSettingsSet;
5635
+ DeviceCertificate: DeviceCertificate;
5636
+ DeviceCertificateWrite: DeviceCertificateWrite;
5637
+ DeviceCertificateRead: DeviceCertificateRead;
5638
+ DeviceCertificateSignature: DeviceCertificateSignature;
5639
+ DeviceCertificateSign: DeviceCertificateSign;
5503
5640
  DeviceFirmwareTarget: DeviceFirmwareTarget;
5504
- DevFirmwareUpdate: DevFirmwareUpdate;
5505
- DeviceFirmwareUpdate: DeviceFirmwareUpdate;
5506
- DevFirmwareInstallProgress: DevFirmwareInstallProgress;
5507
- DeviceFirmwareInstallProgress: DeviceFirmwareInstallProgress;
5508
- DevFirmwareUpdateStatusEntry: DevFirmwareUpdateStatusEntry;
5509
- DeviceFirmwareUpdateStatusEntry: DeviceFirmwareUpdateStatusEntry;
5510
- DevGetFirmwareUpdateStatus: DevGetFirmwareUpdateStatus;
5511
- DeviceGetFirmwareUpdateStatus: DeviceGetFirmwareUpdateStatus;
5512
- DevFirmwareUpdateStatus: DevFirmwareUpdateStatus;
5641
+ DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
5642
+ DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
5643
+ DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
5644
+ DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
5513
5645
  DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
5514
- FactoryDeviceInfoSettings: FactoryDeviceInfoSettings;
5515
- FactoryGetDeviceInfo: FactoryGetDeviceInfo;
5516
- FactoryDeviceInfo: FactoryDeviceInfo;
5517
- FilesystemFixPermission: FilesystemFixPermission;
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;
5518
5669
  FilesystemPathInfo: FilesystemPathInfo;
5519
5670
  FilesystemPathInfoQuery: FilesystemPathInfoQuery;
5520
5671
  FilesystemFile: FilesystemFile;
@@ -5526,11 +5677,7 @@ export type MessageType = {
5526
5677
  FilesystemDirMake: FilesystemDirMake;
5527
5678
  FilesystemDirRemove: FilesystemDirRemove;
5528
5679
  FilesystemFormat: FilesystemFormat;
5529
- GetOnboardingStatus: GetOnboardingStatus;
5530
- NewDevice: NewDevice;
5531
- Restore: Restore;
5532
- Setup: Setup;
5533
- OnboardingStatus: OnboardingStatus;
5680
+ PortfolioUpdate: PortfolioUpdate;
5534
5681
  };
5535
5682
 
5536
5683
  export type MessageKey = keyof MessageType;