@onekeyfe/hd-transport 1.2.0-alpha.1 → 1.2.0-alpha.11
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.
- package/README.md +1 -1
- package/__tests__/messages.test.js +76 -0
- package/__tests__/protocol-v2-link-manager.test.js +326 -0
- package/__tests__/protocol-v2-usb-transport-base.test.js +296 -0
- package/__tests__/protocol-v2.test.js +249 -81
- package/dist/constants.d.ts +4 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.d.ts +547 -235
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +442 -72
- package/dist/protocols/index.d.ts +2 -0
- package/dist/protocols/index.d.ts.map +1 -1
- package/dist/protocols/v2/constants.d.ts +1 -0
- package/dist/protocols/v2/constants.d.ts.map +1 -1
- package/dist/protocols/v2/decode.d.ts +1 -0
- package/dist/protocols/v2/decode.d.ts.map +1 -1
- package/dist/protocols/v2/link-manager.d.ts +35 -0
- package/dist/protocols/v2/link-manager.d.ts.map +1 -0
- package/dist/protocols/v2/sequence-cursor.d.ts +5 -0
- package/dist/protocols/v2/sequence-cursor.d.ts.map +1 -0
- package/dist/protocols/v2/session.d.ts +16 -4
- package/dist/protocols/v2/session.d.ts.map +1 -1
- package/dist/protocols/v2/usb-transport-base.d.ts +31 -0
- package/dist/protocols/v2/usb-transport-base.d.ts.map +1 -0
- package/dist/serialization/protobuf/messages.d.ts.map +1 -1
- package/dist/types/messages.d.ts +329 -156
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/transport.d.ts +1 -1
- package/dist/types/transport.d.ts.map +1 -1
- package/messages-protocol-v2.json +760 -1110
- package/package.json +2 -2
- package/scripts/protobuf-build.sh +60 -142
- package/src/constants.ts +8 -2
- package/src/index.ts +8 -0
- package/src/protocols/index.ts +4 -1
- package/src/protocols/v2/constants.ts +1 -0
- package/src/protocols/v2/decode.ts +36 -17
- package/src/protocols/v2/link-manager.ts +160 -0
- package/src/protocols/v2/sequence-cursor.ts +10 -0
- package/src/protocols/v2/session.ts +80 -45
- package/src/protocols/v2/usb-transport-base.ts +194 -0
- package/src/serialization/protobuf/messages.ts +6 -1
- package/src/types/messages.ts +401 -186
- package/src/types/transport.ts +1 -1
package/src/types/messages.ts
CHANGED
|
@@ -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
|
-
//
|
|
4456
|
-
export type
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
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,211 @@ export type ViewVerifyPage = {
|
|
|
4580
4627
|
path: string;
|
|
4581
4628
|
};
|
|
4582
4629
|
|
|
4583
|
-
//
|
|
4584
|
-
export type
|
|
4630
|
+
// ProtocolInfoRequest
|
|
4631
|
+
export type ProtocolInfoRequest = {};
|
|
4585
4632
|
|
|
4586
|
-
//
|
|
4587
|
-
export type
|
|
4588
|
-
|
|
4589
|
-
|
|
4633
|
+
// ProtocolInfo
|
|
4634
|
+
export type ProtocolInfo = {
|
|
4635
|
+
version: number;
|
|
4636
|
+
supported_messages: number[];
|
|
4637
|
+
protobuf_definition?: string;
|
|
4638
|
+
};
|
|
4639
|
+
|
|
4640
|
+
export enum DeviceErrorCode {
|
|
4641
|
+
DeviceError_None = 0,
|
|
4642
|
+
DeviceError_Busy = 1,
|
|
4643
|
+
DeviceError_NotInitialized = 2,
|
|
4644
|
+
DeviceError_ActionCancelled = 3,
|
|
4645
|
+
DeviceError_PinAlreadyUsed = 4,
|
|
4646
|
+
DeviceError_PersistFailed = 5,
|
|
4647
|
+
DeviceError_SeError = 6,
|
|
4648
|
+
DeviceError_InvalidLanguage = 7,
|
|
4649
|
+
DeviceError_WallpaperNotUsable = 8,
|
|
4650
|
+
DeviceError_DeviceLocked = 9,
|
|
4651
|
+
}
|
|
4590
4652
|
|
|
4591
|
-
export enum
|
|
4653
|
+
export enum DeviceRebootType {
|
|
4592
4654
|
Normal = 0,
|
|
4593
|
-
|
|
4655
|
+
Romloader = 1,
|
|
4594
4656
|
Bootloader = 2,
|
|
4595
4657
|
}
|
|
4596
4658
|
|
|
4597
|
-
//
|
|
4598
|
-
export type
|
|
4599
|
-
reboot_type:
|
|
4659
|
+
// DeviceReboot
|
|
4660
|
+
export type DeviceReboot = {
|
|
4661
|
+
reboot_type: DeviceRebootType;
|
|
4662
|
+
};
|
|
4663
|
+
|
|
4664
|
+
// DeviceSettings
|
|
4665
|
+
export type DeviceSettings = {
|
|
4666
|
+
label?: string;
|
|
4667
|
+
bt_enable?: boolean;
|
|
4668
|
+
language?: string;
|
|
4669
|
+
wallpaper_path?: string;
|
|
4670
|
+
passphrase_enable?: boolean;
|
|
4671
|
+
brightness?: number;
|
|
4672
|
+
autolock_delay_ms?: number;
|
|
4673
|
+
autoshutdown_delay_ms?: number;
|
|
4674
|
+
animation_enable?: boolean;
|
|
4675
|
+
tap_to_wake?: boolean;
|
|
4676
|
+
haptic_feedback?: boolean;
|
|
4677
|
+
device_name_display_enabled?: boolean;
|
|
4678
|
+
airgap_mode?: boolean;
|
|
4679
|
+
fido_enabled?: boolean;
|
|
4680
|
+
experimental_features?: boolean;
|
|
4681
|
+
usb_lock_enable?: boolean;
|
|
4682
|
+
random_keypad?: boolean;
|
|
4683
|
+
};
|
|
4684
|
+
|
|
4685
|
+
// DeviceSettingsGet
|
|
4686
|
+
export type DeviceSettingsGet = {};
|
|
4687
|
+
|
|
4688
|
+
// DeviceSettingsSet
|
|
4689
|
+
export type DeviceSettingsSet = {
|
|
4690
|
+
settings: DeviceSettings;
|
|
4691
|
+
};
|
|
4692
|
+
|
|
4693
|
+
export enum DeviceSettingsPage {
|
|
4694
|
+
DeviceReset = 0,
|
|
4695
|
+
DevicePinChange = 1,
|
|
4696
|
+
DevicePassphrase = 2,
|
|
4697
|
+
DeviceAirgap = 3,
|
|
4698
|
+
}
|
|
4699
|
+
|
|
4700
|
+
// DeviceSettingsPageShow
|
|
4701
|
+
export type DeviceSettingsPageShow = {
|
|
4702
|
+
page: DeviceSettingsPage;
|
|
4703
|
+
field_name?: string;
|
|
4704
|
+
};
|
|
4705
|
+
|
|
4706
|
+
// DeviceCertificate
|
|
4707
|
+
export type DeviceCertificate = {
|
|
4708
|
+
cert_and_pubkey: string;
|
|
4709
|
+
private_key?: string;
|
|
4710
|
+
};
|
|
4711
|
+
|
|
4712
|
+
// DeviceCertificateWrite
|
|
4713
|
+
export type DeviceCertificateWrite = {
|
|
4714
|
+
cert: DeviceCertificate;
|
|
4715
|
+
};
|
|
4716
|
+
|
|
4717
|
+
// DeviceCertificateRead
|
|
4718
|
+
export type DeviceCertificateRead = {};
|
|
4719
|
+
|
|
4720
|
+
// DeviceCertificateSignature
|
|
4721
|
+
export type DeviceCertificateSignature = {
|
|
4722
|
+
data: string;
|
|
4723
|
+
};
|
|
4724
|
+
|
|
4725
|
+
// DeviceCertificateSign
|
|
4726
|
+
export type DeviceCertificateSign = {
|
|
4727
|
+
data: string;
|
|
4728
|
+
};
|
|
4729
|
+
|
|
4730
|
+
export enum DeviceFirmwareTargetType {
|
|
4731
|
+
FW_MGMT_TARGET_INVALID = 0,
|
|
4732
|
+
FW_MGMT_TARGET_CRATE = 1,
|
|
4733
|
+
FW_MGMT_TARGET_ROMLOADER = 2,
|
|
4734
|
+
FW_MGMT_TARGET_BOOTLOADER = 3,
|
|
4735
|
+
FW_MGMT_TARGET_APPLICATION_P1 = 4,
|
|
4736
|
+
FW_MGMT_TARGET_APPLICATION_P2 = 5,
|
|
4737
|
+
FW_MGMT_TARGET_COPROCESSOR = 6,
|
|
4738
|
+
FW_MGMT_TARGET_SE01 = 7,
|
|
4739
|
+
FW_MGMT_TARGET_SE02 = 8,
|
|
4740
|
+
FW_MGMT_TARGET_SE03 = 9,
|
|
4741
|
+
FW_MGMT_TARGET_SE04 = 10,
|
|
4742
|
+
}
|
|
4743
|
+
|
|
4744
|
+
export enum DeviceFirmwareUpdateTaskStatus {
|
|
4745
|
+
FW_MGMT_UPDATER_TASK_STATUS_PENDING = 0,
|
|
4746
|
+
FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS = 1,
|
|
4747
|
+
FW_MGMT_UPDATER_TASK_STATUS_FINISHED = 2,
|
|
4748
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND = 3,
|
|
4749
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ = 4,
|
|
4750
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE = 5,
|
|
4751
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY = 6,
|
|
4752
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL = 7,
|
|
4753
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT = 8,
|
|
4754
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY = 9,
|
|
4755
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS = 10,
|
|
4756
|
+
}
|
|
4757
|
+
|
|
4758
|
+
// DeviceFirmwareTarget
|
|
4759
|
+
export type DeviceFirmwareTarget = {
|
|
4760
|
+
target_id: DeviceFirmwareTargetType;
|
|
4761
|
+
path: string;
|
|
4762
|
+
};
|
|
4763
|
+
|
|
4764
|
+
// DeviceFirmwareUpdateRequest
|
|
4765
|
+
export type DeviceFirmwareUpdateRequest = {
|
|
4766
|
+
targets: DeviceFirmwareTarget[];
|
|
4767
|
+
};
|
|
4768
|
+
|
|
4769
|
+
// DeviceFirmwareUpdateRecord
|
|
4770
|
+
export type DeviceFirmwareUpdateRecord = {
|
|
4771
|
+
target_id: DeviceFirmwareTargetType;
|
|
4772
|
+
status?: DeviceFirmwareUpdateTaskStatus;
|
|
4773
|
+
payload_version?: number;
|
|
4774
|
+
path?: string;
|
|
4775
|
+
};
|
|
4776
|
+
|
|
4777
|
+
// DeviceFirmwareUpdateRecordFields
|
|
4778
|
+
export type DeviceFirmwareUpdateRecordFields = {
|
|
4779
|
+
status?: boolean;
|
|
4780
|
+
payload_version?: boolean;
|
|
4781
|
+
path?: boolean;
|
|
4782
|
+
};
|
|
4783
|
+
|
|
4784
|
+
// DeviceFirmwareUpdateStatusGet
|
|
4785
|
+
export type DeviceFirmwareUpdateStatusGet = {
|
|
4786
|
+
fields?: DeviceFirmwareUpdateRecordFields;
|
|
4787
|
+
};
|
|
4788
|
+
|
|
4789
|
+
// DeviceFirmwareUpdateStatus
|
|
4790
|
+
export type DeviceFirmwareUpdateStatus = {
|
|
4791
|
+
records: DeviceFirmwareUpdateRecord[];
|
|
4792
|
+
};
|
|
4793
|
+
|
|
4794
|
+
export enum DeviceFactoryAck {
|
|
4795
|
+
FACTORY_ACK_SUCCESS = 0,
|
|
4796
|
+
FACTORY_ACK_FAIL = 1,
|
|
4797
|
+
}
|
|
4798
|
+
|
|
4799
|
+
// DeviceFactoryInfoManufactureTime
|
|
4800
|
+
export type DeviceFactoryInfoManufactureTime = {
|
|
4801
|
+
year: number;
|
|
4802
|
+
month: number;
|
|
4803
|
+
day: number;
|
|
4804
|
+
hour: number;
|
|
4805
|
+
minute: number;
|
|
4806
|
+
second: number;
|
|
4807
|
+
};
|
|
4808
|
+
|
|
4809
|
+
// DeviceFactoryInfo
|
|
4810
|
+
export type DeviceFactoryInfo = {
|
|
4811
|
+
version?: number;
|
|
4812
|
+
serial_number?: string;
|
|
4813
|
+
burn_in_completed?: boolean;
|
|
4814
|
+
factory_test_completed?: boolean;
|
|
4815
|
+
manufacture_time?: DeviceFactoryInfoManufactureTime;
|
|
4816
|
+
};
|
|
4817
|
+
|
|
4818
|
+
// DeviceFactoryInfoSet
|
|
4819
|
+
export type DeviceFactoryInfoSet = {
|
|
4820
|
+
info: DeviceFactoryInfo;
|
|
4821
|
+
};
|
|
4822
|
+
|
|
4823
|
+
// DeviceFactoryInfoGet
|
|
4824
|
+
export type DeviceFactoryInfoGet = {};
|
|
4825
|
+
|
|
4826
|
+
// DeviceFactoryPermanentLock
|
|
4827
|
+
export type DeviceFactoryPermanentLock = {
|
|
4828
|
+
check_a: string;
|
|
4829
|
+
check_b: string;
|
|
4830
|
+
};
|
|
4831
|
+
|
|
4832
|
+
// DeviceFactoryTest
|
|
4833
|
+
export type DeviceFactoryTest = {
|
|
4834
|
+
burn_in_test: boolean;
|
|
4600
4835
|
};
|
|
4601
4836
|
|
|
4602
4837
|
export enum DeviceType {
|
|
@@ -4606,63 +4841,65 @@ export enum DeviceType {
|
|
|
4606
4841
|
TOUCH = 3,
|
|
4607
4842
|
PRO = 5,
|
|
4608
4843
|
CLASSIC1S_PURE = 6,
|
|
4844
|
+
PRO2 = 7,
|
|
4845
|
+
NEO = 8,
|
|
4609
4846
|
}
|
|
4610
4847
|
|
|
4611
|
-
export enum
|
|
4848
|
+
export enum DeviceSeType {
|
|
4612
4849
|
THD89 = 0,
|
|
4613
4850
|
SE608A = 1,
|
|
4614
4851
|
}
|
|
4615
4852
|
|
|
4616
|
-
export enum
|
|
4853
|
+
export enum DeviceSEState {
|
|
4617
4854
|
BOOT = 0,
|
|
4618
4855
|
APP_FACTORY = 51,
|
|
4619
4856
|
APP = 85,
|
|
4620
4857
|
}
|
|
4621
4858
|
|
|
4622
|
-
//
|
|
4623
|
-
export type
|
|
4859
|
+
// DeviceFirmwareImageInfo
|
|
4860
|
+
export type DeviceFirmwareImageInfo = {
|
|
4624
4861
|
version?: string;
|
|
4625
4862
|
build_id?: string;
|
|
4626
4863
|
hash?: string;
|
|
4627
4864
|
};
|
|
4628
4865
|
|
|
4629
|
-
//
|
|
4630
|
-
export type
|
|
4631
|
-
|
|
4866
|
+
// DeviceHardwareInfo
|
|
4867
|
+
export type DeviceHardwareInfo = {
|
|
4868
|
+
Device_type?: DeviceType;
|
|
4632
4869
|
serial_no?: string;
|
|
4633
|
-
device_id?: string;
|
|
4634
4870
|
hardware_version?: string;
|
|
4635
4871
|
hardware_version_raw_adc?: number;
|
|
4636
4872
|
};
|
|
4637
4873
|
|
|
4638
|
-
//
|
|
4639
|
-
export type
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4874
|
+
// DeviceMainMcuInfo
|
|
4875
|
+
export type DeviceMainMcuInfo = {
|
|
4876
|
+
romloader?: DeviceFirmwareImageInfo;
|
|
4877
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
4878
|
+
application?: DeviceFirmwareImageInfo;
|
|
4879
|
+
application_data?: DeviceFirmwareImageInfo;
|
|
4643
4880
|
};
|
|
4644
4881
|
|
|
4645
|
-
//
|
|
4646
|
-
export type
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4882
|
+
// DeviceCoprocessorInfo
|
|
4883
|
+
export type DeviceCoprocessorInfo = {
|
|
4884
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
4885
|
+
application?: DeviceFirmwareImageInfo;
|
|
4886
|
+
bt_adv_name?: string;
|
|
4887
|
+
bt_mac?: string;
|
|
4651
4888
|
};
|
|
4652
4889
|
|
|
4653
|
-
//
|
|
4654
|
-
export type
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
type?:
|
|
4658
|
-
state?:
|
|
4890
|
+
// DeviceSEInfo
|
|
4891
|
+
export type DeviceSEInfo = {
|
|
4892
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
4893
|
+
application?: DeviceFirmwareImageInfo;
|
|
4894
|
+
type?: DeviceSeType;
|
|
4895
|
+
state?: DeviceSEState;
|
|
4659
4896
|
};
|
|
4660
4897
|
|
|
4661
|
-
//
|
|
4662
|
-
export type
|
|
4898
|
+
// DeviceInfoTargets
|
|
4899
|
+
export type DeviceInfoTargets = {
|
|
4663
4900
|
hw?: boolean;
|
|
4664
4901
|
fw?: boolean;
|
|
4665
|
-
|
|
4902
|
+
coprocessor?: boolean;
|
|
4666
4903
|
se1?: boolean;
|
|
4667
4904
|
se2?: boolean;
|
|
4668
4905
|
se3?: boolean;
|
|
@@ -4670,108 +4907,96 @@ export type DevInfoTargets = {
|
|
|
4670
4907
|
status?: boolean;
|
|
4671
4908
|
};
|
|
4672
4909
|
|
|
4673
|
-
//
|
|
4674
|
-
export type
|
|
4910
|
+
// DeviceInfoTypes
|
|
4911
|
+
export type DeviceInfoTypes = {
|
|
4675
4912
|
version?: boolean;
|
|
4676
4913
|
build_id?: boolean;
|
|
4677
4914
|
hash?: boolean;
|
|
4678
4915
|
specific?: boolean;
|
|
4679
4916
|
};
|
|
4680
4917
|
|
|
4681
|
-
//
|
|
4682
|
-
export type
|
|
4683
|
-
|
|
4684
|
-
|
|
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;
|
|
4918
|
+
// DeviceInfoGet
|
|
4919
|
+
export type DeviceInfoGet = {
|
|
4920
|
+
targets?: DeviceInfoTargets;
|
|
4921
|
+
types?: DeviceInfoTypes;
|
|
4695
4922
|
};
|
|
4696
4923
|
|
|
4697
4924
|
// ProtocolV2DeviceInfo
|
|
4698
4925
|
export type ProtocolV2DeviceInfo = {
|
|
4699
4926
|
protocol_version: number;
|
|
4700
|
-
hw?:
|
|
4701
|
-
fw?:
|
|
4702
|
-
|
|
4703
|
-
se1?:
|
|
4704
|
-
se2?:
|
|
4705
|
-
se3?:
|
|
4706
|
-
se4?:
|
|
4707
|
-
status?:
|
|
4708
|
-
};
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
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;
|
|
4927
|
+
hw?: DeviceHardwareInfo;
|
|
4928
|
+
fw?: DeviceMainMcuInfo;
|
|
4929
|
+
coprocessor?: DeviceCoprocessorInfo;
|
|
4930
|
+
se1?: DeviceSEInfo;
|
|
4931
|
+
se2?: DeviceSEInfo;
|
|
4932
|
+
se3?: DeviceSEInfo;
|
|
4933
|
+
se4?: DeviceSEInfo;
|
|
4934
|
+
status?: DeviceStatus;
|
|
4935
|
+
};
|
|
4936
|
+
|
|
4937
|
+
// DeviceSessionGet
|
|
4938
|
+
export type DeviceSessionGet = {
|
|
4939
|
+
session_id?: string;
|
|
4737
4940
|
};
|
|
4738
4941
|
|
|
4739
|
-
//
|
|
4740
|
-
export type
|
|
4741
|
-
|
|
4742
|
-
|
|
4942
|
+
// DeviceSession
|
|
4943
|
+
export type DeviceSession = {
|
|
4944
|
+
session_id?: string;
|
|
4945
|
+
btc_test_address?: string;
|
|
4743
4946
|
};
|
|
4744
4947
|
|
|
4745
|
-
//
|
|
4746
|
-
export type
|
|
4948
|
+
// DeviceSessionAskPin
|
|
4949
|
+
export type DeviceSessionAskPin = {};
|
|
4747
4950
|
|
|
4748
|
-
//
|
|
4749
|
-
export type
|
|
4750
|
-
|
|
4951
|
+
// DeviceSessionPinResult
|
|
4952
|
+
export type DeviceSessionPinResult = {
|
|
4953
|
+
unlocked?: boolean;
|
|
4954
|
+
unlocked_attach_pin?: boolean;
|
|
4955
|
+
passphrase_protection?: boolean;
|
|
4751
4956
|
};
|
|
4752
4957
|
|
|
4753
|
-
//
|
|
4754
|
-
export type
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4958
|
+
// DeviceStatus
|
|
4959
|
+
export type DeviceStatus = {
|
|
4960
|
+
device_id?: string;
|
|
4961
|
+
unlocked?: boolean;
|
|
4962
|
+
init_states?: boolean;
|
|
4963
|
+
backup_required?: boolean;
|
|
4964
|
+
passphrase_enabled?: boolean;
|
|
4965
|
+
attach_to_pin_enabled?: boolean;
|
|
4966
|
+
unlocked_by_attach_to_pin?: boolean;
|
|
4967
|
+
};
|
|
4968
|
+
|
|
4969
|
+
// DeviceStatusGet
|
|
4970
|
+
export type DeviceStatusGet = {};
|
|
4971
|
+
|
|
4972
|
+
export enum DevOnboardingStage {
|
|
4973
|
+
DEV_ONBOARDING_STAGE_UNKNOWN = 0,
|
|
4974
|
+
DEV_ONBOARDING_STAGE_SAFETY_CHECK = 1,
|
|
4975
|
+
DEV_ONBOARDING_STAGE_PERSONALIZATION = 2,
|
|
4976
|
+
DEV_ONBOARDING_STAGE_SELECT_SETUP_METHOD = 3,
|
|
4977
|
+
DEV_ONBOARDING_STAGE_NEW_DEVICE = 4,
|
|
4978
|
+
DEV_ONBOARDING_STAGE_SELECT_RESTORE_METHOD = 5,
|
|
4979
|
+
DEV_ONBOARDING_STAGE_RESTORE_MNEMONIC = 6,
|
|
4980
|
+
DEV_ONBOARDING_STAGE_RESTORE_SEEDCARD = 7,
|
|
4981
|
+
DEV_ONBOARDING_STAGE_WALLET_READY = 8,
|
|
4982
|
+
DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP_PROMPT = 9,
|
|
4983
|
+
DEV_ONBOARDING_STAGE_SELECT_SEEDCARD_BACKUP_METHOD = 10,
|
|
4984
|
+
DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP = 11,
|
|
4985
|
+
DEV_ONBOARDING_STAGE_DONE = 12,
|
|
4986
|
+
}
|
|
4759
4987
|
|
|
4760
|
-
//
|
|
4761
|
-
export type
|
|
4988
|
+
// DevGetOnboardingStatus
|
|
4989
|
+
export type DevGetOnboardingStatus = {};
|
|
4762
4990
|
|
|
4763
|
-
//
|
|
4764
|
-
export type
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
nft_voucher?: string;
|
|
4769
|
-
cpu_info?: string;
|
|
4770
|
-
pre_firmware?: string;
|
|
4991
|
+
// DevOnboardingStatus
|
|
4992
|
+
export type DevOnboardingStatus = {
|
|
4993
|
+
stage: DevOnboardingStage;
|
|
4994
|
+
status_code?: number;
|
|
4995
|
+
detail_code?: number;
|
|
4771
4996
|
};
|
|
4772
4997
|
|
|
4773
|
-
//
|
|
4774
|
-
export type
|
|
4998
|
+
// FilesystemPermissionFix
|
|
4999
|
+
export type FilesystemPermissionFix = {};
|
|
4775
5000
|
|
|
4776
5001
|
// FilesystemPathInfo
|
|
4777
5002
|
export type FilesystemPathInfo = {
|
|
@@ -4849,40 +5074,13 @@ export type FilesystemDirRemove = {
|
|
|
4849
5074
|
};
|
|
4850
5075
|
|
|
4851
5076
|
// FilesystemFormat
|
|
4852
|
-
export type FilesystemFormat = {
|
|
4853
|
-
|
|
4854
|
-
|
|
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;
|
|
5077
|
+
export type FilesystemFormat = {
|
|
5078
|
+
data: boolean;
|
|
5079
|
+
user: boolean;
|
|
4872
5080
|
};
|
|
4873
5081
|
|
|
4874
|
-
|
|
4875
|
-
|
|
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
|
-
};
|
|
5082
|
+
// PortfolioUpdate
|
|
5083
|
+
export type PortfolioUpdate = {};
|
|
4886
5084
|
|
|
4887
5085
|
// custom connect definitions
|
|
4888
5086
|
export type MessageType = {
|
|
@@ -5448,8 +5646,9 @@ export type MessageType = {
|
|
|
5448
5646
|
CoinPurchaseMemo: CoinPurchaseMemo;
|
|
5449
5647
|
PaymentRequestMemo: PaymentRequestMemo;
|
|
5450
5648
|
TxAckPaymentRequest: TxAckPaymentRequest;
|
|
5451
|
-
|
|
5649
|
+
EthereumSignTypedDataQR: EthereumSignTypedDataQR;
|
|
5452
5650
|
InternalMyAddressRequest: InternalMyAddressRequest;
|
|
5651
|
+
StartSession: StartSession;
|
|
5453
5652
|
SetBusy: SetBusy;
|
|
5454
5653
|
GetFirmwareHash: GetFirmwareHash;
|
|
5455
5654
|
FirmwareHash: FirmwareHash;
|
|
@@ -5464,30 +5663,50 @@ export type MessageType = {
|
|
|
5464
5663
|
ViewAmount: ViewAmount;
|
|
5465
5664
|
ViewDetail: ViewDetail;
|
|
5466
5665
|
ViewTip: ViewTip;
|
|
5666
|
+
ViewRawData: ViewRawData;
|
|
5467
5667
|
ViewSignPage: ViewSignPage;
|
|
5468
5668
|
ViewVerifyPage: ViewVerifyPage;
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5669
|
+
ProtocolInfoRequest: ProtocolInfoRequest;
|
|
5670
|
+
ProtocolInfo: ProtocolInfo;
|
|
5671
|
+
DeviceReboot: DeviceReboot;
|
|
5672
|
+
DeviceSettings: DeviceSettings;
|
|
5673
|
+
DeviceSettingsGet: DeviceSettingsGet;
|
|
5674
|
+
DeviceSettingsSet: DeviceSettingsSet;
|
|
5675
|
+
DeviceSettingsPageShow: DeviceSettingsPageShow;
|
|
5676
|
+
DeviceCertificate: DeviceCertificate;
|
|
5677
|
+
DeviceCertificateWrite: DeviceCertificateWrite;
|
|
5678
|
+
DeviceCertificateRead: DeviceCertificateRead;
|
|
5679
|
+
DeviceCertificateSignature: DeviceCertificateSignature;
|
|
5680
|
+
DeviceCertificateSign: DeviceCertificateSign;
|
|
5681
|
+
DeviceFirmwareTarget: DeviceFirmwareTarget;
|
|
5682
|
+
DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
|
|
5683
|
+
DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
|
|
5684
|
+
DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
|
|
5685
|
+
DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
|
|
5686
|
+
DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
|
|
5687
|
+
DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
|
|
5688
|
+
DeviceFactoryInfo: DeviceFactoryInfo;
|
|
5689
|
+
DeviceFactoryInfoSet: DeviceFactoryInfoSet;
|
|
5690
|
+
DeviceFactoryInfoGet: DeviceFactoryInfoGet;
|
|
5691
|
+
DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
|
|
5692
|
+
DeviceFactoryTest: DeviceFactoryTest;
|
|
5693
|
+
DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
|
|
5694
|
+
DeviceHardwareInfo: DeviceHardwareInfo;
|
|
5695
|
+
DeviceMainMcuInfo: DeviceMainMcuInfo;
|
|
5696
|
+
DeviceCoprocessorInfo: DeviceCoprocessorInfo;
|
|
5697
|
+
DeviceSEInfo: DeviceSEInfo;
|
|
5698
|
+
DeviceInfoTargets: DeviceInfoTargets;
|
|
5699
|
+
DeviceInfoTypes: DeviceInfoTypes;
|
|
5700
|
+
DeviceInfoGet: DeviceInfoGet;
|
|
5701
|
+
DeviceSessionGet: DeviceSessionGet;
|
|
5702
|
+
DeviceSession: DeviceSession;
|
|
5703
|
+
DeviceSessionAskPin: DeviceSessionAskPin;
|
|
5704
|
+
DeviceSessionPinResult: DeviceSessionPinResult;
|
|
5705
|
+
DeviceStatus: DeviceStatus;
|
|
5706
|
+
DeviceStatusGet: DeviceStatusGet;
|
|
5707
|
+
DevGetOnboardingStatus: DevGetOnboardingStatus;
|
|
5708
|
+
DevOnboardingStatus: DevOnboardingStatus;
|
|
5709
|
+
FilesystemPermissionFix: FilesystemPermissionFix;
|
|
5491
5710
|
FilesystemPathInfo: FilesystemPathInfo;
|
|
5492
5711
|
FilesystemPathInfoQuery: FilesystemPathInfoQuery;
|
|
5493
5712
|
FilesystemFile: FilesystemFile;
|
|
@@ -5499,11 +5718,7 @@ export type MessageType = {
|
|
|
5499
5718
|
FilesystemDirMake: FilesystemDirMake;
|
|
5500
5719
|
FilesystemDirRemove: FilesystemDirRemove;
|
|
5501
5720
|
FilesystemFormat: FilesystemFormat;
|
|
5502
|
-
|
|
5503
|
-
NewDevice: NewDevice;
|
|
5504
|
-
Restore: Restore;
|
|
5505
|
-
Setup: Setup;
|
|
5506
|
-
OnboardingStatus: OnboardingStatus;
|
|
5721
|
+
PortfolioUpdate: PortfolioUpdate;
|
|
5507
5722
|
};
|
|
5508
5723
|
|
|
5509
5724
|
export type MessageKey = keyof MessageType;
|