@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/dist/types/messages.d.ts
CHANGED
|
@@ -882,11 +882,15 @@ export declare enum FailureType {
|
|
|
882
882
|
Failure_PinMismatch = 12,
|
|
883
883
|
Failure_WipeCodeMismatch = 13,
|
|
884
884
|
Failure_InvalidSession = 14,
|
|
885
|
-
Failure_FirmwareError = 99
|
|
885
|
+
Failure_FirmwareError = 99,
|
|
886
|
+
Failure_InvalidMessage = 1,
|
|
887
|
+
Failure_UndefinedError = 2,
|
|
888
|
+
Failure_UsageError = 3
|
|
886
889
|
}
|
|
887
890
|
export type Failure = {
|
|
888
891
|
code?: FailureType;
|
|
889
892
|
message?: string;
|
|
893
|
+
subcode?: number;
|
|
890
894
|
};
|
|
891
895
|
export declare enum Enum_ButtonRequestType {
|
|
892
896
|
ButtonRequest_Other = 1,
|
|
@@ -1869,6 +1873,28 @@ export type OnekeyFeatures = {
|
|
|
1869
1873
|
onekey_se02_boot_build_id?: string;
|
|
1870
1874
|
onekey_se03_boot_build_id?: string;
|
|
1871
1875
|
onekey_se04_boot_build_id?: string;
|
|
1876
|
+
onekey_romloader_version?: string;
|
|
1877
|
+
onekey_bootloader_version?: string;
|
|
1878
|
+
onekey_romloader_hash?: string;
|
|
1879
|
+
onekey_bootloader_hash?: string;
|
|
1880
|
+
onekey_romloader_build_id?: string;
|
|
1881
|
+
onekey_bootloader_build_id?: string;
|
|
1882
|
+
onekey_coprocessor_bt_name?: string;
|
|
1883
|
+
onekey_coprocessor_version?: string;
|
|
1884
|
+
onekey_coprocessor_build_id?: string;
|
|
1885
|
+
onekey_coprocessor_hash?: string;
|
|
1886
|
+
onekey_se01_bootloader_version?: string;
|
|
1887
|
+
onekey_se02_bootloader_version?: string;
|
|
1888
|
+
onekey_se03_bootloader_version?: string;
|
|
1889
|
+
onekey_se04_bootloader_version?: string;
|
|
1890
|
+
onekey_se01_bootloader_hash?: string;
|
|
1891
|
+
onekey_se02_bootloader_hash?: string;
|
|
1892
|
+
onekey_se03_bootloader_hash?: string;
|
|
1893
|
+
onekey_se04_bootloader_hash?: string;
|
|
1894
|
+
onekey_se01_bootloader_build_id?: string;
|
|
1895
|
+
onekey_se02_bootloader_build_id?: string;
|
|
1896
|
+
onekey_se03_bootloader_build_id?: string;
|
|
1897
|
+
onekey_se04_bootloader_build_id?: string;
|
|
1872
1898
|
};
|
|
1873
1899
|
export type LockDevice = {};
|
|
1874
1900
|
export type EndSession = {};
|
|
@@ -3325,12 +3351,12 @@ export type TxAckPaymentRequest = {
|
|
|
3325
3351
|
amount?: UintType;
|
|
3326
3352
|
signature: string;
|
|
3327
3353
|
};
|
|
3328
|
-
export type
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3354
|
+
export type EthereumSignTypedDataQR = {
|
|
3355
|
+
address_n: number[];
|
|
3356
|
+
json_data?: string;
|
|
3357
|
+
chain_id?: number;
|
|
3358
|
+
metamask_v4_compat?: boolean;
|
|
3359
|
+
request_id?: string;
|
|
3334
3360
|
};
|
|
3335
3361
|
export type InternalMyAddressRequest = {
|
|
3336
3362
|
coin_type: number;
|
|
@@ -3338,6 +3364,11 @@ export type InternalMyAddressRequest = {
|
|
|
3338
3364
|
account_index: number;
|
|
3339
3365
|
derive_type: number;
|
|
3340
3366
|
};
|
|
3367
|
+
export type StartSession = {
|
|
3368
|
+
session_id?: string;
|
|
3369
|
+
_skip_passphrase?: boolean;
|
|
3370
|
+
derive_cardano?: boolean;
|
|
3371
|
+
};
|
|
3341
3372
|
export type SetBusy = {
|
|
3342
3373
|
expiry_ms?: number;
|
|
3343
3374
|
};
|
|
@@ -3403,28 +3434,180 @@ export type ViewTip = {
|
|
|
3403
3434
|
type: ViewTipType;
|
|
3404
3435
|
text: string;
|
|
3405
3436
|
};
|
|
3437
|
+
export type ViewRawData = {
|
|
3438
|
+
initial_data: string;
|
|
3439
|
+
placeholder: number;
|
|
3440
|
+
};
|
|
3441
|
+
export declare enum ViewSignLayout {
|
|
3442
|
+
LayoutDefault = 0,
|
|
3443
|
+
LayoutSafeTxCreate = 1
|
|
3444
|
+
}
|
|
3406
3445
|
export type ViewSignPage = {
|
|
3407
3446
|
title: string;
|
|
3408
3447
|
amount?: UintType;
|
|
3409
3448
|
general: ViewDetail[];
|
|
3410
3449
|
tip?: ViewTip;
|
|
3450
|
+
raw_data?: ViewRawData;
|
|
3451
|
+
slide_to_confirm?: boolean;
|
|
3452
|
+
layout?: ViewSignLayout;
|
|
3411
3453
|
};
|
|
3412
3454
|
export type ViewVerifyPage = {
|
|
3413
3455
|
title: string;
|
|
3414
3456
|
address: string;
|
|
3415
3457
|
path: string;
|
|
3416
3458
|
};
|
|
3417
|
-
export type
|
|
3418
|
-
export type
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3459
|
+
export type ProtocolInfoRequest = {};
|
|
3460
|
+
export type ProtocolInfo = {
|
|
3461
|
+
version: number;
|
|
3462
|
+
supported_messages: number[];
|
|
3463
|
+
protobuf_definition?: string;
|
|
3464
|
+
};
|
|
3465
|
+
export declare enum DeviceErrorCode {
|
|
3466
|
+
DeviceError_None = 0,
|
|
3467
|
+
DeviceError_Busy = 1,
|
|
3468
|
+
DeviceError_NotInitialized = 2,
|
|
3469
|
+
DeviceError_ActionCancelled = 3,
|
|
3470
|
+
DeviceError_PinAlreadyUsed = 4,
|
|
3471
|
+
DeviceError_PersistFailed = 5,
|
|
3472
|
+
DeviceError_SeError = 6,
|
|
3473
|
+
DeviceError_InvalidLanguage = 7,
|
|
3474
|
+
DeviceError_WallpaperNotUsable = 8,
|
|
3475
|
+
DeviceError_DeviceLocked = 9
|
|
3476
|
+
}
|
|
3477
|
+
export declare enum DeviceRebootType {
|
|
3422
3478
|
Normal = 0,
|
|
3423
|
-
|
|
3479
|
+
Romloader = 1,
|
|
3424
3480
|
Bootloader = 2
|
|
3425
3481
|
}
|
|
3426
|
-
export type
|
|
3427
|
-
reboot_type:
|
|
3482
|
+
export type DeviceReboot = {
|
|
3483
|
+
reboot_type: DeviceRebootType;
|
|
3484
|
+
};
|
|
3485
|
+
export type DeviceSettings = {
|
|
3486
|
+
label?: string;
|
|
3487
|
+
bt_enable?: boolean;
|
|
3488
|
+
language?: string;
|
|
3489
|
+
wallpaper_path?: string;
|
|
3490
|
+
passphrase_enable?: boolean;
|
|
3491
|
+
brightness?: number;
|
|
3492
|
+
autolock_delay_ms?: number;
|
|
3493
|
+
autoshutdown_delay_ms?: number;
|
|
3494
|
+
animation_enable?: boolean;
|
|
3495
|
+
tap_to_wake?: boolean;
|
|
3496
|
+
haptic_feedback?: boolean;
|
|
3497
|
+
device_name_display_enabled?: boolean;
|
|
3498
|
+
airgap_mode?: boolean;
|
|
3499
|
+
fido_enabled?: boolean;
|
|
3500
|
+
experimental_features?: boolean;
|
|
3501
|
+
usb_lock_enable?: boolean;
|
|
3502
|
+
random_keypad?: boolean;
|
|
3503
|
+
};
|
|
3504
|
+
export type DeviceSettingsGet = {};
|
|
3505
|
+
export type DeviceSettingsSet = {
|
|
3506
|
+
settings: DeviceSettings;
|
|
3507
|
+
};
|
|
3508
|
+
export declare enum DeviceSettingsPage {
|
|
3509
|
+
DeviceReset = 0,
|
|
3510
|
+
DevicePinChange = 1,
|
|
3511
|
+
DevicePassphrase = 2,
|
|
3512
|
+
DeviceAirgap = 3
|
|
3513
|
+
}
|
|
3514
|
+
export type DeviceSettingsPageShow = {
|
|
3515
|
+
page: DeviceSettingsPage;
|
|
3516
|
+
field_name?: string;
|
|
3517
|
+
};
|
|
3518
|
+
export type DeviceCertificate = {
|
|
3519
|
+
cert_and_pubkey: string;
|
|
3520
|
+
private_key?: string;
|
|
3521
|
+
};
|
|
3522
|
+
export type DeviceCertificateWrite = {
|
|
3523
|
+
cert: DeviceCertificate;
|
|
3524
|
+
};
|
|
3525
|
+
export type DeviceCertificateRead = {};
|
|
3526
|
+
export type DeviceCertificateSignature = {
|
|
3527
|
+
data: string;
|
|
3528
|
+
};
|
|
3529
|
+
export type DeviceCertificateSign = {
|
|
3530
|
+
data: string;
|
|
3531
|
+
};
|
|
3532
|
+
export declare enum DeviceFirmwareTargetType {
|
|
3533
|
+
FW_MGMT_TARGET_INVALID = 0,
|
|
3534
|
+
FW_MGMT_TARGET_CRATE = 1,
|
|
3535
|
+
FW_MGMT_TARGET_ROMLOADER = 2,
|
|
3536
|
+
FW_MGMT_TARGET_BOOTLOADER = 3,
|
|
3537
|
+
FW_MGMT_TARGET_APPLICATION_P1 = 4,
|
|
3538
|
+
FW_MGMT_TARGET_APPLICATION_P2 = 5,
|
|
3539
|
+
FW_MGMT_TARGET_COPROCESSOR = 6,
|
|
3540
|
+
FW_MGMT_TARGET_SE01 = 7,
|
|
3541
|
+
FW_MGMT_TARGET_SE02 = 8,
|
|
3542
|
+
FW_MGMT_TARGET_SE03 = 9,
|
|
3543
|
+
FW_MGMT_TARGET_SE04 = 10
|
|
3544
|
+
}
|
|
3545
|
+
export declare enum DeviceFirmwareUpdateTaskStatus {
|
|
3546
|
+
FW_MGMT_UPDATER_TASK_STATUS_PENDING = 0,
|
|
3547
|
+
FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS = 1,
|
|
3548
|
+
FW_MGMT_UPDATER_TASK_STATUS_FINISHED = 2,
|
|
3549
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND = 3,
|
|
3550
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ = 4,
|
|
3551
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE = 5,
|
|
3552
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY = 6,
|
|
3553
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL = 7,
|
|
3554
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT = 8,
|
|
3555
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY = 9,
|
|
3556
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS = 10
|
|
3557
|
+
}
|
|
3558
|
+
export type DeviceFirmwareTarget = {
|
|
3559
|
+
target_id: DeviceFirmwareTargetType;
|
|
3560
|
+
path: string;
|
|
3561
|
+
};
|
|
3562
|
+
export type DeviceFirmwareUpdateRequest = {
|
|
3563
|
+
targets: DeviceFirmwareTarget[];
|
|
3564
|
+
};
|
|
3565
|
+
export type DeviceFirmwareUpdateRecord = {
|
|
3566
|
+
target_id: DeviceFirmwareTargetType;
|
|
3567
|
+
status?: DeviceFirmwareUpdateTaskStatus;
|
|
3568
|
+
payload_version?: number;
|
|
3569
|
+
path?: string;
|
|
3570
|
+
};
|
|
3571
|
+
export type DeviceFirmwareUpdateRecordFields = {
|
|
3572
|
+
status?: boolean;
|
|
3573
|
+
payload_version?: boolean;
|
|
3574
|
+
path?: boolean;
|
|
3575
|
+
};
|
|
3576
|
+
export type DeviceFirmwareUpdateStatusGet = {
|
|
3577
|
+
fields?: DeviceFirmwareUpdateRecordFields;
|
|
3578
|
+
};
|
|
3579
|
+
export type DeviceFirmwareUpdateStatus = {
|
|
3580
|
+
records: DeviceFirmwareUpdateRecord[];
|
|
3581
|
+
};
|
|
3582
|
+
export declare enum DeviceFactoryAck {
|
|
3583
|
+
FACTORY_ACK_SUCCESS = 0,
|
|
3584
|
+
FACTORY_ACK_FAIL = 1
|
|
3585
|
+
}
|
|
3586
|
+
export type DeviceFactoryInfoManufactureTime = {
|
|
3587
|
+
year: number;
|
|
3588
|
+
month: number;
|
|
3589
|
+
day: number;
|
|
3590
|
+
hour: number;
|
|
3591
|
+
minute: number;
|
|
3592
|
+
second: number;
|
|
3593
|
+
};
|
|
3594
|
+
export type DeviceFactoryInfo = {
|
|
3595
|
+
version?: number;
|
|
3596
|
+
serial_number?: string;
|
|
3597
|
+
burn_in_completed?: boolean;
|
|
3598
|
+
factory_test_completed?: boolean;
|
|
3599
|
+
manufacture_time?: DeviceFactoryInfoManufactureTime;
|
|
3600
|
+
};
|
|
3601
|
+
export type DeviceFactoryInfoSet = {
|
|
3602
|
+
info: DeviceFactoryInfo;
|
|
3603
|
+
};
|
|
3604
|
+
export type DeviceFactoryInfoGet = {};
|
|
3605
|
+
export type DeviceFactoryPermanentLock = {
|
|
3606
|
+
check_a: string;
|
|
3607
|
+
check_b: string;
|
|
3608
|
+
};
|
|
3609
|
+
export type DeviceFactoryTest = {
|
|
3610
|
+
burn_in_test: boolean;
|
|
3428
3611
|
};
|
|
3429
3612
|
export declare enum DeviceType {
|
|
3430
3613
|
CLASSIC1 = 0,
|
|
@@ -3432,130 +3615,124 @@ export declare enum DeviceType {
|
|
|
3432
3615
|
MINI = 2,
|
|
3433
3616
|
TOUCH = 3,
|
|
3434
3617
|
PRO = 5,
|
|
3435
|
-
CLASSIC1S_PURE = 6
|
|
3618
|
+
CLASSIC1S_PURE = 6,
|
|
3619
|
+
PRO2 = 7,
|
|
3620
|
+
NEO = 8
|
|
3436
3621
|
}
|
|
3437
|
-
export declare enum
|
|
3622
|
+
export declare enum DeviceSeType {
|
|
3438
3623
|
THD89 = 0,
|
|
3439
3624
|
SE608A = 1
|
|
3440
3625
|
}
|
|
3441
|
-
export declare enum
|
|
3626
|
+
export declare enum DeviceSEState {
|
|
3442
3627
|
BOOT = 0,
|
|
3443
3628
|
APP_FACTORY = 51,
|
|
3444
3629
|
APP = 85
|
|
3445
3630
|
}
|
|
3446
|
-
export type
|
|
3631
|
+
export type DeviceFirmwareImageInfo = {
|
|
3447
3632
|
version?: string;
|
|
3448
3633
|
build_id?: string;
|
|
3449
3634
|
hash?: string;
|
|
3450
3635
|
};
|
|
3451
|
-
export type
|
|
3452
|
-
|
|
3636
|
+
export type DeviceHardwareInfo = {
|
|
3637
|
+
Device_type?: DeviceType;
|
|
3453
3638
|
serial_no?: string;
|
|
3454
|
-
device_id?: string;
|
|
3455
3639
|
hardware_version?: string;
|
|
3456
3640
|
hardware_version_raw_adc?: number;
|
|
3457
3641
|
};
|
|
3458
|
-
export type
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3642
|
+
export type DeviceMainMcuInfo = {
|
|
3643
|
+
romloader?: DeviceFirmwareImageInfo;
|
|
3644
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
3645
|
+
application?: DeviceFirmwareImageInfo;
|
|
3646
|
+
application_data?: DeviceFirmwareImageInfo;
|
|
3647
|
+
};
|
|
3648
|
+
export type DeviceCoprocessorInfo = {
|
|
3649
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
3650
|
+
application?: DeviceFirmwareImageInfo;
|
|
3651
|
+
bt_adv_name?: string;
|
|
3652
|
+
bt_mac?: string;
|
|
3653
|
+
};
|
|
3654
|
+
export type DeviceSEInfo = {
|
|
3655
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
3656
|
+
application?: DeviceFirmwareImageInfo;
|
|
3657
|
+
type?: DeviceSeType;
|
|
3658
|
+
state?: DeviceSEState;
|
|
3659
|
+
};
|
|
3660
|
+
export type DeviceInfoTargets = {
|
|
3476
3661
|
hw?: boolean;
|
|
3477
3662
|
fw?: boolean;
|
|
3478
|
-
|
|
3663
|
+
coprocessor?: boolean;
|
|
3479
3664
|
se1?: boolean;
|
|
3480
3665
|
se2?: boolean;
|
|
3481
3666
|
se3?: boolean;
|
|
3482
3667
|
se4?: boolean;
|
|
3483
3668
|
status?: boolean;
|
|
3484
3669
|
};
|
|
3485
|
-
export type
|
|
3670
|
+
export type DeviceInfoTypes = {
|
|
3486
3671
|
version?: boolean;
|
|
3487
3672
|
build_id?: boolean;
|
|
3488
3673
|
hash?: boolean;
|
|
3489
3674
|
specific?: boolean;
|
|
3490
3675
|
};
|
|
3491
|
-
export type
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
init_states?: boolean;
|
|
3495
|
-
backup_required?: boolean;
|
|
3496
|
-
passphrase_protection?: boolean;
|
|
3497
|
-
label?: string;
|
|
3498
|
-
};
|
|
3499
|
-
export type DevGetDeviceInfo = {
|
|
3500
|
-
targets?: DevInfoTargets;
|
|
3501
|
-
types?: DevInfoTypes;
|
|
3676
|
+
export type DeviceInfoGet = {
|
|
3677
|
+
targets?: DeviceInfoTargets;
|
|
3678
|
+
types?: DeviceInfoTypes;
|
|
3502
3679
|
};
|
|
3503
3680
|
export type ProtocolV2DeviceInfo = {
|
|
3504
3681
|
protocol_version: number;
|
|
3505
|
-
hw?:
|
|
3506
|
-
fw?:
|
|
3507
|
-
|
|
3508
|
-
se1?:
|
|
3509
|
-
se2?:
|
|
3510
|
-
se3?:
|
|
3511
|
-
se4?:
|
|
3512
|
-
status?:
|
|
3513
|
-
};
|
|
3514
|
-
export
|
|
3515
|
-
|
|
3516
|
-
TARGET_MAIN_BOOT = 1,
|
|
3517
|
-
TARGET_BT = 2,
|
|
3518
|
-
TARGET_SE1 = 3,
|
|
3519
|
-
TARGET_SE2 = 4,
|
|
3520
|
-
TARGET_SE3 = 5,
|
|
3521
|
-
TARGET_SE4 = 6,
|
|
3522
|
-
TARGET_RESOURCE = 10
|
|
3523
|
-
}
|
|
3524
|
-
export type DevFirmwareTarget = {
|
|
3525
|
-
target_id: DevFirmwareTargetType;
|
|
3526
|
-
path: string;
|
|
3527
|
-
};
|
|
3528
|
-
export type DevFirmwareUpdate = {
|
|
3529
|
-
targets: DevFirmwareTarget[];
|
|
3530
|
-
};
|
|
3531
|
-
export type DevFirmwareInstallProgress = {
|
|
3532
|
-
target_id: DevFirmwareTargetType;
|
|
3533
|
-
progress: number;
|
|
3534
|
-
stage?: string;
|
|
3535
|
-
};
|
|
3536
|
-
export type DevFirmwareUpdateStatusEntry = {
|
|
3537
|
-
target_id: DevFirmwareTargetType;
|
|
3538
|
-
status: number;
|
|
3682
|
+
hw?: DeviceHardwareInfo;
|
|
3683
|
+
fw?: DeviceMainMcuInfo;
|
|
3684
|
+
coprocessor?: DeviceCoprocessorInfo;
|
|
3685
|
+
se1?: DeviceSEInfo;
|
|
3686
|
+
se2?: DeviceSEInfo;
|
|
3687
|
+
se3?: DeviceSEInfo;
|
|
3688
|
+
se4?: DeviceSEInfo;
|
|
3689
|
+
status?: DeviceStatus;
|
|
3690
|
+
};
|
|
3691
|
+
export type DeviceSessionGet = {
|
|
3692
|
+
session_id?: string;
|
|
3539
3693
|
};
|
|
3540
|
-
export type
|
|
3541
|
-
|
|
3542
|
-
|
|
3694
|
+
export type DeviceSession = {
|
|
3695
|
+
session_id?: string;
|
|
3696
|
+
btc_test_address?: string;
|
|
3543
3697
|
};
|
|
3544
|
-
export type
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3698
|
+
export type DeviceSessionAskPin = {};
|
|
3699
|
+
export type DeviceSessionPinResult = {
|
|
3700
|
+
unlocked?: boolean;
|
|
3701
|
+
unlocked_attach_pin?: boolean;
|
|
3702
|
+
passphrase_protection?: boolean;
|
|
3548
3703
|
};
|
|
3549
|
-
export type
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3704
|
+
export type DeviceStatus = {
|
|
3705
|
+
device_id?: string;
|
|
3706
|
+
unlocked?: boolean;
|
|
3707
|
+
init_states?: boolean;
|
|
3708
|
+
backup_required?: boolean;
|
|
3709
|
+
passphrase_enabled?: boolean;
|
|
3710
|
+
attach_to_pin_enabled?: boolean;
|
|
3711
|
+
unlocked_by_attach_to_pin?: boolean;
|
|
3712
|
+
};
|
|
3713
|
+
export type DeviceStatusGet = {};
|
|
3714
|
+
export declare enum DevOnboardingStage {
|
|
3715
|
+
DEV_ONBOARDING_STAGE_UNKNOWN = 0,
|
|
3716
|
+
DEV_ONBOARDING_STAGE_SAFETY_CHECK = 1,
|
|
3717
|
+
DEV_ONBOARDING_STAGE_PERSONALIZATION = 2,
|
|
3718
|
+
DEV_ONBOARDING_STAGE_SELECT_SETUP_METHOD = 3,
|
|
3719
|
+
DEV_ONBOARDING_STAGE_NEW_DEVICE = 4,
|
|
3720
|
+
DEV_ONBOARDING_STAGE_SELECT_RESTORE_METHOD = 5,
|
|
3721
|
+
DEV_ONBOARDING_STAGE_RESTORE_MNEMONIC = 6,
|
|
3722
|
+
DEV_ONBOARDING_STAGE_RESTORE_SEEDCARD = 7,
|
|
3723
|
+
DEV_ONBOARDING_STAGE_WALLET_READY = 8,
|
|
3724
|
+
DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP_PROMPT = 9,
|
|
3725
|
+
DEV_ONBOARDING_STAGE_SELECT_SEEDCARD_BACKUP_METHOD = 10,
|
|
3726
|
+
DEV_ONBOARDING_STAGE_SEEDCARD_BACKUP = 11,
|
|
3727
|
+
DEV_ONBOARDING_STAGE_DONE = 12
|
|
3728
|
+
}
|
|
3729
|
+
export type DevGetOnboardingStatus = {};
|
|
3730
|
+
export type DevOnboardingStatus = {
|
|
3731
|
+
stage: DevOnboardingStage;
|
|
3732
|
+
status_code?: number;
|
|
3733
|
+
detail_code?: number;
|
|
3557
3734
|
};
|
|
3558
|
-
export type
|
|
3735
|
+
export type FilesystemPermissionFix = {};
|
|
3559
3736
|
export type FilesystemPathInfo = {
|
|
3560
3737
|
exist: boolean;
|
|
3561
3738
|
size: number;
|
|
@@ -3611,32 +3788,11 @@ export type FilesystemDirMake = {
|
|
|
3611
3788
|
export type FilesystemDirRemove = {
|
|
3612
3789
|
path: string;
|
|
3613
3790
|
};
|
|
3614
|
-
export type FilesystemFormat = {
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
ONBOARDING_STEP_DEVICE_VERIFICATION = 1,
|
|
3618
|
-
ONBOARDING_STEP_PERSONALIZATION = 2,
|
|
3619
|
-
ONBOARDING_STEP_SETUP = 3,
|
|
3620
|
-
ONBOARDING_STEP_FIRMWARE = 4
|
|
3621
|
-
}
|
|
3622
|
-
export type GetOnboardingStatus = {};
|
|
3623
|
-
export type NewDevice = {
|
|
3624
|
-
seedcard_backup?: boolean;
|
|
3625
|
-
};
|
|
3626
|
-
export type Restore = {
|
|
3627
|
-
mnemonic?: boolean;
|
|
3628
|
-
seedcard?: boolean;
|
|
3629
|
-
};
|
|
3630
|
-
export type Setup = {
|
|
3631
|
-
new_device?: NewDevice;
|
|
3632
|
-
restore?: Restore;
|
|
3633
|
-
};
|
|
3634
|
-
export type OnboardingStatus = {
|
|
3635
|
-
step: OnboardingStep;
|
|
3636
|
-
setup?: Setup;
|
|
3637
|
-
detail_code?: number;
|
|
3638
|
-
detail_str?: string;
|
|
3791
|
+
export type FilesystemFormat = {
|
|
3792
|
+
data: boolean;
|
|
3793
|
+
user: boolean;
|
|
3639
3794
|
};
|
|
3795
|
+
export type PortfolioUpdate = {};
|
|
3640
3796
|
export type MessageType = {
|
|
3641
3797
|
AlephiumGetAddress: AlephiumGetAddress;
|
|
3642
3798
|
AlephiumAddress: AlephiumAddress;
|
|
@@ -4200,8 +4356,9 @@ export type MessageType = {
|
|
|
4200
4356
|
CoinPurchaseMemo: CoinPurchaseMemo;
|
|
4201
4357
|
PaymentRequestMemo: PaymentRequestMemo;
|
|
4202
4358
|
TxAckPaymentRequest: TxAckPaymentRequest;
|
|
4203
|
-
|
|
4359
|
+
EthereumSignTypedDataQR: EthereumSignTypedDataQR;
|
|
4204
4360
|
InternalMyAddressRequest: InternalMyAddressRequest;
|
|
4361
|
+
StartSession: StartSession;
|
|
4205
4362
|
SetBusy: SetBusy;
|
|
4206
4363
|
GetFirmwareHash: GetFirmwareHash;
|
|
4207
4364
|
FirmwareHash: FirmwareHash;
|
|
@@ -4216,30 +4373,50 @@ export type MessageType = {
|
|
|
4216
4373
|
ViewAmount: ViewAmount;
|
|
4217
4374
|
ViewDetail: ViewDetail;
|
|
4218
4375
|
ViewTip: ViewTip;
|
|
4376
|
+
ViewRawData: ViewRawData;
|
|
4219
4377
|
ViewSignPage: ViewSignPage;
|
|
4220
4378
|
ViewVerifyPage: ViewVerifyPage;
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4379
|
+
ProtocolInfoRequest: ProtocolInfoRequest;
|
|
4380
|
+
ProtocolInfo: ProtocolInfo;
|
|
4381
|
+
DeviceReboot: DeviceReboot;
|
|
4382
|
+
DeviceSettings: DeviceSettings;
|
|
4383
|
+
DeviceSettingsGet: DeviceSettingsGet;
|
|
4384
|
+
DeviceSettingsSet: DeviceSettingsSet;
|
|
4385
|
+
DeviceSettingsPageShow: DeviceSettingsPageShow;
|
|
4386
|
+
DeviceCertificate: DeviceCertificate;
|
|
4387
|
+
DeviceCertificateWrite: DeviceCertificateWrite;
|
|
4388
|
+
DeviceCertificateRead: DeviceCertificateRead;
|
|
4389
|
+
DeviceCertificateSignature: DeviceCertificateSignature;
|
|
4390
|
+
DeviceCertificateSign: DeviceCertificateSign;
|
|
4391
|
+
DeviceFirmwareTarget: DeviceFirmwareTarget;
|
|
4392
|
+
DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
|
|
4393
|
+
DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
|
|
4394
|
+
DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
|
|
4395
|
+
DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
|
|
4396
|
+
DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
|
|
4397
|
+
DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
|
|
4398
|
+
DeviceFactoryInfo: DeviceFactoryInfo;
|
|
4399
|
+
DeviceFactoryInfoSet: DeviceFactoryInfoSet;
|
|
4400
|
+
DeviceFactoryInfoGet: DeviceFactoryInfoGet;
|
|
4401
|
+
DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
|
|
4402
|
+
DeviceFactoryTest: DeviceFactoryTest;
|
|
4403
|
+
DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
|
|
4404
|
+
DeviceHardwareInfo: DeviceHardwareInfo;
|
|
4405
|
+
DeviceMainMcuInfo: DeviceMainMcuInfo;
|
|
4406
|
+
DeviceCoprocessorInfo: DeviceCoprocessorInfo;
|
|
4407
|
+
DeviceSEInfo: DeviceSEInfo;
|
|
4408
|
+
DeviceInfoTargets: DeviceInfoTargets;
|
|
4409
|
+
DeviceInfoTypes: DeviceInfoTypes;
|
|
4410
|
+
DeviceInfoGet: DeviceInfoGet;
|
|
4411
|
+
DeviceSessionGet: DeviceSessionGet;
|
|
4412
|
+
DeviceSession: DeviceSession;
|
|
4413
|
+
DeviceSessionAskPin: DeviceSessionAskPin;
|
|
4414
|
+
DeviceSessionPinResult: DeviceSessionPinResult;
|
|
4415
|
+
DeviceStatus: DeviceStatus;
|
|
4416
|
+
DeviceStatusGet: DeviceStatusGet;
|
|
4417
|
+
DevGetOnboardingStatus: DevGetOnboardingStatus;
|
|
4418
|
+
DevOnboardingStatus: DevOnboardingStatus;
|
|
4419
|
+
FilesystemPermissionFix: FilesystemPermissionFix;
|
|
4243
4420
|
FilesystemPathInfo: FilesystemPathInfo;
|
|
4244
4421
|
FilesystemPathInfoQuery: FilesystemPathInfoQuery;
|
|
4245
4422
|
FilesystemFile: FilesystemFile;
|
|
@@ -4251,11 +4428,7 @@ export type MessageType = {
|
|
|
4251
4428
|
FilesystemDirMake: FilesystemDirMake;
|
|
4252
4429
|
FilesystemDirRemove: FilesystemDirRemove;
|
|
4253
4430
|
FilesystemFormat: FilesystemFormat;
|
|
4254
|
-
|
|
4255
|
-
NewDevice: NewDevice;
|
|
4256
|
-
Restore: Restore;
|
|
4257
|
-
Setup: Setup;
|
|
4258
|
-
OnboardingStatus: OnboardingStatus;
|
|
4431
|
+
PortfolioUpdate: PortfolioUpdate;
|
|
4259
4432
|
};
|
|
4260
4433
|
export type MessageKey = keyof MessageType;
|
|
4261
4434
|
export type MessageResponse<T extends MessageKey> = {
|