@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/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,6 +3351,17 @@ export type TxAckPaymentRequest = {
|
|
|
3325
3351
|
amount?: UintType;
|
|
3326
3352
|
signature: string;
|
|
3327
3353
|
};
|
|
3354
|
+
export type InternalMyAddressRequest = {
|
|
3355
|
+
coin_type: number;
|
|
3356
|
+
chain_id: number;
|
|
3357
|
+
account_index: number;
|
|
3358
|
+
derive_type: number;
|
|
3359
|
+
};
|
|
3360
|
+
export type StartSession = {
|
|
3361
|
+
session_id?: string;
|
|
3362
|
+
_skip_passphrase?: boolean;
|
|
3363
|
+
derive_cardano?: boolean;
|
|
3364
|
+
};
|
|
3328
3365
|
export type SetBusy = {
|
|
3329
3366
|
expiry_ms?: number;
|
|
3330
3367
|
};
|
|
@@ -3341,6 +3378,21 @@ export type Nonce = {
|
|
|
3341
3378
|
export type WriteSEPrivateKey = {
|
|
3342
3379
|
private_key: string;
|
|
3343
3380
|
};
|
|
3381
|
+
export declare enum WallpaperTarget {
|
|
3382
|
+
Home = 0,
|
|
3383
|
+
Lock = 1
|
|
3384
|
+
}
|
|
3385
|
+
export type SetWallpaper = {
|
|
3386
|
+
target: WallpaperTarget;
|
|
3387
|
+
path: string;
|
|
3388
|
+
};
|
|
3389
|
+
export type GetWallpaper = {
|
|
3390
|
+
target: WallpaperTarget;
|
|
3391
|
+
};
|
|
3392
|
+
export type Wallpaper = {
|
|
3393
|
+
target: WallpaperTarget;
|
|
3394
|
+
path: string;
|
|
3395
|
+
};
|
|
3344
3396
|
export type UnlockPath = {
|
|
3345
3397
|
address_n: number[];
|
|
3346
3398
|
mac?: string;
|
|
@@ -3354,225 +3406,251 @@ export declare enum MoneroNetworkType {
|
|
|
3354
3406
|
STAGENET = 2,
|
|
3355
3407
|
FAKECHAIN = 3
|
|
3356
3408
|
}
|
|
3357
|
-
export type
|
|
3409
|
+
export type ViewAmount = {
|
|
3410
|
+
is_unlimited: boolean;
|
|
3358
3411
|
num: string;
|
|
3359
|
-
decimals: number;
|
|
3360
|
-
symbol: string;
|
|
3361
|
-
};
|
|
3362
|
-
export type TxDetailsAddress = {
|
|
3363
|
-
key: number;
|
|
3364
|
-
address: string;
|
|
3365
|
-
owner?: string;
|
|
3366
|
-
icon?: string;
|
|
3367
3412
|
};
|
|
3368
|
-
export type
|
|
3369
|
-
coin_type: number;
|
|
3370
|
-
chain_id?: number;
|
|
3371
|
-
};
|
|
3372
|
-
export type TxDetailsGeneral = {
|
|
3413
|
+
export type ViewDetail = {
|
|
3373
3414
|
key: number;
|
|
3374
3415
|
value: string;
|
|
3375
3416
|
is_overview: boolean;
|
|
3417
|
+
has_icon: boolean;
|
|
3376
3418
|
};
|
|
3377
|
-
export declare enum
|
|
3378
|
-
|
|
3379
|
-
|
|
3419
|
+
export declare enum ViewTipType {
|
|
3420
|
+
Default = 0,
|
|
3421
|
+
Highlight = 1,
|
|
3422
|
+
Recommend = 2,
|
|
3423
|
+
Warning = 3,
|
|
3424
|
+
Danger = 4
|
|
3380
3425
|
}
|
|
3381
|
-
export type
|
|
3426
|
+
export type ViewTip = {
|
|
3427
|
+
type: ViewTipType;
|
|
3428
|
+
text: string;
|
|
3429
|
+
};
|
|
3430
|
+
export type ViewSignPage = {
|
|
3382
3431
|
title: string;
|
|
3383
|
-
display_type: TxDetailsDisplayType;
|
|
3384
3432
|
amount?: UintType;
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
general: TxDetailsGeneral[];
|
|
3433
|
+
general: ViewDetail[];
|
|
3434
|
+
tip?: ViewTip;
|
|
3388
3435
|
};
|
|
3389
|
-
export type
|
|
3390
|
-
|
|
3391
|
-
|
|
3436
|
+
export type ViewVerifyPage = {
|
|
3437
|
+
title: string;
|
|
3438
|
+
address: string;
|
|
3439
|
+
path: string;
|
|
3440
|
+
};
|
|
3441
|
+
export type ProtocolInfoRequest = {};
|
|
3442
|
+
export type ProtocolInfo = {
|
|
3443
|
+
version: number;
|
|
3444
|
+
supported_messages: number[];
|
|
3445
|
+
protobuf_definition?: string;
|
|
3392
3446
|
};
|
|
3393
|
-
export declare enum DevRebootType {
|
|
3394
|
-
Normal = 0,
|
|
3395
|
-
Boardloader = 1,
|
|
3396
|
-
Bootloader = 2
|
|
3397
|
-
}
|
|
3398
3447
|
export declare enum DeviceRebootType {
|
|
3399
3448
|
Normal = 0,
|
|
3400
3449
|
Romloader = 1,
|
|
3401
3450
|
Bootloader = 2
|
|
3402
3451
|
}
|
|
3403
|
-
export type DevReboot = {
|
|
3404
|
-
reboot_type: DevRebootType;
|
|
3405
|
-
};
|
|
3406
3452
|
export type DeviceReboot = {
|
|
3407
3453
|
reboot_type: DeviceRebootType;
|
|
3408
3454
|
};
|
|
3455
|
+
export type DeviceSettings = {
|
|
3456
|
+
label?: string;
|
|
3457
|
+
bt_enable?: boolean;
|
|
3458
|
+
language?: string;
|
|
3459
|
+
};
|
|
3460
|
+
export type DeviceSettingsGet = {};
|
|
3461
|
+
export type DeviceSettingsSet = {
|
|
3462
|
+
settings: DeviceSettings;
|
|
3463
|
+
};
|
|
3464
|
+
export type DeviceCertificate = {
|
|
3465
|
+
cert_and_pubkey: string;
|
|
3466
|
+
private_key?: string;
|
|
3467
|
+
};
|
|
3468
|
+
export type DeviceCertificateWrite = {
|
|
3469
|
+
cert: DeviceCertificate;
|
|
3470
|
+
};
|
|
3471
|
+
export type DeviceCertificateRead = {};
|
|
3472
|
+
export type DeviceCertificateSignature = {
|
|
3473
|
+
data: string;
|
|
3474
|
+
};
|
|
3475
|
+
export type DeviceCertificateSign = {
|
|
3476
|
+
data: string;
|
|
3477
|
+
};
|
|
3478
|
+
export declare enum DeviceFirmwareTargetType {
|
|
3479
|
+
FW_MGMT_TARGET_INVALID = 0,
|
|
3480
|
+
FW_MGMT_TARGET_CRATE = 1,
|
|
3481
|
+
FW_MGMT_TARGET_ROMLOADER = 2,
|
|
3482
|
+
FW_MGMT_TARGET_BOOTLOADER = 3,
|
|
3483
|
+
FW_MGMT_TARGET_APPLICATION_P1 = 4,
|
|
3484
|
+
FW_MGMT_TARGET_APPLICATION_P2 = 5,
|
|
3485
|
+
FW_MGMT_TARGET_COPROCESSOR = 6,
|
|
3486
|
+
FW_MGMT_TARGET_SE01 = 7,
|
|
3487
|
+
FW_MGMT_TARGET_SE02 = 8,
|
|
3488
|
+
FW_MGMT_TARGET_SE03 = 9,
|
|
3489
|
+
FW_MGMT_TARGET_SE04 = 10
|
|
3490
|
+
}
|
|
3491
|
+
export declare enum DeviceFirmwareUpdateTaskStatus {
|
|
3492
|
+
FW_MGMT_UPDATER_TASK_STATUS_PENDING = 0,
|
|
3493
|
+
FW_MGMT_UPDATER_TASK_STATUS_IN_PROGRESS = 1,
|
|
3494
|
+
FW_MGMT_UPDATER_TASK_STATUS_FINISHED = 2,
|
|
3495
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_NOT_FOUND = 3,
|
|
3496
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_READ = 4,
|
|
3497
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_FILE_WRITE = 5,
|
|
3498
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_VERIFY = 6,
|
|
3499
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_INSTALL = 7,
|
|
3500
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ABORT = 8,
|
|
3501
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY = 9,
|
|
3502
|
+
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS = 10
|
|
3503
|
+
}
|
|
3504
|
+
export type DeviceFirmwareTarget = {
|
|
3505
|
+
target_id: DeviceFirmwareTargetType;
|
|
3506
|
+
path: string;
|
|
3507
|
+
};
|
|
3508
|
+
export type DeviceFirmwareUpdateRequest = {
|
|
3509
|
+
targets: DeviceFirmwareTarget[];
|
|
3510
|
+
};
|
|
3511
|
+
export type DeviceFirmwareUpdateRecord = {
|
|
3512
|
+
target_id: DeviceFirmwareTargetType;
|
|
3513
|
+
status?: DeviceFirmwareUpdateTaskStatus;
|
|
3514
|
+
payload_version?: number;
|
|
3515
|
+
path?: string;
|
|
3516
|
+
};
|
|
3517
|
+
export type DeviceFirmwareUpdateRecordFields = {
|
|
3518
|
+
status?: boolean;
|
|
3519
|
+
payload_version?: boolean;
|
|
3520
|
+
path?: boolean;
|
|
3521
|
+
};
|
|
3522
|
+
export type DeviceFirmwareUpdateStatusGet = {
|
|
3523
|
+
fields?: DeviceFirmwareUpdateRecordFields;
|
|
3524
|
+
};
|
|
3525
|
+
export type DeviceFirmwareUpdateStatus = {
|
|
3526
|
+
records: DeviceFirmwareUpdateRecord[];
|
|
3527
|
+
};
|
|
3528
|
+
export declare enum DeviceFactoryAck {
|
|
3529
|
+
FACTORY_ACK_SUCCESS = 0,
|
|
3530
|
+
FACTORY_ACK_FAIL = 1
|
|
3531
|
+
}
|
|
3532
|
+
export type DeviceFactoryInfoManufactureTime = {
|
|
3533
|
+
year: number;
|
|
3534
|
+
month: number;
|
|
3535
|
+
day: number;
|
|
3536
|
+
hour: number;
|
|
3537
|
+
minute: number;
|
|
3538
|
+
second: number;
|
|
3539
|
+
};
|
|
3540
|
+
export type DeviceFactoryInfo = {
|
|
3541
|
+
version?: number;
|
|
3542
|
+
serial_number?: string;
|
|
3543
|
+
burn_in_completed?: boolean;
|
|
3544
|
+
factory_test_completed?: boolean;
|
|
3545
|
+
manufacture_time?: DeviceFactoryInfoManufactureTime;
|
|
3546
|
+
};
|
|
3547
|
+
export type DeviceFactoryInfoSet = {
|
|
3548
|
+
info: DeviceFactoryInfo;
|
|
3549
|
+
};
|
|
3550
|
+
export type DeviceFactoryInfoGet = {};
|
|
3551
|
+
export type DeviceFactoryPermanentLock = {
|
|
3552
|
+
check_a: string;
|
|
3553
|
+
check_b: string;
|
|
3554
|
+
};
|
|
3555
|
+
export type DeviceFactoryTest = {
|
|
3556
|
+
burn_in_test: boolean;
|
|
3557
|
+
};
|
|
3409
3558
|
export declare enum DeviceType {
|
|
3410
3559
|
CLASSIC1 = 0,
|
|
3411
3560
|
CLASSIC1S = 1,
|
|
3412
3561
|
MINI = 2,
|
|
3413
3562
|
TOUCH = 3,
|
|
3414
3563
|
PRO = 5,
|
|
3415
|
-
CLASSIC1S_PURE = 6
|
|
3564
|
+
CLASSIC1S_PURE = 6,
|
|
3565
|
+
PRO2 = 7,
|
|
3566
|
+
NEO = 8
|
|
3416
3567
|
}
|
|
3417
|
-
export declare enum
|
|
3568
|
+
export declare enum DeviceSeType {
|
|
3418
3569
|
THD89 = 0,
|
|
3419
3570
|
SE608A = 1
|
|
3420
3571
|
}
|
|
3421
|
-
export declare enum
|
|
3572
|
+
export declare enum DeviceSEState {
|
|
3422
3573
|
BOOT = 0,
|
|
3423
3574
|
APP_FACTORY = 51,
|
|
3424
3575
|
APP = 85
|
|
3425
3576
|
}
|
|
3426
|
-
export type
|
|
3577
|
+
export type DeviceFirmwareImageInfo = {
|
|
3427
3578
|
version?: string;
|
|
3428
3579
|
build_id?: string;
|
|
3429
3580
|
hash?: string;
|
|
3430
3581
|
};
|
|
3431
|
-
export type
|
|
3432
|
-
|
|
3582
|
+
export type DeviceHardwareInfo = {
|
|
3583
|
+
Device_type?: DeviceType;
|
|
3433
3584
|
serial_no?: string;
|
|
3434
3585
|
hardware_version?: string;
|
|
3435
3586
|
hardware_version_raw_adc?: number;
|
|
3436
3587
|
};
|
|
3437
|
-
export type
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3588
|
+
export type DeviceMainMcuInfo = {
|
|
3589
|
+
romloader?: DeviceFirmwareImageInfo;
|
|
3590
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
3591
|
+
application?: DeviceFirmwareImageInfo;
|
|
3592
|
+
application_data?: DeviceFirmwareImageInfo;
|
|
3593
|
+
};
|
|
3594
|
+
export type DeviceCoprocessorInfo = {
|
|
3595
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
3596
|
+
application?: DeviceFirmwareImageInfo;
|
|
3597
|
+
bt_adv_name?: string;
|
|
3598
|
+
bt_mac?: string;
|
|
3599
|
+
};
|
|
3600
|
+
export type DeviceSEInfo = {
|
|
3601
|
+
bootloader?: DeviceFirmwareImageInfo;
|
|
3602
|
+
application?: DeviceFirmwareImageInfo;
|
|
3603
|
+
type?: DeviceSeType;
|
|
3604
|
+
state?: DeviceSEState;
|
|
3605
|
+
};
|
|
3606
|
+
export type DeviceInfoTargets = {
|
|
3455
3607
|
hw?: boolean;
|
|
3456
3608
|
fw?: boolean;
|
|
3457
|
-
|
|
3609
|
+
coprocessor?: boolean;
|
|
3458
3610
|
se1?: boolean;
|
|
3459
3611
|
se2?: boolean;
|
|
3460
3612
|
se3?: boolean;
|
|
3461
3613
|
se4?: boolean;
|
|
3462
3614
|
status?: boolean;
|
|
3463
3615
|
};
|
|
3464
|
-
export type
|
|
3616
|
+
export type DeviceInfoTypes = {
|
|
3465
3617
|
version?: boolean;
|
|
3466
3618
|
build_id?: boolean;
|
|
3467
3619
|
hash?: boolean;
|
|
3468
3620
|
specific?: boolean;
|
|
3469
3621
|
};
|
|
3470
|
-
export type
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
init_states?: boolean;
|
|
3474
|
-
backup_required?: boolean;
|
|
3475
|
-
passphrase_protection?: boolean;
|
|
3476
|
-
label?: string;
|
|
3477
|
-
};
|
|
3478
|
-
export type DevGetDeviceInfo = {
|
|
3479
|
-
targets?: DevInfoTargets;
|
|
3480
|
-
types?: DevInfoTypes;
|
|
3622
|
+
export type DeviceInfoGet = {
|
|
3623
|
+
targets?: DeviceInfoTargets;
|
|
3624
|
+
types?: DeviceInfoTypes;
|
|
3481
3625
|
};
|
|
3482
|
-
export type DeviceGetDeviceInfo = DevGetDeviceInfo;
|
|
3483
3626
|
export type ProtocolV2DeviceInfo = {
|
|
3484
3627
|
protocol_version: number;
|
|
3485
|
-
hw?:
|
|
3486
|
-
fw?:
|
|
3487
|
-
|
|
3488
|
-
se1?:
|
|
3489
|
-
se2?:
|
|
3490
|
-
se3?:
|
|
3491
|
-
se4?:
|
|
3492
|
-
status?:
|
|
3493
|
-
};
|
|
3494
|
-
export
|
|
3495
|
-
|
|
3496
|
-
TARGET_ROMLOADER = 1,
|
|
3497
|
-
TARGET_BOOTLOADER = 2,
|
|
3498
|
-
TARGET_APPLICATION_P1 = 3,
|
|
3499
|
-
TARGET_APPLICATION_P2 = 4,
|
|
3500
|
-
TARGET_COPROCESSOR = 5,
|
|
3501
|
-
TARGET_SE01 = 6,
|
|
3502
|
-
TARGET_SE02 = 7,
|
|
3503
|
-
TARGET_SE03 = 8,
|
|
3504
|
-
TARGET_SE04 = 9,
|
|
3505
|
-
TARGET_RESOURCE = 10
|
|
3506
|
-
}
|
|
3507
|
-
export declare enum DeviceFirmwareTargetType {
|
|
3508
|
-
TARGET_INVALID = 0,
|
|
3509
|
-
TARGET_ROMLOADER = 1,
|
|
3510
|
-
TARGET_BOOTLOADER = 2,
|
|
3511
|
-
TARGET_APPLICATION_P1 = 3,
|
|
3512
|
-
TARGET_APPLICATION_P2 = 4,
|
|
3513
|
-
TARGET_COPROCESSOR = 5,
|
|
3514
|
-
TARGET_SE01 = 6,
|
|
3515
|
-
TARGET_SE02 = 7,
|
|
3516
|
-
TARGET_SE03 = 8,
|
|
3517
|
-
TARGET_SE04 = 9,
|
|
3518
|
-
TARGET_RESOURCE = 10
|
|
3519
|
-
}
|
|
3520
|
-
export type DevFirmwareTarget = {
|
|
3521
|
-
target_id: DevFirmwareTargetType;
|
|
3522
|
-
path: string;
|
|
3523
|
-
};
|
|
3524
|
-
export type DeviceFirmwareTarget = {
|
|
3525
|
-
target_id: DeviceFirmwareTargetType;
|
|
3526
|
-
path: string;
|
|
3527
|
-
};
|
|
3528
|
-
export type DevFirmwareUpdate = {
|
|
3529
|
-
targets: DevFirmwareTarget[];
|
|
3530
|
-
};
|
|
3531
|
-
export type DeviceFirmwareUpdate = {
|
|
3532
|
-
targets: DeviceFirmwareTarget[];
|
|
3533
|
-
max_concurrent?: number;
|
|
3534
|
-
};
|
|
3535
|
-
export type DevFirmwareInstallProgress = {
|
|
3536
|
-
target_id: DevFirmwareTargetType;
|
|
3537
|
-
progress: number;
|
|
3538
|
-
stage?: string;
|
|
3539
|
-
};
|
|
3540
|
-
export type DeviceFirmwareInstallProgress = {
|
|
3541
|
-
target_id: DeviceFirmwareTargetType;
|
|
3542
|
-
progress: number;
|
|
3543
|
-
stage?: string;
|
|
3544
|
-
};
|
|
3545
|
-
export type DevFirmwareUpdateStatusEntry = {
|
|
3546
|
-
target_id: DevFirmwareTargetType;
|
|
3547
|
-
status: number;
|
|
3548
|
-
};
|
|
3549
|
-
export type DeviceFirmwareUpdateStatusEntry = {
|
|
3550
|
-
target_id: DeviceFirmwareTargetType;
|
|
3551
|
-
status: number;
|
|
3552
|
-
};
|
|
3553
|
-
export type DevGetFirmwareUpdateStatus = {};
|
|
3554
|
-
export type DeviceGetFirmwareUpdateStatus = {};
|
|
3555
|
-
export type DevFirmwareUpdateStatus = {
|
|
3556
|
-
targets: DevFirmwareUpdateStatusEntry[];
|
|
3557
|
-
};
|
|
3558
|
-
export type DeviceFirmwareUpdateStatus = {
|
|
3559
|
-
targets: DeviceFirmwareUpdateStatusEntry[];
|
|
3628
|
+
hw?: DeviceHardwareInfo;
|
|
3629
|
+
fw?: DeviceMainMcuInfo;
|
|
3630
|
+
coprocessor?: DeviceCoprocessorInfo;
|
|
3631
|
+
se1?: DeviceSEInfo;
|
|
3632
|
+
se2?: DeviceSEInfo;
|
|
3633
|
+
se3?: DeviceSEInfo;
|
|
3634
|
+
se4?: DeviceSEInfo;
|
|
3635
|
+
status?: DeviceStatus;
|
|
3636
|
+
};
|
|
3637
|
+
export type DeviceSessionGet = {
|
|
3638
|
+
session_id?: string;
|
|
3560
3639
|
};
|
|
3561
|
-
export type
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
pre_firmware?: string;
|
|
3640
|
+
export type DeviceSession = {
|
|
3641
|
+
session_id?: string;
|
|
3642
|
+
btc_test_address?: string;
|
|
3565
3643
|
};
|
|
3566
|
-
export type
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3644
|
+
export type DeviceStatus = {
|
|
3645
|
+
device_id?: string;
|
|
3646
|
+
unlocked?: boolean;
|
|
3647
|
+
init_states?: boolean;
|
|
3648
|
+
backup_required?: boolean;
|
|
3649
|
+
passphrase_enabled?: boolean;
|
|
3650
|
+
attach_to_pin_enabled?: boolean;
|
|
3651
|
+
unlocked_by_attach_to_pin?: boolean;
|
|
3574
3652
|
};
|
|
3575
|
-
export type
|
|
3653
|
+
export type FilesystemPermissionFix = {};
|
|
3576
3654
|
export type FilesystemPathInfo = {
|
|
3577
3655
|
exist: boolean;
|
|
3578
3656
|
size: number;
|
|
@@ -3629,31 +3707,6 @@ export type FilesystemDirRemove = {
|
|
|
3629
3707
|
path: string;
|
|
3630
3708
|
};
|
|
3631
3709
|
export type FilesystemFormat = {};
|
|
3632
|
-
export declare enum OnboardingStep {
|
|
3633
|
-
ONBOARDING_STEP_UNKNOWN = 0,
|
|
3634
|
-
ONBOARDING_STEP_DEVICE_VERIFICATION = 1,
|
|
3635
|
-
ONBOARDING_STEP_PERSONALIZATION = 2,
|
|
3636
|
-
ONBOARDING_STEP_SETUP = 3,
|
|
3637
|
-
ONBOARDING_STEP_FIRMWARE = 4
|
|
3638
|
-
}
|
|
3639
|
-
export type GetOnboardingStatus = {};
|
|
3640
|
-
export type NewDevice = {
|
|
3641
|
-
seedcard_backup?: boolean;
|
|
3642
|
-
};
|
|
3643
|
-
export type Restore = {
|
|
3644
|
-
mnemonic?: boolean;
|
|
3645
|
-
seedcard?: boolean;
|
|
3646
|
-
};
|
|
3647
|
-
export type Setup = {
|
|
3648
|
-
new_device?: NewDevice;
|
|
3649
|
-
restore?: Restore;
|
|
3650
|
-
};
|
|
3651
|
-
export type OnboardingStatus = {
|
|
3652
|
-
step: OnboardingStep;
|
|
3653
|
-
setup?: Setup;
|
|
3654
|
-
detail_code?: number;
|
|
3655
|
-
detail_str?: string;
|
|
3656
|
-
};
|
|
3657
3710
|
export type MessageType = {
|
|
3658
3711
|
AlephiumGetAddress: AlephiumGetAddress;
|
|
3659
3712
|
AlephiumAddress: AlephiumAddress;
|
|
@@ -4217,49 +4270,59 @@ export type MessageType = {
|
|
|
4217
4270
|
CoinPurchaseMemo: CoinPurchaseMemo;
|
|
4218
4271
|
PaymentRequestMemo: PaymentRequestMemo;
|
|
4219
4272
|
TxAckPaymentRequest: TxAckPaymentRequest;
|
|
4273
|
+
InternalMyAddressRequest: InternalMyAddressRequest;
|
|
4274
|
+
StartSession: StartSession;
|
|
4220
4275
|
SetBusy: SetBusy;
|
|
4221
4276
|
GetFirmwareHash: GetFirmwareHash;
|
|
4222
4277
|
FirmwareHash: FirmwareHash;
|
|
4223
4278
|
GetNonce: GetNonce;
|
|
4224
4279
|
Nonce: Nonce;
|
|
4225
4280
|
WriteSEPrivateKey: WriteSEPrivateKey;
|
|
4281
|
+
SetWallpaper: SetWallpaper;
|
|
4282
|
+
GetWallpaper: GetWallpaper;
|
|
4283
|
+
Wallpaper: Wallpaper;
|
|
4226
4284
|
UnlockPath: UnlockPath;
|
|
4227
4285
|
UnlockedPathRequest: UnlockedPathRequest;
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
DevReboot: DevReboot;
|
|
4286
|
+
ViewAmount: ViewAmount;
|
|
4287
|
+
ViewDetail: ViewDetail;
|
|
4288
|
+
ViewTip: ViewTip;
|
|
4289
|
+
ViewSignPage: ViewSignPage;
|
|
4290
|
+
ViewVerifyPage: ViewVerifyPage;
|
|
4291
|
+
ProtocolInfoRequest: ProtocolInfoRequest;
|
|
4292
|
+
ProtocolInfo: ProtocolInfo;
|
|
4236
4293
|
DeviceReboot: DeviceReboot;
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
DevGetDeviceInfo: DevGetDeviceInfo;
|
|
4246
|
-
DeviceGetDeviceInfo: DeviceGetDeviceInfo;
|
|
4247
|
-
DevFirmwareTarget: DevFirmwareTarget;
|
|
4294
|
+
DeviceSettings: DeviceSettings;
|
|
4295
|
+
DeviceSettingsGet: DeviceSettingsGet;
|
|
4296
|
+
DeviceSettingsSet: DeviceSettingsSet;
|
|
4297
|
+
DeviceCertificate: DeviceCertificate;
|
|
4298
|
+
DeviceCertificateWrite: DeviceCertificateWrite;
|
|
4299
|
+
DeviceCertificateRead: DeviceCertificateRead;
|
|
4300
|
+
DeviceCertificateSignature: DeviceCertificateSignature;
|
|
4301
|
+
DeviceCertificateSign: DeviceCertificateSign;
|
|
4248
4302
|
DeviceFirmwareTarget: DeviceFirmwareTarget;
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
DevFirmwareUpdateStatusEntry: DevFirmwareUpdateStatusEntry;
|
|
4254
|
-
DeviceFirmwareUpdateStatusEntry: DeviceFirmwareUpdateStatusEntry;
|
|
4255
|
-
DevGetFirmwareUpdateStatus: DevGetFirmwareUpdateStatus;
|
|
4256
|
-
DeviceGetFirmwareUpdateStatus: DeviceGetFirmwareUpdateStatus;
|
|
4257
|
-
DevFirmwareUpdateStatus: DevFirmwareUpdateStatus;
|
|
4303
|
+
DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
|
|
4304
|
+
DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
|
|
4305
|
+
DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
|
|
4306
|
+
DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
|
|
4258
4307
|
DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4308
|
+
DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
|
|
4309
|
+
DeviceFactoryInfo: DeviceFactoryInfo;
|
|
4310
|
+
DeviceFactoryInfoSet: DeviceFactoryInfoSet;
|
|
4311
|
+
DeviceFactoryInfoGet: DeviceFactoryInfoGet;
|
|
4312
|
+
DeviceFactoryPermanentLock: DeviceFactoryPermanentLock;
|
|
4313
|
+
DeviceFactoryTest: DeviceFactoryTest;
|
|
4314
|
+
DeviceFirmwareImageInfo: DeviceFirmwareImageInfo;
|
|
4315
|
+
DeviceHardwareInfo: DeviceHardwareInfo;
|
|
4316
|
+
DeviceMainMcuInfo: DeviceMainMcuInfo;
|
|
4317
|
+
DeviceCoprocessorInfo: DeviceCoprocessorInfo;
|
|
4318
|
+
DeviceSEInfo: DeviceSEInfo;
|
|
4319
|
+
DeviceInfoTargets: DeviceInfoTargets;
|
|
4320
|
+
DeviceInfoTypes: DeviceInfoTypes;
|
|
4321
|
+
DeviceInfoGet: DeviceInfoGet;
|
|
4322
|
+
DeviceSessionGet: DeviceSessionGet;
|
|
4323
|
+
DeviceSession: DeviceSession;
|
|
4324
|
+
DeviceStatus: DeviceStatus;
|
|
4325
|
+
FilesystemPermissionFix: FilesystemPermissionFix;
|
|
4263
4326
|
FilesystemPathInfo: FilesystemPathInfo;
|
|
4264
4327
|
FilesystemPathInfoQuery: FilesystemPathInfoQuery;
|
|
4265
4328
|
FilesystemFile: FilesystemFile;
|
|
@@ -4271,11 +4334,6 @@ export type MessageType = {
|
|
|
4271
4334
|
FilesystemDirMake: FilesystemDirMake;
|
|
4272
4335
|
FilesystemDirRemove: FilesystemDirRemove;
|
|
4273
4336
|
FilesystemFormat: FilesystemFormat;
|
|
4274
|
-
GetOnboardingStatus: GetOnboardingStatus;
|
|
4275
|
-
NewDevice: NewDevice;
|
|
4276
|
-
Restore: Restore;
|
|
4277
|
-
Setup: Setup;
|
|
4278
|
-
OnboardingStatus: OnboardingStatus;
|
|
4279
4337
|
};
|
|
4280
4338
|
export type MessageKey = keyof MessageType;
|
|
4281
4339
|
export type MessageResponse<T extends MessageKey> = {
|