@onekeyfe/hd-core 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/__tests__/protocol-v2.test.ts +106 -111
- package/dist/api/GetPassphraseState.d.ts +4 -4
- package/dist/api/protocol-v2/helpers.d.ts +3 -2
- package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
- package/dist/api/tron/TronSignMessage.d.ts +0 -1
- package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
- package/dist/api/tron/TronSignTransaction.d.ts +0 -1
- package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
- package/dist/constants/index.d.ts +1 -2
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/data-manager/connectSettings.d.ts.map +1 -1
- package/dist/device/Device.d.ts +0 -1
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
- package/dist/deviceProfile/buildDeviceProfile.d.ts.map +1 -1
- package/dist/index.d.ts +10 -12
- package/dist/index.js +474 -493
- package/dist/protocols/protocol-v2/features.d.ts +2 -2
- package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
- package/dist/types/api/getPassphraseState.d.ts +4 -4
- package/dist/types/api/getPassphraseState.d.ts.map +1 -1
- package/dist/types/api/protocolV2.d.ts +3 -3
- package/dist/types/api/protocolV2.d.ts.map +1 -1
- package/dist/types/settings.d.ts +0 -1
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/patch.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/GetPassphraseState.ts +4 -4
- package/src/api/protocol-v2/DeviceReboot.ts +3 -3
- package/src/api/protocol-v2/helpers.ts +26 -1
- package/src/api/tron/TronSignMessage.ts +0 -1
- package/src/api/tron/TronSignTransaction.ts +0 -1
- package/src/constants/index.ts +1 -10
- package/src/core/index.ts +0 -2
- package/src/data/messages/messages-protocol-v2.json +323 -329
- package/src/data-manager/connectSettings.ts +0 -6
- package/src/device/Device.ts +1 -12
- package/src/device/DevicePool.ts +6 -6
- package/src/deviceProfile/buildDeviceFeatures.ts +1 -2
- package/src/deviceProfile/buildDeviceProfile.ts +3 -2
- package/src/protocols/protocol-v2/features.ts +7 -8
- package/src/types/api/getPassphraseState.ts +4 -4
- package/src/types/api/protocolV2.ts +3 -2
- package/src/types/settings.ts +0 -5
|
@@ -97,12 +97,12 @@ function stubDevice<T extends Record<string, any>>(device: T): T {
|
|
|
97
97
|
d.getCurrentFirmwareType ??= () => getFirmwareType(d.features);
|
|
98
98
|
d.getCurrentFirmwareVersionString ??= () =>
|
|
99
99
|
d.features ? getDeviceFirmwareVersion(d.features).join('.') : undefined;
|
|
100
|
-
d.getCurrentBLEFirmwareVersionString ??= () => d.features?.
|
|
101
|
-
d.getCurrentSafetyChecks ??= () => d.features?.
|
|
102
|
-
d.getCurrentDeviceId ??= () => d.features?.
|
|
103
|
-
d.getCurrentSerialNo ??= () => d.features?.
|
|
100
|
+
d.getCurrentBLEFirmwareVersionString ??= () => d.features?.onekey_ble_version;
|
|
101
|
+
d.getCurrentSafetyChecks ??= () => d.features?.safety_checks;
|
|
102
|
+
d.getCurrentDeviceId ??= () => d.features?.device_id || undefined;
|
|
103
|
+
d.getCurrentSerialNo ??= () => d.features?.serial_no || d.features?.onekey_serial_no || '';
|
|
104
104
|
d.getCurrentPassphraseProtection ??= () =>
|
|
105
|
-
d.features?.
|
|
105
|
+
d.features?.passphrase_protection;
|
|
106
106
|
d.getCurrentMethodVersionRange ??= (fn: (model: any) => any) => {
|
|
107
107
|
const deviceType = d.getCurrentDeviceType();
|
|
108
108
|
const range = fn(deviceType);
|
|
@@ -162,7 +162,6 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
162
162
|
protocol_version: 1,
|
|
163
163
|
hw: {
|
|
164
164
|
serial_no: 'PR2SERIAL',
|
|
165
|
-
device_id: 'PRO2-DEVICE-ID',
|
|
166
165
|
},
|
|
167
166
|
fw: {
|
|
168
167
|
board: {
|
|
@@ -212,34 +211,40 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
212
211
|
},
|
|
213
212
|
});
|
|
214
213
|
|
|
215
|
-
expect(features.
|
|
216
|
-
expect(features.
|
|
217
|
-
expect(features.
|
|
218
|
-
expect(features.
|
|
219
|
-
expect(features.
|
|
220
|
-
expect(features.
|
|
221
|
-
expect(features.
|
|
222
|
-
expect(features.
|
|
223
|
-
expect(features.
|
|
224
|
-
expect(features.
|
|
225
|
-
expect(features.
|
|
226
|
-
expect(features.
|
|
227
|
-
expect(features.
|
|
228
|
-
expect(features.
|
|
229
|
-
expect(features.
|
|
230
|
-
expect(features.
|
|
214
|
+
expect(features.device_id).toBeNull();
|
|
215
|
+
expect(features.serial_no).toBe('PR2SERIAL');
|
|
216
|
+
expect(features.onekey_serial_no).toBe('PR2SERIAL');
|
|
217
|
+
expect(features.onekey_device_type).toBe('pro2');
|
|
218
|
+
expect(features.protocol_version).toBe(1);
|
|
219
|
+
expect(features.major_version).toBe(1);
|
|
220
|
+
expect(features.minor_version).toBe(2);
|
|
221
|
+
expect(features.patch_version).toBe(3);
|
|
222
|
+
expect(features.onekey_firmware_version).toBe('1.2.3');
|
|
223
|
+
expect(features.onekey_firmware_build_id).toBe('app-build');
|
|
224
|
+
expect(features.onekey_firmware_hash).toBe('abc123');
|
|
225
|
+
expect(features.bootloader_version).toBe('0.2.0');
|
|
226
|
+
expect(features.onekey_boot_build_id).toBe('boot-build');
|
|
227
|
+
expect(features.onekey_boot_hash).toBe('0a0b');
|
|
228
|
+
expect(features.onekey_board_hash).toBe('0102ff');
|
|
229
|
+
expect(features.ble_name).toBe('Pro2 BLE');
|
|
230
|
+
expect(features.onekey_ble_version).toBe('4.5.6');
|
|
231
|
+
expect(features.onekey_ble_hash).toBe('0c0d');
|
|
232
|
+
expect(features.onekey_se01_version).toBe('7.8.9');
|
|
233
|
+
expect(features.onekey_se01_hash).toBe('0e0f');
|
|
234
|
+
expect(features.onekey_se01_state).toBe('APP');
|
|
235
|
+
expect(features.onekey_se02_state).toBe('BOOT');
|
|
231
236
|
expect(features.label).toBe('My Pro2');
|
|
232
237
|
expect(features.language).toBe('en-US');
|
|
233
238
|
expect(features.initialized).toBe(false);
|
|
234
|
-
expect(features.
|
|
235
|
-
expect(features.
|
|
236
|
-
expect(features.
|
|
239
|
+
expect(features.needs_backup).toBe(true);
|
|
240
|
+
expect(features.passphrase_protection).toBe(true);
|
|
241
|
+
expect(features.ble_enable).toBe(true);
|
|
237
242
|
});
|
|
238
243
|
|
|
239
244
|
test('uses GetPassphraseState payloads compatible with Pro series passphrase flow', async () => {
|
|
240
245
|
const features = normalizeProtocolV2Features(descriptor as any);
|
|
241
246
|
// Pro2 版本线独立于 Pro 系列:V2 设备无论固件版本都支持 GetPassphraseState
|
|
242
|
-
features.
|
|
247
|
+
features.onekey_firmware_version = '1.2.3';
|
|
243
248
|
const typedCall = jest.fn().mockResolvedValue({
|
|
244
249
|
type: 'PassphraseState',
|
|
245
250
|
message: {
|
|
@@ -279,12 +284,12 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
279
284
|
|
|
280
285
|
test('returns unified GetPassphraseState object payload for existing Pro devices', async () => {
|
|
281
286
|
const features = {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
287
|
+
device_id: 'pro-device-id',
|
|
288
|
+
onekey_device_type: 'PRO',
|
|
289
|
+
onekey_firmware_version: '4.15.0',
|
|
290
|
+
passphrase_protection: true,
|
|
291
|
+
session_id: 'feature-session',
|
|
292
|
+
unlocked_attach_pin: true,
|
|
288
293
|
};
|
|
289
294
|
const typedCall = jest.fn().mockResolvedValue({
|
|
290
295
|
type: 'PassphraseState',
|
|
@@ -311,10 +316,10 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
311
316
|
}) as any;
|
|
312
317
|
|
|
313
318
|
await expect(method.run()).resolves.toEqual({
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
319
|
+
passphrase_state: 'state-pro',
|
|
320
|
+
session_id: 'session-pro',
|
|
321
|
+
unlocked_attach_pin: false,
|
|
322
|
+
passphrase_protection: true,
|
|
318
323
|
});
|
|
319
324
|
expect(updateInternalState).toHaveBeenCalledWith(
|
|
320
325
|
true,
|
|
@@ -327,12 +332,12 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
327
332
|
|
|
328
333
|
test('uses features for GetPassphraseState response metadata', async () => {
|
|
329
334
|
const features = {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
335
|
+
device_id: null,
|
|
336
|
+
onekey_device_type: 'PRO2',
|
|
337
|
+
onekey_firmware_version: '4.15.0',
|
|
338
|
+
passphrase_protection: true,
|
|
339
|
+
session_id: 'feature-session',
|
|
340
|
+
unlocked_attach_pin: true,
|
|
336
341
|
};
|
|
337
342
|
const typedCall = jest.fn().mockResolvedValue({
|
|
338
343
|
type: 'PassphraseState',
|
|
@@ -362,10 +367,10 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
362
367
|
}) as any;
|
|
363
368
|
|
|
364
369
|
await expect(method.run()).resolves.toEqual({
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
370
|
+
passphrase_state: 'state-pro2',
|
|
371
|
+
session_id: 'session-pro2',
|
|
372
|
+
unlocked_attach_pin: false,
|
|
373
|
+
passphrase_protection: true,
|
|
369
374
|
});
|
|
370
375
|
expect(getFeatures).not.toHaveBeenCalled();
|
|
371
376
|
});
|
|
@@ -418,8 +423,8 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
418
423
|
hw: { serial_no: 'PR2SERIAL' },
|
|
419
424
|
}
|
|
420
425
|
);
|
|
421
|
-
(device as any).features.
|
|
422
|
-
(device as any).features.
|
|
426
|
+
(device as any).features.onekey_firmware_version = '4.15.0';
|
|
427
|
+
(device as any).features.passphrase_protection = true;
|
|
423
428
|
(device as any).features.unlocked = true;
|
|
424
429
|
(device as any).commands = { typedCall };
|
|
425
430
|
|
|
@@ -429,8 +434,8 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
429
434
|
});
|
|
430
435
|
|
|
431
436
|
expect(device.passphraseState).toBeUndefined();
|
|
432
|
-
expect(device.features?.
|
|
433
|
-
expect(device.features?.
|
|
437
|
+
expect(device.features?.passphrase_protection).toBe(true);
|
|
438
|
+
expect(device.features?.session_id).toBeNull();
|
|
434
439
|
expect(device.getInternalState()).toBeUndefined();
|
|
435
440
|
device.passphraseState = 'state-auto';
|
|
436
441
|
expect(device.getInternalState()).toBe('session-auto');
|
|
@@ -460,7 +465,7 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
460
465
|
},
|
|
461
466
|
}
|
|
462
467
|
);
|
|
463
|
-
(device as any).features.
|
|
468
|
+
(device as any).features.onekey_firmware_version = '4.15.0';
|
|
464
469
|
(device as any).features.unlocked = true;
|
|
465
470
|
(device as any).commands = { typedCall };
|
|
466
471
|
|
|
@@ -471,8 +476,8 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
471
476
|
newSession: 'main-pin-session',
|
|
472
477
|
});
|
|
473
478
|
|
|
474
|
-
expect(device.features?.
|
|
475
|
-
expect(device.features?.
|
|
479
|
+
expect(device.features?.passphrase_protection).toBe(false);
|
|
480
|
+
expect(device.features?.session_id).toBeNull();
|
|
476
481
|
expect(device.getInternalState()).toBeUndefined();
|
|
477
482
|
expect(typedCall).toHaveBeenLastCalledWith('GetPassphraseState', 'PassphraseState', {
|
|
478
483
|
_only_main_pin: true,
|
|
@@ -494,8 +499,8 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
494
499
|
...descriptor,
|
|
495
500
|
protocolType: 'V2',
|
|
496
501
|
} as any);
|
|
497
|
-
(device as any).features.
|
|
498
|
-
(device as any).features.
|
|
502
|
+
(device as any).features.onekey_firmware_version = '4.15.0';
|
|
503
|
+
(device as any).features.passphrase_protection = true;
|
|
499
504
|
(device as any).commands = { typedCall };
|
|
500
505
|
|
|
501
506
|
await expect(device.checkPassphraseStateSafety('expected-state', false, true)).resolves.toBe(
|
|
@@ -511,14 +516,15 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
511
516
|
test('marks fallback features as unavailable when DeviceInfo is missing', () => {
|
|
512
517
|
const features = normalizeProtocolV2Features(descriptor as any);
|
|
513
518
|
|
|
514
|
-
expect(features.
|
|
515
|
-
expect(features.
|
|
519
|
+
expect(features.device_id).toBeNull();
|
|
520
|
+
expect(features.serial_no).toBeUndefined();
|
|
521
|
+
expect(features.onekey_serial_no).toBeUndefined();
|
|
516
522
|
expect(features.initialized).toBeNull();
|
|
517
523
|
expect(features.unlocked).toBeNull();
|
|
518
|
-
expect(features.
|
|
524
|
+
expect(features.firmware_present).toBe(false);
|
|
519
525
|
});
|
|
520
526
|
|
|
521
|
-
test('
|
|
527
|
+
test('does not use Protocol V2 serial_no as device_id', () => {
|
|
522
528
|
const features = normalizeProtocolV2Features(
|
|
523
529
|
{
|
|
524
530
|
id: 'PR2000000000',
|
|
@@ -528,41 +534,23 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
528
534
|
{
|
|
529
535
|
hw: {
|
|
530
536
|
serial_no: 'PR9999999999',
|
|
531
|
-
device_id: 'DEVICE-ID-9999',
|
|
532
537
|
},
|
|
533
538
|
}
|
|
534
539
|
);
|
|
535
540
|
|
|
536
|
-
expect(features.
|
|
537
|
-
expect(features.
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
test('does not use Protocol V2 serial_no as deviceId when hw.device_id is absent', () => {
|
|
541
|
-
const features = normalizeProtocolV2Features(
|
|
542
|
-
{
|
|
543
|
-
id: 'PR2000000000',
|
|
544
|
-
path: 'PR2000000000',
|
|
545
|
-
protocolType: 'V2',
|
|
546
|
-
} as any,
|
|
547
|
-
{
|
|
548
|
-
hw: {
|
|
549
|
-
serial_no: 'PR9999999999',
|
|
550
|
-
},
|
|
551
|
-
}
|
|
552
|
-
);
|
|
553
|
-
|
|
554
|
-
expect(features.deviceId).toBeNull();
|
|
555
|
-
expect(features.serialNo).toBe('PR9999999999');
|
|
541
|
+
expect(features.device_id).toBeNull();
|
|
542
|
+
expect(features.onekey_serial_no).toBe('PR9999999999');
|
|
543
|
+
expect(features.serial_no).toBe('PR9999999999');
|
|
556
544
|
});
|
|
557
545
|
|
|
558
546
|
test('uses Protocol V2 features directly when profile is absent', () => {
|
|
559
547
|
const device = Device.fromDescriptor({ ...descriptor, protocolType: 'V2' } as any);
|
|
560
548
|
(device as any).features = {
|
|
561
549
|
...normalizeProtocolV2Features({ ...descriptor, protocolType: 'V2' } as any),
|
|
562
|
-
|
|
550
|
+
serial_no: 'LEGACY-SERIAL',
|
|
563
551
|
label: 'Legacy Label',
|
|
564
|
-
|
|
565
|
-
|
|
552
|
+
ble_name: 'Legacy BLE',
|
|
553
|
+
passphrase_protection: true,
|
|
566
554
|
};
|
|
567
555
|
|
|
568
556
|
expect(device.toMessageObject()).toMatchObject({
|
|
@@ -580,8 +568,9 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
580
568
|
const cached = Device.fromDescriptor({ ...descriptor, protocolType: 'V2' } as any);
|
|
581
569
|
(cached as any).features = {
|
|
582
570
|
...normalizeProtocolV2Features({ ...descriptor, protocolType: 'V2' } as any),
|
|
583
|
-
|
|
584
|
-
|
|
571
|
+
device_id: null,
|
|
572
|
+
serial_no: 'LEGACY-SERIAL',
|
|
573
|
+
onekey_serial_no: 'LEGACY-SERIAL',
|
|
585
574
|
};
|
|
586
575
|
|
|
587
576
|
const current = Device.fromDescriptor({ ...descriptor, protocolType: 'V2' } as any);
|
|
@@ -614,9 +603,9 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
614
603
|
descriptor: descriptor as any,
|
|
615
604
|
});
|
|
616
605
|
|
|
617
|
-
expect(features.
|
|
606
|
+
expect(features.device_id).toBeNull();
|
|
618
607
|
expect(features.initialized).toBe(true);
|
|
619
|
-
expect(features.
|
|
608
|
+
expect(features.passphrase_protection).toBe(true);
|
|
620
609
|
expect(commands.typedCall).toHaveBeenCalledTimes(1);
|
|
621
610
|
expect(commands.typedCall).toHaveBeenNthCalledWith(
|
|
622
611
|
1,
|
|
@@ -1004,7 +993,7 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
1004
993
|
});
|
|
1005
994
|
});
|
|
1006
995
|
|
|
1007
|
-
test('
|
|
996
|
+
test('returns Protocol V2 oneKey fields without calling legacy OnekeyGetFeatures', async () => {
|
|
1008
997
|
const method = new GetOnekeyFeatures({
|
|
1009
998
|
id: 1,
|
|
1010
999
|
payload: {
|
|
@@ -1040,7 +1029,13 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
1040
1029
|
}),
|
|
1041
1030
|
expect.anything()
|
|
1042
1031
|
);
|
|
1043
|
-
expect(message).
|
|
1032
|
+
expect(message).toMatchObject({
|
|
1033
|
+
onekey_device_type: 'pro2',
|
|
1034
|
+
onekey_firmware_version: '1.2.3',
|
|
1035
|
+
onekey_firmware_build_id: 'app-build',
|
|
1036
|
+
onekey_serial_no: 'PR2SERIAL',
|
|
1037
|
+
onekey_ble_name: 'Pro2 BLE',
|
|
1038
|
+
});
|
|
1044
1039
|
expect(message).not.toHaveProperty('label');
|
|
1045
1040
|
});
|
|
1046
1041
|
|
|
@@ -1079,17 +1074,17 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
1079
1074
|
await device.initialize();
|
|
1080
1075
|
|
|
1081
1076
|
expect(device.features).toMatchObject({
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1077
|
+
device_id: null,
|
|
1078
|
+
onekey_firmware_version: '1.2.3',
|
|
1079
|
+
passphrase_protection: false,
|
|
1085
1080
|
label: 'renamed',
|
|
1086
1081
|
});
|
|
1087
1082
|
expect((device as any).profile).toBeUndefined();
|
|
1088
1083
|
// status 字段被第二次刷新更新
|
|
1089
|
-
expect(device.features?.
|
|
1084
|
+
expect(device.features?.passphrase_protection).toBe(false);
|
|
1090
1085
|
expect(device.features?.label).toBe('renamed');
|
|
1091
1086
|
// 轻量刷新不含 fw target,已有版本信息按字段级合并保留
|
|
1092
|
-
expect(device.features?.
|
|
1087
|
+
expect(device.features?.onekey_firmware_version).toBe('1.2.3');
|
|
1093
1088
|
expect(typedCall).toHaveBeenCalledTimes(2);
|
|
1094
1089
|
expect(typedCall).toHaveBeenNthCalledWith(
|
|
1095
1090
|
1,
|
|
@@ -1163,15 +1158,15 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
1163
1158
|
const features = await device.getFeatures();
|
|
1164
1159
|
|
|
1165
1160
|
expect(device.features).toMatchObject({
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1161
|
+
device_id: null,
|
|
1162
|
+
onekey_firmware_version: '1.2.4',
|
|
1163
|
+
passphrase_protection: true,
|
|
1169
1164
|
});
|
|
1170
1165
|
expect(features).toMatchObject({
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1166
|
+
onekey_device_type: 'pro2',
|
|
1167
|
+
onekey_serial_no: 'PR2SERIAL',
|
|
1168
|
+
onekey_firmware_version: '1.2.4',
|
|
1169
|
+
passphrase_protection: true,
|
|
1175
1170
|
});
|
|
1176
1171
|
expect(typedCall).toHaveBeenCalledTimes(2);
|
|
1177
1172
|
expect(typedCall).toHaveBeenNthCalledWith(
|
|
@@ -1267,9 +1262,9 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
1267
1262
|
expect(typedCall).not.toHaveBeenCalledWith('GetAddress', 'Address', expect.anything());
|
|
1268
1263
|
expect(typedCall).not.toHaveBeenCalledWith('GetFeatures', 'Features', {});
|
|
1269
1264
|
expect(features).toMatchObject({
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1265
|
+
onekey_device_type: 'pro2',
|
|
1266
|
+
device_id: null,
|
|
1267
|
+
onekey_firmware_version: '1.2.3',
|
|
1273
1268
|
unlocked: true,
|
|
1274
1269
|
});
|
|
1275
1270
|
});
|
|
@@ -1296,7 +1291,7 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
1296
1291
|
await device.unlockDevice();
|
|
1297
1292
|
|
|
1298
1293
|
expect((device as any).profile).toBeUndefined();
|
|
1299
|
-
expect(device.features?.
|
|
1294
|
+
expect(device.features?.passphrase_protection).toBe(true);
|
|
1300
1295
|
});
|
|
1301
1296
|
});
|
|
1302
1297
|
|
|
@@ -1315,7 +1310,7 @@ describe('API compatibility handling', () => {
|
|
|
1315
1310
|
method.init();
|
|
1316
1311
|
(method as any).device = stubDevice({
|
|
1317
1312
|
features: {
|
|
1318
|
-
|
|
1313
|
+
onekey_device_type: 'pro2',
|
|
1319
1314
|
},
|
|
1320
1315
|
originalDescriptor: {
|
|
1321
1316
|
protocolType: 'V2',
|
|
@@ -1353,7 +1348,7 @@ describe('API compatibility handling', () => {
|
|
|
1353
1348
|
|
|
1354
1349
|
test('does not mark Pro2 Tron, Solana, TON, SUI and Polkadot methods as unsupported', () => {
|
|
1355
1350
|
const features = {
|
|
1356
|
-
|
|
1351
|
+
onekey_device_type: 'pro2',
|
|
1357
1352
|
} as Features;
|
|
1358
1353
|
|
|
1359
1354
|
const tronMethod = new TronGetAddress({
|
|
@@ -1504,7 +1499,7 @@ describe('API compatibility handling', () => {
|
|
|
1504
1499
|
|
|
1505
1500
|
test('allows Pro2 Solana signing methods through Protocol V2 version checks', () => {
|
|
1506
1501
|
const features = {
|
|
1507
|
-
|
|
1502
|
+
onekey_device_type: 'pro2',
|
|
1508
1503
|
} as Features;
|
|
1509
1504
|
|
|
1510
1505
|
const solSignMessageMethod = new SolSignMessage({
|
|
@@ -1598,7 +1593,7 @@ describe('API compatibility handling', () => {
|
|
|
1598
1593
|
method.init();
|
|
1599
1594
|
(method as any).device = stubDevice({
|
|
1600
1595
|
features: {
|
|
1601
|
-
|
|
1596
|
+
onekey_device_type: 'pro2',
|
|
1602
1597
|
},
|
|
1603
1598
|
originalDescriptor: {
|
|
1604
1599
|
protocolType: 'V2',
|
|
@@ -2472,7 +2467,7 @@ describe('Protocol V2 reboot methods', () => {
|
|
|
2472
2467
|
});
|
|
2473
2468
|
});
|
|
2474
2469
|
|
|
2475
|
-
test('sends
|
|
2470
|
+
test('sends DeviceReboot from deviceReboot', async () => {
|
|
2476
2471
|
const typedCall = jest.fn().mockResolvedValue({ message: { message: 'ok' } });
|
|
2477
2472
|
const method = new DeviceReboot({
|
|
2478
2473
|
id: 1,
|
|
@@ -2486,7 +2481,7 @@ describe('Protocol V2 reboot methods', () => {
|
|
|
2486
2481
|
|
|
2487
2482
|
await method.run();
|
|
2488
2483
|
|
|
2489
|
-
expect(typedCall).toHaveBeenCalledWith('
|
|
2484
|
+
expect(typedCall).toHaveBeenCalledWith('DeviceReboot', 'Success', {
|
|
2490
2485
|
reboot_type: 2,
|
|
2491
2486
|
});
|
|
2492
2487
|
});
|
|
@@ -2,10 +2,10 @@ import { BaseMethod } from './BaseMethod';
|
|
|
2
2
|
export default class GetPassphraseState extends BaseMethod {
|
|
3
3
|
init(): void;
|
|
4
4
|
run(): Promise<{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
passphrase_state: string | undefined;
|
|
6
|
+
session_id: string | undefined;
|
|
7
|
+
unlocked_attach_pin: boolean | undefined;
|
|
8
|
+
passphrase_protection: boolean | null;
|
|
9
9
|
}>;
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=GetPassphraseState.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DevRebootType } from '@onekeyfe/hd-transport';
|
|
1
|
+
import { DevRebootType, DeviceRebootType } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { DevFirmwareTarget, DevFirmwareTargetType, TransportCallOptions } from '@onekeyfe/hd-transport';
|
|
3
|
-
export type RebootTypeInput = DevRebootType | keyof typeof DevRebootType | string | number;
|
|
3
|
+
export type RebootTypeInput = DevRebootType | DeviceRebootType | keyof typeof DevRebootType | keyof typeof DeviceRebootType | string | number;
|
|
4
4
|
export type DeviceRebootParams = {
|
|
5
5
|
rebootType?: RebootTypeInput;
|
|
6
6
|
reboot_type?: RebootTypeInput;
|
|
@@ -29,5 +29,6 @@ export declare const PROTOCOL_V2_FIRMWARE_UPDATE_RESPONSE_TYPES: ('Success' | 'D
|
|
|
29
29
|
export declare const getProtocolV2UnknownErrorText: (error: unknown) => string;
|
|
30
30
|
export declare const isProtocolV2DeviceDisconnectedError: (error: unknown) => boolean;
|
|
31
31
|
export declare function normalizeRebootType(value: RebootTypeInput | undefined): DevRebootType;
|
|
32
|
+
export declare function normalizeDeviceRebootType(value: RebootTypeInput | undefined): DeviceRebootType;
|
|
32
33
|
export declare function normalizeFirmwareTargets(params: DeviceFirmwareUpdateParams): DevFirmwareTarget[];
|
|
33
34
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/api/protocol-v2/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/api/protocol-v2/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAIzE,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,eAAe,GACvB,aAAa,GACb,gBAAgB,GAChB,MAAM,OAAO,aAAa,GAC1B,MAAM,OAAO,gBAAgB,GAC7B,MAAM,GACN,MAAM,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B,CAAC;AAEF,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":3,"file":"TronSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/tron/TronSignMessage.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,KAAK,EAAE,eAAe,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEzF,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU,CAAC,uBAAuB,CAAC;IAC9E,IAAI;IAgCJ,eAAe
|
|
1
|
+
{"version":3,"file":"TronSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/tron/TronSignMessage.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,KAAK,EAAE,eAAe,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEzF,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU,CAAC,uBAAuB,CAAC;IAC9E,IAAI;IAgCJ,eAAe;;;;;;;;IAWf,wBAAwB;;;;;;;;;;;;;;IAiBlB,GAAG;CAmBV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TronSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/tron/TronSignTransaction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,UAAU,CAAC,UAAU,CAAC;IACrE,OAAO,CAAC,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,UAAU;IA6G7D,IAAI;IA0BJ,eAAe
|
|
1
|
+
{"version":3,"file":"TronSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/tron/TronSignTransaction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,UAAU,CAAC,UAAU,CAAC;IACrE,OAAO,CAAC,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,UAAU;IA6G7D,IAAI;IA0BJ,eAAe;;;;;;;;IAWf,0BAA0B,IAAI,mBAAmB;IAcjD,uCAAuC;IASvC,6CAA6C,IAAI,mBAAmB;IAcpE,sCAAsC;IAWhC,GAAG;CAUV"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { safeThrowError } from './errors';
|
|
2
|
-
export { Messages as PROTO,
|
|
3
|
-
export type { HDNodeType, Success as DeviceSuccess, } from '@onekeyfe/hd-transport';
|
|
2
|
+
export { Messages as PROTO, TonSignDataType } from '@onekeyfe/hd-transport';
|
|
4
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,QAAQ,IAAI,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAoClC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAkB1C,OAAO,eAAe,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAoClC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAkB1C,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAIxD,OAAO,KAAK,EAAE,eAAe,EAAyB,MAAM,UAAU,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAmD,MAAM,WAAW,CAAC;AAI9F,OAAO,KAAK,EAAE,6BAA6B,EAAoB,MAAM,wBAAwB,CAAC;AAW9F,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;AA8D7D,eAAO,MAAM,OAAO,YAAmB,WAAW,WAAW,WAAW,iBA6EvE,CAAC;AA0yBF,eAAO,MAAM,MAAM,YAAa,WAAW,cAAc,MAAM,SAkF9D,CAAC;AAiFF,eAAO,MAAM,qBAAqB,gFAejC,CAAC;AA0GF,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,YAAY;IAC5C,OAAO,CAAC,cAAc,CAAoB;IAE1C,SAAgB,aAAa,EAAE,MAAM,CAAC;IAEtC,OAAO,CAAC,YAAY,CAAsB;IAG1C,OAAO,CAAC,qBAAqB,CAA4B;IAEzD,OAAO,CAAC,iBAAiB,CAAoB;;IAS7C,OAAO,CAAC,cAAc;IAoBhB,aAAa,CAAC,OAAO,EAAE,WAAW;IA2DxC,OAAO;CASR;AAED,eAAO,MAAM,QAAQ,YAGpB,CAAC;AAEF,eAAO,MAAM,aAAa,uBAIzB,CAAC;AAMF,eAAO,MAAM,IAAI,aACL,eAAe,aACd,GAAG,WACL,6BAA6B,8BAoBvC,CAAC;AAEF,eAAO,MAAM,eAAe;SAKrB,eAAe,CAAC,KAAK,CAAC;eAChB,GAAG;;UASf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectSettings.d.ts","sourceRoot":"","sources":["../../src/data-manager/connectSettings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAGlC,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,kBAAkB,EAAE,MAAM,CAAC;CAChC;
|
|
1
|
+
{"version":3,"file":"connectSettings.d.ts","sourceRoot":"","sources":["../../src/data-manager/connectSettings.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAGlC,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,kBAAkB,EAAE,MAAM,CAAC;CAChC;AAmBD,eAAO,MAAM,MAAM,4DAqBlB,CAAC;AAEF,eAAO,MAAM,aAAa,SAAU,MAAM,uBAKzC,CAAC;AAEF,eAAO,MAAM,oBAAoB,WAAW,QAAQ,eAAe,CAAC,oBAyDnE,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/device/Device.d.ts
CHANGED
|
@@ -92,7 +92,6 @@ export declare class Device extends EventEmitter {
|
|
|
92
92
|
getCurrentDeviceType(): IDeviceType;
|
|
93
93
|
getCurrentDeviceId(): string | undefined;
|
|
94
94
|
getCurrentSerialNo(): string;
|
|
95
|
-
getConnectId(): string;
|
|
96
95
|
getCurrentBleName(): string | null;
|
|
97
96
|
getCurrentLabel(): string | null;
|
|
98
97
|
getCurrentPassphraseProtection(): boolean | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Device.d.ts","sourceRoot":"","sources":["../../src/device/Device.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAgClC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,KAAK,mBAAmB,EAGxB,KAAK,MAAM,IAAI,WAAW,EAC1B,iBAAiB,EACjB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC7B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,MAAM,EAAc,MAAM,WAAW,CAAC;AAW/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EACV,0BAA0B,EAC1B,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EACV,gBAAgB,IAAI,gBAAgB,EACpC,oBAAoB,EACpB,OAAO,EACR,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,uBAAuB,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC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,EAAE,MAAM;IAIxB,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAKpC,yBAAyB,IAAI,mBAAmB;IAU1C,YAAY;IAyDZ,0BAA0B,CAC9B,eAAe,CAAC,EAAE,MAAM,EACxB,kBAAkB,CAAC,EAAE,OAAO,EAC5B,mBAAmB,CAAC,EAAE,OAAO;CAiDhC;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildDeviceFeatures.d.ts","sourceRoot":"","sources":["../../src/deviceProfile/buildDeviceFeatures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAwB,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAmHzF,eAAO,MAAM,8BAA8B,uBACrB,cAAc,aACvB,QAAQ,KAClB,QAqGF,CAAC;AASF,eAAO,MAAM,8BAA8B,gBAC5B,oBAAoB,aACtB,QAAQ,KAClB,
|
|
1
|
+
{"version":3,"file":"buildDeviceFeatures.d.ts","sourceRoot":"","sources":["../../src/deviceProfile/buildDeviceFeatures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAwB,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAmHzF,eAAO,MAAM,8BAA8B,uBACrB,cAAc,aACvB,QAAQ,KAClB,QAqGF,CAAC;AASF,eAAO,MAAM,8BAA8B,gBAC5B,oBAAoB,aACtB,QAAQ,KAClB,QAmIF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildDeviceProfile.d.ts","sourceRoot":"","sources":["../../src/deviceProfile/buildDeviceProfile.ts"],"names":[],"mappings":"AA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