@onekeyfe/hd-transport 1.2.0-alpha.2 → 1.2.0-alpha.4
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 +8 -0
- package/__tests__/protocol-v2.test.js +137 -77
- package/dist/constants.d.ts +2 -2
- package/dist/index.d.ts +391 -323
- package/dist/index.js +77 -68
- package/dist/protocols/index.d.ts.map +1 -1
- package/dist/protocols/v2/session.d.ts +1 -1
- package/dist/protocols/v2/session.d.ts.map +1 -1
- package/dist/serialization/protobuf/messages.d.ts.map +1 -1
- package/dist/types/messages.d.ts +280 -222
- package/dist/types/messages.d.ts.map +1 -1
- package/messages-protocol-v2.json +1224 -1804
- package/package.json +2 -2
- package/scripts/protobuf-build.sh +51 -143
- package/src/constants.ts +2 -2
- package/src/protocols/index.ts +1 -0
- package/src/protocols/v2/session.ts +4 -5
- package/src/serialization/protobuf/messages.ts +6 -1
- package/src/types/messages.ts +351 -280
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,6 +4478,21 @@ export type TxAckPaymentRequest = {
|
|
|
4452
4478
|
signature: string;
|
|
4453
4479
|
};
|
|
4454
4480
|
|
|
4481
|
+
// InternalMyAddressRequest
|
|
4482
|
+
export type InternalMyAddressRequest = {
|
|
4483
|
+
coin_type: number;
|
|
4484
|
+
chain_id: number;
|
|
4485
|
+
account_index: number;
|
|
4486
|
+
derive_type: number;
|
|
4487
|
+
};
|
|
4488
|
+
|
|
4489
|
+
// StartSession
|
|
4490
|
+
export type StartSession = {
|
|
4491
|
+
session_id?: string;
|
|
4492
|
+
_skip_passphrase?: boolean;
|
|
4493
|
+
derive_cardano?: boolean;
|
|
4494
|
+
};
|
|
4495
|
+
|
|
4455
4496
|
// SetBusy
|
|
4456
4497
|
export type SetBusy = {
|
|
4457
4498
|
expiry_ms?: number;
|
|
@@ -4480,6 +4521,28 @@ export type WriteSEPrivateKey = {
|
|
|
4480
4521
|
private_key: string;
|
|
4481
4522
|
};
|
|
4482
4523
|
|
|
4524
|
+
export enum WallpaperTarget {
|
|
4525
|
+
Home = 0,
|
|
4526
|
+
Lock = 1,
|
|
4527
|
+
}
|
|
4528
|
+
|
|
4529
|
+
// SetWallpaper
|
|
4530
|
+
export type SetWallpaper = {
|
|
4531
|
+
target: WallpaperTarget;
|
|
4532
|
+
path: string;
|
|
4533
|
+
};
|
|
4534
|
+
|
|
4535
|
+
// GetWallpaper
|
|
4536
|
+
export type GetWallpaper = {
|
|
4537
|
+
target: WallpaperTarget;
|
|
4538
|
+
};
|
|
4539
|
+
|
|
4540
|
+
// Wallpaper
|
|
4541
|
+
export type Wallpaper = {
|
|
4542
|
+
target: WallpaperTarget;
|
|
4543
|
+
path: string;
|
|
4544
|
+
};
|
|
4545
|
+
|
|
4483
4546
|
// UnlockPath
|
|
4484
4547
|
export type UnlockPath = {
|
|
4485
4548
|
address_n: number[];
|
|
@@ -4498,62 +4561,58 @@ export enum MoneroNetworkType {
|
|
|
4498
4561
|
FAKECHAIN = 3,
|
|
4499
4562
|
}
|
|
4500
4563
|
|
|
4501
|
-
//
|
|
4502
|
-
export type
|
|
4564
|
+
// ViewAmount
|
|
4565
|
+
export type ViewAmount = {
|
|
4566
|
+
is_unlimited: boolean;
|
|
4503
4567
|
num: string;
|
|
4504
|
-
decimals: number;
|
|
4505
|
-
symbol: string;
|
|
4506
|
-
};
|
|
4507
|
-
|
|
4508
|
-
// TxDetailsAddress
|
|
4509
|
-
export type TxDetailsAddress = {
|
|
4510
|
-
key: number;
|
|
4511
|
-
address: string;
|
|
4512
|
-
owner?: string;
|
|
4513
|
-
icon?: string;
|
|
4514
|
-
};
|
|
4515
|
-
|
|
4516
|
-
// TxDetailsNetwork
|
|
4517
|
-
export type TxDetailsNetwork = {
|
|
4518
|
-
coin_type: number;
|
|
4519
|
-
chain_id?: number;
|
|
4520
4568
|
};
|
|
4521
4569
|
|
|
4522
|
-
//
|
|
4523
|
-
export type
|
|
4570
|
+
// ViewDetail
|
|
4571
|
+
export type ViewDetail = {
|
|
4524
4572
|
key: number;
|
|
4525
4573
|
value: string;
|
|
4526
4574
|
is_overview: boolean;
|
|
4575
|
+
has_icon: boolean;
|
|
4527
4576
|
};
|
|
4528
4577
|
|
|
4529
|
-
export enum
|
|
4530
|
-
|
|
4531
|
-
|
|
4578
|
+
export enum ViewTipType {
|
|
4579
|
+
Default = 0,
|
|
4580
|
+
Highlight = 1,
|
|
4581
|
+
Recommend = 2,
|
|
4582
|
+
Warning = 3,
|
|
4583
|
+
Danger = 4,
|
|
4532
4584
|
}
|
|
4533
4585
|
|
|
4534
|
-
//
|
|
4535
|
-
export type
|
|
4586
|
+
// ViewTip
|
|
4587
|
+
export type ViewTip = {
|
|
4588
|
+
type: ViewTipType;
|
|
4589
|
+
text: string;
|
|
4590
|
+
};
|
|
4591
|
+
|
|
4592
|
+
// ViewSignPage
|
|
4593
|
+
export type ViewSignPage = {
|
|
4536
4594
|
title: string;
|
|
4537
|
-
display_type: TxDetailsDisplayType;
|
|
4538
4595
|
amount?: UintType;
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
general: TxDetailsGeneral[];
|
|
4596
|
+
general: ViewDetail[];
|
|
4597
|
+
tip?: ViewTip;
|
|
4542
4598
|
};
|
|
4543
4599
|
|
|
4544
|
-
//
|
|
4545
|
-
export type
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
proto_version: number;
|
|
4600
|
+
// ViewVerifyPage
|
|
4601
|
+
export type ViewVerifyPage = {
|
|
4602
|
+
title: string;
|
|
4603
|
+
address: string;
|
|
4604
|
+
path: string;
|
|
4550
4605
|
};
|
|
4551
4606
|
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4607
|
+
// ProtocolInfoRequest
|
|
4608
|
+
export type ProtocolInfoRequest = {};
|
|
4609
|
+
|
|
4610
|
+
// ProtocolInfo
|
|
4611
|
+
export type ProtocolInfo = {
|
|
4612
|
+
version: number;
|
|
4613
|
+
supported_messages: number[];
|
|
4614
|
+
protobuf_definition?: string;
|
|
4615
|
+
};
|
|
4557
4616
|
|
|
4558
4617
|
export enum DeviceRebootType {
|
|
4559
4618
|
Normal = 0,
|
|
@@ -4561,16 +4620,157 @@ export enum DeviceRebootType {
|
|
|
4561
4620
|
Bootloader = 2,
|
|
4562
4621
|
}
|
|
4563
4622
|
|
|
4564
|
-
// DevReboot
|
|
4565
|
-
export type DevReboot = {
|
|
4566
|
-
reboot_type: DevRebootType;
|
|
4567
|
-
};
|
|
4568
|
-
|
|
4569
4623
|
// DeviceReboot
|
|
4570
4624
|
export type DeviceReboot = {
|
|
4571
4625
|
reboot_type: DeviceRebootType;
|
|
4572
4626
|
};
|
|
4573
4627
|
|
|
4628
|
+
// DeviceSettings
|
|
4629
|
+
export type DeviceSettings = {
|
|
4630
|
+
label?: string;
|
|
4631
|
+
bt_enable?: boolean;
|
|
4632
|
+
language?: string;
|
|
4633
|
+
};
|
|
4634
|
+
|
|
4635
|
+
// DeviceSettingsGet
|
|
4636
|
+
export type DeviceSettingsGet = {};
|
|
4637
|
+
|
|
4638
|
+
// DeviceSettingsSet
|
|
4639
|
+
export type DeviceSettingsSet = {
|
|
4640
|
+
settings: DeviceSettings;
|
|
4641
|
+
};
|
|
4642
|
+
|
|
4643
|
+
// DeviceCertificate
|
|
4644
|
+
export type DeviceCertificate = {
|
|
4645
|
+
cert_and_pubkey: string;
|
|
4646
|
+
private_key?: string;
|
|
4647
|
+
};
|
|
4648
|
+
|
|
4649
|
+
// DeviceCertificateWrite
|
|
4650
|
+
export type DeviceCertificateWrite = {
|
|
4651
|
+
cert: DeviceCertificate;
|
|
4652
|
+
};
|
|
4653
|
+
|
|
4654
|
+
// DeviceCertificateRead
|
|
4655
|
+
export type DeviceCertificateRead = {};
|
|
4656
|
+
|
|
4657
|
+
// DeviceCertificateSignature
|
|
4658
|
+
export type DeviceCertificateSignature = {
|
|
4659
|
+
data: string;
|
|
4660
|
+
};
|
|
4661
|
+
|
|
4662
|
+
// DeviceCertificateSign
|
|
4663
|
+
export type DeviceCertificateSign = {
|
|
4664
|
+
data: string;
|
|
4665
|
+
};
|
|
4666
|
+
|
|
4667
|
+
export enum DeviceFirmwareTargetType {
|
|
4668
|
+
FW_MGMT_TARGET_INVALID = 0,
|
|
4669
|
+
FW_MGMT_TARGET_CRATE = 1,
|
|
4670
|
+
FW_MGMT_TARGET_ROMLOADER = 2,
|
|
4671
|
+
FW_MGMT_TARGET_BOOTLOADER = 3,
|
|
4672
|
+
FW_MGMT_TARGET_APPLICATION_P1 = 4,
|
|
4673
|
+
FW_MGMT_TARGET_APPLICATION_P2 = 5,
|
|
4674
|
+
FW_MGMT_TARGET_COPROCESSOR = 6,
|
|
4675
|
+
FW_MGMT_TARGET_SE01 = 7,
|
|
4676
|
+
FW_MGMT_TARGET_SE02 = 8,
|
|
4677
|
+
FW_MGMT_TARGET_SE03 = 9,
|
|
4678
|
+
FW_MGMT_TARGET_SE04 = 10,
|
|
4679
|
+
}
|
|
4680
|
+
|
|
4681
|
+
export enum DeviceFirmwareUpdateTaskStatus {
|
|
4682
|
+
FW_MGMT_UPDATER_TASK_STATUS_PENDING = 0,
|
|
4683
|
+
FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS = 1,
|
|
4684
|
+
FW_MGMT_UPDATER_TASK_STATUS_FINISHED = 2,
|
|
4685
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND = 3,
|
|
4686
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ = 4,
|
|
4687
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE = 5,
|
|
4688
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY = 6,
|
|
4689
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL = 7,
|
|
4690
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT = 8,
|
|
4691
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY = 9,
|
|
4692
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS = 10,
|
|
4693
|
+
}
|
|
4694
|
+
|
|
4695
|
+
// DeviceFirmwareTarget
|
|
4696
|
+
export type DeviceFirmwareTarget = {
|
|
4697
|
+
target_id: DeviceFirmwareTargetType;
|
|
4698
|
+
path: string;
|
|
4699
|
+
};
|
|
4700
|
+
|
|
4701
|
+
// DeviceFirmwareUpdateRequest
|
|
4702
|
+
export type DeviceFirmwareUpdateRequest = {
|
|
4703
|
+
targets: DeviceFirmwareTarget[];
|
|
4704
|
+
};
|
|
4705
|
+
|
|
4706
|
+
// DeviceFirmwareUpdateRecord
|
|
4707
|
+
export type DeviceFirmwareUpdateRecord = {
|
|
4708
|
+
target_id: DeviceFirmwareTargetType;
|
|
4709
|
+
status?: DeviceFirmwareUpdateTaskStatus;
|
|
4710
|
+
payload_version?: number;
|
|
4711
|
+
path?: string;
|
|
4712
|
+
};
|
|
4713
|
+
|
|
4714
|
+
// DeviceFirmwareUpdateRecordFields
|
|
4715
|
+
export type DeviceFirmwareUpdateRecordFields = {
|
|
4716
|
+
status?: boolean;
|
|
4717
|
+
payload_version?: boolean;
|
|
4718
|
+
path?: boolean;
|
|
4719
|
+
};
|
|
4720
|
+
|
|
4721
|
+
// DeviceFirmwareUpdateStatusGet
|
|
4722
|
+
export type DeviceFirmwareUpdateStatusGet = {
|
|
4723
|
+
fields?: DeviceFirmwareUpdateRecordFields;
|
|
4724
|
+
};
|
|
4725
|
+
|
|
4726
|
+
// DeviceFirmwareUpdateStatus
|
|
4727
|
+
export type DeviceFirmwareUpdateStatus = {
|
|
4728
|
+
records: DeviceFirmwareUpdateRecord[];
|
|
4729
|
+
};
|
|
4730
|
+
|
|
4731
|
+
export enum DeviceFactoryAck {
|
|
4732
|
+
FACTORY_ACK_SUCCESS = 0,
|
|
4733
|
+
FACTORY_ACK_FAIL = 1,
|
|
4734
|
+
}
|
|
4735
|
+
|
|
4736
|
+
// DeviceFactoryInfoManufactureTime
|
|
4737
|
+
export type DeviceFactoryInfoManufactureTime = {
|
|
4738
|
+
year: number;
|
|
4739
|
+
month: number;
|
|
4740
|
+
day: number;
|
|
4741
|
+
hour: number;
|
|
4742
|
+
minute: number;
|
|
4743
|
+
second: number;
|
|
4744
|
+
};
|
|
4745
|
+
|
|
4746
|
+
// DeviceFactoryInfo
|
|
4747
|
+
export type DeviceFactoryInfo = {
|
|
4748
|
+
version?: number;
|
|
4749
|
+
serial_number?: string;
|
|
4750
|
+
burn_in_completed?: boolean;
|
|
4751
|
+
factory_test_completed?: boolean;
|
|
4752
|
+
manufacture_time?: DeviceFactoryInfoManufactureTime;
|
|
4753
|
+
};
|
|
4754
|
+
|
|
4755
|
+
// DeviceFactoryInfoSet
|
|
4756
|
+
export type DeviceFactoryInfoSet = {
|
|
4757
|
+
info: DeviceFactoryInfo;
|
|
4758
|
+
};
|
|
4759
|
+
|
|
4760
|
+
// DeviceFactoryInfoGet
|
|
4761
|
+
export type DeviceFactoryInfoGet = {};
|
|
4762
|
+
|
|
4763
|
+
// DeviceFactoryPermanentLock
|
|
4764
|
+
export type DeviceFactoryPermanentLock = {
|
|
4765
|
+
check_a: string;
|
|
4766
|
+
check_b: string;
|
|
4767
|
+
};
|
|
4768
|
+
|
|
4769
|
+
// DeviceFactoryTest
|
|
4770
|
+
export type DeviceFactoryTest = {
|
|
4771
|
+
burn_in_test: boolean;
|
|
4772
|
+
};
|
|
4773
|
+
|
|
4574
4774
|
export enum DeviceType {
|
|
4575
4775
|
CLASSIC1 = 0,
|
|
4576
4776
|
CLASSIC1S = 1,
|
|
@@ -4578,62 +4778,65 @@ export enum DeviceType {
|
|
|
4578
4778
|
TOUCH = 3,
|
|
4579
4779
|
PRO = 5,
|
|
4580
4780
|
CLASSIC1S_PURE = 6,
|
|
4781
|
+
PRO2 = 7,
|
|
4782
|
+
NEO = 8,
|
|
4581
4783
|
}
|
|
4582
4784
|
|
|
4583
|
-
export enum
|
|
4785
|
+
export enum DeviceSeType {
|
|
4584
4786
|
THD89 = 0,
|
|
4585
4787
|
SE608A = 1,
|
|
4586
4788
|
}
|
|
4587
4789
|
|
|
4588
|
-
export enum
|
|
4790
|
+
export enum DeviceSEState {
|
|
4589
4791
|
BOOT = 0,
|
|
4590
4792
|
APP_FACTORY = 51,
|
|
4591
4793
|
APP = 85,
|
|
4592
4794
|
}
|
|
4593
4795
|
|
|
4594
|
-
//
|
|
4595
|
-
export type
|
|
4796
|
+
// DeviceFirmwareImageInfo
|
|
4797
|
+
export type DeviceFirmwareImageInfo = {
|
|
4596
4798
|
version?: string;
|
|
4597
4799
|
build_id?: string;
|
|
4598
4800
|
hash?: string;
|
|
4599
4801
|
};
|
|
4600
4802
|
|
|
4601
|
-
//
|
|
4602
|
-
export type
|
|
4603
|
-
|
|
4803
|
+
// DeviceHardwareInfo
|
|
4804
|
+
export type DeviceHardwareInfo = {
|
|
4805
|
+
Device_type?: DeviceType;
|
|
4604
4806
|
serial_no?: string;
|
|
4605
4807
|
hardware_version?: string;
|
|
4606
4808
|
hardware_version_raw_adc?: number;
|
|
4607
4809
|
};
|
|
4608
4810
|
|
|
4609
|
-
//
|
|
4610
|
-
export type
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4811
|
+
// DeviceMainMcuInfo
|
|
4812
|
+
export type DeviceMainMcuInfo = {
|
|
4813
|
+
romloader?: DeviceFirmwareImageInfo;
|
|
4814
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
4815
|
+
application?: DeviceFirmwareImageInfo;
|
|
4816
|
+
application_data?: DeviceFirmwareImageInfo;
|
|
4614
4817
|
};
|
|
4615
4818
|
|
|
4616
|
-
//
|
|
4617
|
-
export type
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4819
|
+
// DeviceCoprocessorInfo
|
|
4820
|
+
export type DeviceCoprocessorInfo = {
|
|
4821
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
4822
|
+
application?: DeviceFirmwareImageInfo;
|
|
4823
|
+
bt_adv_name?: string;
|
|
4824
|
+
bt_mac?: string;
|
|
4622
4825
|
};
|
|
4623
4826
|
|
|
4624
|
-
//
|
|
4625
|
-
export type
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
type?:
|
|
4629
|
-
state?:
|
|
4827
|
+
// DeviceSEInfo
|
|
4828
|
+
export type DeviceSEInfo = {
|
|
4829
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
4830
|
+
application?: DeviceFirmwareImageInfo;
|
|
4831
|
+
type?: DeviceSeType;
|
|
4832
|
+
state?: DeviceSEState;
|
|
4630
4833
|
};
|
|
4631
4834
|
|
|
4632
|
-
//
|
|
4633
|
-
export type
|
|
4835
|
+
// DeviceInfoTargets
|
|
4836
|
+
export type DeviceInfoTargets = {
|
|
4634
4837
|
hw?: boolean;
|
|
4635
4838
|
fw?: boolean;
|
|
4636
|
-
|
|
4839
|
+
coprocessor?: boolean;
|
|
4637
4840
|
se1?: boolean;
|
|
4638
4841
|
se2?: boolean;
|
|
4639
4842
|
se3?: boolean;
|
|
@@ -4641,161 +4844,57 @@ export type DevInfoTargets = {
|
|
|
4641
4844
|
status?: boolean;
|
|
4642
4845
|
};
|
|
4643
4846
|
|
|
4644
|
-
//
|
|
4645
|
-
export type
|
|
4847
|
+
// DeviceInfoTypes
|
|
4848
|
+
export type DeviceInfoTypes = {
|
|
4646
4849
|
version?: boolean;
|
|
4647
4850
|
build_id?: boolean;
|
|
4648
4851
|
hash?: boolean;
|
|
4649
4852
|
specific?: boolean;
|
|
4650
4853
|
};
|
|
4651
4854
|
|
|
4652
|
-
//
|
|
4653
|
-
export type
|
|
4654
|
-
|
|
4655
|
-
|
|
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;
|
|
4855
|
+
// DeviceInfoGet
|
|
4856
|
+
export type DeviceInfoGet = {
|
|
4857
|
+
targets?: DeviceInfoTargets;
|
|
4858
|
+
types?: DeviceInfoTypes;
|
|
4666
4859
|
};
|
|
4667
4860
|
|
|
4668
|
-
// DeviceGetDeviceInfo
|
|
4669
|
-
export type DeviceGetDeviceInfo = DevGetDeviceInfo;
|
|
4670
|
-
|
|
4671
4861
|
// ProtocolV2DeviceInfo
|
|
4672
4862
|
export type ProtocolV2DeviceInfo = {
|
|
4673
4863
|
protocol_version: number;
|
|
4674
|
-
hw?:
|
|
4675
|
-
fw?:
|
|
4676
|
-
|
|
4677
|
-
se1?:
|
|
4678
|
-
se2?:
|
|
4679
|
-
se3?:
|
|
4680
|
-
se4?:
|
|
4681
|
-
status?:
|
|
4682
|
-
};
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
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;
|
|
4753
|
-
};
|
|
4754
|
-
|
|
4755
|
-
// DeviceFirmwareUpdateStatusEntry
|
|
4756
|
-
export type DeviceFirmwareUpdateStatusEntry = {
|
|
4757
|
-
target_id: DeviceFirmwareTargetType;
|
|
4758
|
-
status: number;
|
|
4759
|
-
};
|
|
4760
|
-
|
|
4761
|
-
// DevGetFirmwareUpdateStatus
|
|
4762
|
-
export type DevGetFirmwareUpdateStatus = {};
|
|
4763
|
-
|
|
4764
|
-
// DeviceGetFirmwareUpdateStatus
|
|
4765
|
-
export type DeviceGetFirmwareUpdateStatus = {};
|
|
4766
|
-
|
|
4767
|
-
// DevFirmwareUpdateStatus
|
|
4768
|
-
export type DevFirmwareUpdateStatus = {
|
|
4769
|
-
targets: DevFirmwareUpdateStatusEntry[];
|
|
4770
|
-
};
|
|
4771
|
-
|
|
4772
|
-
// DeviceFirmwareUpdateStatus
|
|
4773
|
-
export type DeviceFirmwareUpdateStatus = {
|
|
4774
|
-
targets: DeviceFirmwareUpdateStatusEntry[];
|
|
4864
|
+
hw?: DeviceHardwareInfo;
|
|
4865
|
+
fw?: DeviceMainMcuInfo;
|
|
4866
|
+
coprocessor?: DeviceCoprocessorInfo;
|
|
4867
|
+
se1?: DeviceSEInfo;
|
|
4868
|
+
se2?: DeviceSEInfo;
|
|
4869
|
+
se3?: DeviceSEInfo;
|
|
4870
|
+
se4?: DeviceSEInfo;
|
|
4871
|
+
status?: DeviceStatus;
|
|
4872
|
+
};
|
|
4873
|
+
|
|
4874
|
+
// DeviceSessionGet
|
|
4875
|
+
export type DeviceSessionGet = {
|
|
4876
|
+
session_id?: string;
|
|
4775
4877
|
};
|
|
4776
4878
|
|
|
4777
|
-
//
|
|
4778
|
-
export type
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
pre_firmware?: string;
|
|
4879
|
+
// DeviceSession
|
|
4880
|
+
export type DeviceSession = {
|
|
4881
|
+
session_id?: string;
|
|
4882
|
+
btc_test_address?: string;
|
|
4782
4883
|
};
|
|
4783
4884
|
|
|
4784
|
-
//
|
|
4785
|
-
export type
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
cpu_info?: string;
|
|
4794
|
-
pre_firmware?: string;
|
|
4885
|
+
// DeviceStatus
|
|
4886
|
+
export type DeviceStatus = {
|
|
4887
|
+
device_id?: string;
|
|
4888
|
+
unlocked?: boolean;
|
|
4889
|
+
init_states?: boolean;
|
|
4890
|
+
backup_required?: boolean;
|
|
4891
|
+
passphrase_enabled?: boolean;
|
|
4892
|
+
attach_to_pin_enabled?: boolean;
|
|
4893
|
+
unlocked_by_attach_to_pin?: boolean;
|
|
4795
4894
|
};
|
|
4796
4895
|
|
|
4797
|
-
//
|
|
4798
|
-
export type
|
|
4896
|
+
// FilesystemPermissionFix
|
|
4897
|
+
export type FilesystemPermissionFix = {};
|
|
4799
4898
|
|
|
4800
4899
|
// FilesystemPathInfo
|
|
4801
4900
|
export type FilesystemPathInfo = {
|
|
@@ -4875,39 +4974,6 @@ export type FilesystemDirRemove = {
|
|
|
4875
4974
|
// FilesystemFormat
|
|
4876
4975
|
export type FilesystemFormat = {};
|
|
4877
4976
|
|
|
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;
|
|
4891
|
-
};
|
|
4892
|
-
|
|
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
|
-
};
|
|
4910
|
-
|
|
4911
4977
|
// custom connect definitions
|
|
4912
4978
|
export type MessageType = {
|
|
4913
4979
|
AlephiumGetAddress: AlephiumGetAddress;
|
|
@@ -5472,49 +5538,59 @@ export type MessageType = {
|
|
|
5472
5538
|
CoinPurchaseMemo: CoinPurchaseMemo;
|
|
5473
5539
|
PaymentRequestMemo: PaymentRequestMemo;
|
|
5474
5540
|
TxAckPaymentRequest: TxAckPaymentRequest;
|
|
5541
|
+
InternalMyAddressRequest: InternalMyAddressRequest;
|
|
5542
|
+
StartSession: StartSession;
|
|
5475
5543
|
SetBusy: SetBusy;
|
|
5476
5544
|
GetFirmwareHash: GetFirmwareHash;
|
|
5477
5545
|
FirmwareHash: FirmwareHash;
|
|
5478
5546
|
GetNonce: GetNonce;
|
|
5479
5547
|
Nonce: Nonce;
|
|
5480
5548
|
WriteSEPrivateKey: WriteSEPrivateKey;
|
|
5549
|
+
SetWallpaper: SetWallpaper;
|
|
5550
|
+
GetWallpaper: GetWallpaper;
|
|
5551
|
+
Wallpaper: Wallpaper;
|
|
5481
5552
|
UnlockPath: UnlockPath;
|
|
5482
5553
|
UnlockedPathRequest: UnlockedPathRequest;
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
DevReboot: DevReboot;
|
|
5554
|
+
ViewAmount: ViewAmount;
|
|
5555
|
+
ViewDetail: ViewDetail;
|
|
5556
|
+
ViewTip: ViewTip;
|
|
5557
|
+
ViewSignPage: ViewSignPage;
|
|
5558
|
+
ViewVerifyPage: ViewVerifyPage;
|
|
5559
|
+
ProtocolInfoRequest: ProtocolInfoRequest;
|
|
5560
|
+
ProtocolInfo: ProtocolInfo;
|
|
5491
5561
|
DeviceReboot: DeviceReboot;
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
DevGetDeviceInfo: DevGetDeviceInfo;
|
|
5501
|
-
DeviceGetDeviceInfo: DeviceGetDeviceInfo;
|
|
5502
|
-
DevFirmwareTarget: DevFirmwareTarget;
|
|
5562
|
+
DeviceSettings: DeviceSettings;
|
|
5563
|
+
DeviceSettingsGet: DeviceSettingsGet;
|
|
5564
|
+
DeviceSettingsSet: DeviceSettingsSet;
|
|
5565
|
+
DeviceCertificate: DeviceCertificate;
|
|
5566
|
+
DeviceCertificateWrite: DeviceCertificateWrite;
|
|
5567
|
+
DeviceCertificateRead: DeviceCertificateRead;
|
|
5568
|
+
DeviceCertificateSignature: DeviceCertificateSignature;
|
|
5569
|
+
DeviceCertificateSign: DeviceCertificateSign;
|
|
5503
5570
|
DeviceFirmwareTarget: DeviceFirmwareTarget;
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
DevFirmwareUpdateStatusEntry: DevFirmwareUpdateStatusEntry;
|
|
5509
|
-
DeviceFirmwareUpdateStatusEntry: DeviceFirmwareUpdateStatusEntry;
|
|
5510
|
-
DevGetFirmwareUpdateStatus: DevGetFirmwareUpdateStatus;
|
|
5511
|
-
DeviceGetFirmwareUpdateStatus: DeviceGetFirmwareUpdateStatus;
|
|
5512
|
-
DevFirmwareUpdateStatus: DevFirmwareUpdateStatus;
|
|
5571
|
+
DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
|
|
5572
|
+
DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
|
|
5573
|
+
DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
|
|
5574
|
+
DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
|
|
5513
5575
|
DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5576
|
+
DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
|
|
5577
|
+
DeviceFactoryInfo: DeviceFactoryInfo;
|
|
5578
|
+
DeviceFactoryInfoSet: DeviceFactoryInfoSet;
|
|
5579
|
+
DeviceFactoryInfoGet: DeviceFactoryInfoGet;
|
|
5580
|
+
DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
|
|
5581
|
+
DeviceFactoryTest: DeviceFactoryTest;
|
|
5582
|
+
DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
|
|
5583
|
+
DeviceHardwareInfo: DeviceHardwareInfo;
|
|
5584
|
+
DeviceMainMcuInfo: DeviceMainMcuInfo;
|
|
5585
|
+
DeviceCoprocessorInfo: DeviceCoprocessorInfo;
|
|
5586
|
+
DeviceSEInfo: DeviceSEInfo;
|
|
5587
|
+
DeviceInfoTargets: DeviceInfoTargets;
|
|
5588
|
+
DeviceInfoTypes: DeviceInfoTypes;
|
|
5589
|
+
DeviceInfoGet: DeviceInfoGet;
|
|
5590
|
+
DeviceSessionGet: DeviceSessionGet;
|
|
5591
|
+
DeviceSession: DeviceSession;
|
|
5592
|
+
DeviceStatus: DeviceStatus;
|
|
5593
|
+
FilesystemPermissionFix: FilesystemPermissionFix;
|
|
5518
5594
|
FilesystemPathInfo: FilesystemPathInfo;
|
|
5519
5595
|
FilesystemPathInfoQuery: FilesystemPathInfoQuery;
|
|
5520
5596
|
FilesystemFile: FilesystemFile;
|
|
@@ -5526,11 +5602,6 @@ export type MessageType = {
|
|
|
5526
5602
|
FilesystemDirMake: FilesystemDirMake;
|
|
5527
5603
|
FilesystemDirRemove: FilesystemDirRemove;
|
|
5528
5604
|
FilesystemFormat: FilesystemFormat;
|
|
5529
|
-
GetOnboardingStatus: GetOnboardingStatus;
|
|
5530
|
-
NewDevice: NewDevice;
|
|
5531
|
-
Restore: Restore;
|
|
5532
|
-
Setup: Setup;
|
|
5533
|
-
OnboardingStatus: OnboardingStatus;
|
|
5534
5605
|
};
|
|
5535
5606
|
|
|
5536
5607
|
export type MessageKey = keyof MessageType;
|