@onekeyfe/hd-transport 1.2.0-alpha.1 → 1.2.0-alpha.2
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/dist/index.d.ts +124 -95
- package/dist/index.js +38 -22
- package/dist/types/messages.d.ts +88 -68
- package/dist/types/messages.d.ts.map +1 -1
- package/messages-protocol-v2.json +323 -329
- package/package.json +2 -2
- package/src/types/messages.ts +113 -86
package/dist/types/messages.d.ts
CHANGED
|
@@ -3325,19 +3325,6 @@ export type TxAckPaymentRequest = {
|
|
|
3325
3325
|
amount?: UintType;
|
|
3326
3326
|
signature: string;
|
|
3327
3327
|
};
|
|
3328
|
-
export type DebugLinkInput = {
|
|
3329
|
-
x?: number;
|
|
3330
|
-
y?: number;
|
|
3331
|
-
duration_ms?: number;
|
|
3332
|
-
x_end?: number;
|
|
3333
|
-
y_end?: number;
|
|
3334
|
-
};
|
|
3335
|
-
export type InternalMyAddressRequest = {
|
|
3336
|
-
coin_type: number;
|
|
3337
|
-
chain_id: number;
|
|
3338
|
-
account_index: number;
|
|
3339
|
-
derive_type: number;
|
|
3340
|
-
};
|
|
3341
3328
|
export type SetBusy = {
|
|
3342
3329
|
expiry_ms?: number;
|
|
3343
3330
|
};
|
|
@@ -3354,21 +3341,6 @@ export type Nonce = {
|
|
|
3354
3341
|
export type WriteSEPrivateKey = {
|
|
3355
3342
|
private_key: string;
|
|
3356
3343
|
};
|
|
3357
|
-
export declare enum WallpaperTarget {
|
|
3358
|
-
Home = 0,
|
|
3359
|
-
Lock = 1
|
|
3360
|
-
}
|
|
3361
|
-
export type SetWallpaper = {
|
|
3362
|
-
target: WallpaperTarget;
|
|
3363
|
-
path: string;
|
|
3364
|
-
};
|
|
3365
|
-
export type GetWallpaper = {
|
|
3366
|
-
target: WallpaperTarget;
|
|
3367
|
-
};
|
|
3368
|
-
export type Wallpaper = {
|
|
3369
|
-
target: WallpaperTarget;
|
|
3370
|
-
path: string;
|
|
3371
|
-
};
|
|
3372
3344
|
export type UnlockPath = {
|
|
3373
3345
|
address_n: number[];
|
|
3374
3346
|
mac?: string;
|
|
@@ -3382,37 +3354,37 @@ export declare enum MoneroNetworkType {
|
|
|
3382
3354
|
STAGENET = 2,
|
|
3383
3355
|
FAKECHAIN = 3
|
|
3384
3356
|
}
|
|
3385
|
-
export type
|
|
3386
|
-
is_unlimited: boolean;
|
|
3357
|
+
export type TxDetailsAmount = {
|
|
3387
3358
|
num: string;
|
|
3359
|
+
decimals: number;
|
|
3360
|
+
symbol: string;
|
|
3388
3361
|
};
|
|
3389
|
-
export type
|
|
3362
|
+
export type TxDetailsAddress = {
|
|
3363
|
+
key: number;
|
|
3364
|
+
address: string;
|
|
3365
|
+
owner?: string;
|
|
3366
|
+
icon?: string;
|
|
3367
|
+
};
|
|
3368
|
+
export type TxDetailsNetwork = {
|
|
3369
|
+
coin_type: number;
|
|
3370
|
+
chain_id?: number;
|
|
3371
|
+
};
|
|
3372
|
+
export type TxDetailsGeneral = {
|
|
3390
3373
|
key: number;
|
|
3391
3374
|
value: string;
|
|
3392
3375
|
is_overview: boolean;
|
|
3393
|
-
has_icon: boolean;
|
|
3394
3376
|
};
|
|
3395
|
-
export declare enum
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
Recommend = 2,
|
|
3399
|
-
Warning = 3,
|
|
3400
|
-
Danger = 4
|
|
3377
|
+
export declare enum TxDetailsDisplayType {
|
|
3378
|
+
DISPLAY_TYPE_INFO = 0,
|
|
3379
|
+
DISPLAY_TYPE_SIGN = 1
|
|
3401
3380
|
}
|
|
3402
|
-
export type
|
|
3403
|
-
type: ViewTipType;
|
|
3404
|
-
text: string;
|
|
3405
|
-
};
|
|
3406
|
-
export type ViewSignPage = {
|
|
3381
|
+
export type TxDetailsPage = {
|
|
3407
3382
|
title: string;
|
|
3383
|
+
display_type: TxDetailsDisplayType;
|
|
3408
3384
|
amount?: UintType;
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
export type ViewVerifyPage = {
|
|
3413
|
-
title: string;
|
|
3414
|
-
address: string;
|
|
3415
|
-
path: string;
|
|
3385
|
+
network?: TxDetailsNetwork;
|
|
3386
|
+
address: TxDetailsAddress[];
|
|
3387
|
+
general: TxDetailsGeneral[];
|
|
3416
3388
|
};
|
|
3417
3389
|
export type GetProtoVersion = {};
|
|
3418
3390
|
export type ProtoVersion = {
|
|
@@ -3423,9 +3395,17 @@ export declare enum DevRebootType {
|
|
|
3423
3395
|
Boardloader = 1,
|
|
3424
3396
|
Bootloader = 2
|
|
3425
3397
|
}
|
|
3398
|
+
export declare enum DeviceRebootType {
|
|
3399
|
+
Normal = 0,
|
|
3400
|
+
Romloader = 1,
|
|
3401
|
+
Bootloader = 2
|
|
3402
|
+
}
|
|
3426
3403
|
export type DevReboot = {
|
|
3427
3404
|
reboot_type: DevRebootType;
|
|
3428
3405
|
};
|
|
3406
|
+
export type DeviceReboot = {
|
|
3407
|
+
reboot_type: DeviceRebootType;
|
|
3408
|
+
};
|
|
3429
3409
|
export declare enum DeviceType {
|
|
3430
3410
|
CLASSIC1 = 0,
|
|
3431
3411
|
CLASSIC1S = 1,
|
|
@@ -3451,7 +3431,6 @@ export type DevFirmwareImageInfo = {
|
|
|
3451
3431
|
export type DevHardwareInfo = {
|
|
3452
3432
|
device_type?: DeviceType;
|
|
3453
3433
|
serial_no?: string;
|
|
3454
|
-
device_id?: string;
|
|
3455
3434
|
hardware_version?: string;
|
|
3456
3435
|
hardware_version_raw_adc?: number;
|
|
3457
3436
|
};
|
|
@@ -3500,6 +3479,7 @@ export type DevGetDeviceInfo = {
|
|
|
3500
3479
|
targets?: DevInfoTargets;
|
|
3501
3480
|
types?: DevInfoTypes;
|
|
3502
3481
|
};
|
|
3482
|
+
export type DeviceGetDeviceInfo = DevGetDeviceInfo;
|
|
3503
3483
|
export type ProtocolV2DeviceInfo = {
|
|
3504
3484
|
protocol_version: number;
|
|
3505
3485
|
hw?: DevHardwareInfo;
|
|
@@ -3512,35 +3492,72 @@ export type ProtocolV2DeviceInfo = {
|
|
|
3512
3492
|
status?: DevStatus;
|
|
3513
3493
|
};
|
|
3514
3494
|
export declare enum DevFirmwareTargetType {
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3495
|
+
TARGET_INVALID = 0,
|
|
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,
|
|
3522
3518
|
TARGET_RESOURCE = 10
|
|
3523
3519
|
}
|
|
3524
3520
|
export type DevFirmwareTarget = {
|
|
3525
3521
|
target_id: DevFirmwareTargetType;
|
|
3526
3522
|
path: string;
|
|
3527
3523
|
};
|
|
3524
|
+
export type DeviceFirmwareTarget = {
|
|
3525
|
+
target_id: DeviceFirmwareTargetType;
|
|
3526
|
+
path: string;
|
|
3527
|
+
};
|
|
3528
3528
|
export type DevFirmwareUpdate = {
|
|
3529
3529
|
targets: DevFirmwareTarget[];
|
|
3530
3530
|
};
|
|
3531
|
+
export type DeviceFirmwareUpdate = {
|
|
3532
|
+
targets: DeviceFirmwareTarget[];
|
|
3533
|
+
max_concurrent?: number;
|
|
3534
|
+
};
|
|
3531
3535
|
export type DevFirmwareInstallProgress = {
|
|
3532
3536
|
target_id: DevFirmwareTargetType;
|
|
3533
3537
|
progress: number;
|
|
3534
3538
|
stage?: string;
|
|
3535
3539
|
};
|
|
3540
|
+
export type DeviceFirmwareInstallProgress = {
|
|
3541
|
+
target_id: DeviceFirmwareTargetType;
|
|
3542
|
+
progress: number;
|
|
3543
|
+
stage?: string;
|
|
3544
|
+
};
|
|
3536
3545
|
export type DevFirmwareUpdateStatusEntry = {
|
|
3537
3546
|
target_id: DevFirmwareTargetType;
|
|
3538
3547
|
status: number;
|
|
3539
3548
|
};
|
|
3549
|
+
export type DeviceFirmwareUpdateStatusEntry = {
|
|
3550
|
+
target_id: DeviceFirmwareTargetType;
|
|
3551
|
+
status: number;
|
|
3552
|
+
};
|
|
3540
3553
|
export type DevGetFirmwareUpdateStatus = {};
|
|
3554
|
+
export type DeviceGetFirmwareUpdateStatus = {};
|
|
3541
3555
|
export type DevFirmwareUpdateStatus = {
|
|
3542
3556
|
targets: DevFirmwareUpdateStatusEntry[];
|
|
3543
3557
|
};
|
|
3558
|
+
export type DeviceFirmwareUpdateStatus = {
|
|
3559
|
+
targets: DeviceFirmwareUpdateStatusEntry[];
|
|
3560
|
+
};
|
|
3544
3561
|
export type FactoryDeviceInfoSettings = {
|
|
3545
3562
|
serial_no?: string;
|
|
3546
3563
|
cpu_info?: string;
|
|
@@ -4200,27 +4217,23 @@ export type MessageType = {
|
|
|
4200
4217
|
CoinPurchaseMemo: CoinPurchaseMemo;
|
|
4201
4218
|
PaymentRequestMemo: PaymentRequestMemo;
|
|
4202
4219
|
TxAckPaymentRequest: TxAckPaymentRequest;
|
|
4203
|
-
DebugLinkInput: DebugLinkInput;
|
|
4204
|
-
InternalMyAddressRequest: InternalMyAddressRequest;
|
|
4205
4220
|
SetBusy: SetBusy;
|
|
4206
4221
|
GetFirmwareHash: GetFirmwareHash;
|
|
4207
4222
|
FirmwareHash: FirmwareHash;
|
|
4208
4223
|
GetNonce: GetNonce;
|
|
4209
4224
|
Nonce: Nonce;
|
|
4210
4225
|
WriteSEPrivateKey: WriteSEPrivateKey;
|
|
4211
|
-
SetWallpaper: SetWallpaper;
|
|
4212
|
-
GetWallpaper: GetWallpaper;
|
|
4213
|
-
Wallpaper: Wallpaper;
|
|
4214
4226
|
UnlockPath: UnlockPath;
|
|
4215
4227
|
UnlockedPathRequest: UnlockedPathRequest;
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4228
|
+
TxDetailsAmount: TxDetailsAmount;
|
|
4229
|
+
TxDetailsAddress: TxDetailsAddress;
|
|
4230
|
+
TxDetailsNetwork: TxDetailsNetwork;
|
|
4231
|
+
TxDetailsGeneral: TxDetailsGeneral;
|
|
4232
|
+
TxDetailsPage: TxDetailsPage;
|
|
4221
4233
|
GetProtoVersion: GetProtoVersion;
|
|
4222
4234
|
ProtoVersion: ProtoVersion;
|
|
4223
4235
|
DevReboot: DevReboot;
|
|
4236
|
+
DeviceReboot: DeviceReboot;
|
|
4224
4237
|
DevFirmwareImageInfo: DevFirmwareImageInfo;
|
|
4225
4238
|
DevHardwareInfo: DevHardwareInfo;
|
|
4226
4239
|
DevMainMcuInfo: DevMainMcuInfo;
|
|
@@ -4230,12 +4243,19 @@ export type MessageType = {
|
|
|
4230
4243
|
DevInfoTypes: DevInfoTypes;
|
|
4231
4244
|
DevStatus: DevStatus;
|
|
4232
4245
|
DevGetDeviceInfo: DevGetDeviceInfo;
|
|
4246
|
+
DeviceGetDeviceInfo: DeviceGetDeviceInfo;
|
|
4233
4247
|
DevFirmwareTarget: DevFirmwareTarget;
|
|
4248
|
+
DeviceFirmwareTarget: DeviceFirmwareTarget;
|
|
4234
4249
|
DevFirmwareUpdate: DevFirmwareUpdate;
|
|
4250
|
+
DeviceFirmwareUpdate: DeviceFirmwareUpdate;
|
|
4235
4251
|
DevFirmwareInstallProgress: DevFirmwareInstallProgress;
|
|
4252
|
+
DeviceFirmwareInstallProgress: DeviceFirmwareInstallProgress;
|
|
4236
4253
|
DevFirmwareUpdateStatusEntry: DevFirmwareUpdateStatusEntry;
|
|
4254
|
+
DeviceFirmwareUpdateStatusEntry: DeviceFirmwareUpdateStatusEntry;
|
|
4237
4255
|
DevGetFirmwareUpdateStatus: DevGetFirmwareUpdateStatus;
|
|
4256
|
+
DeviceGetFirmwareUpdateStatus: DeviceGetFirmwareUpdateStatus;
|
|
4238
4257
|
DevFirmwareUpdateStatus: DevFirmwareUpdateStatus;
|
|
4258
|
+
DeviceFirmwareUpdateStatus: DeviceFirmwareUpdateStatus;
|
|
4239
4259
|
FactoryDeviceInfoSettings: FactoryDeviceInfoSettings;
|
|
4240
4260
|
FactoryGetDeviceInfo: FactoryGetDeviceInfo;
|
|
4241
4261
|
FactoryDeviceInfo: FactoryDeviceInfo;
|