@onekeyfe/hd-core 1.2.0-alpha.2 → 1.2.0-alpha.3
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 +162 -106
- package/dist/api/GetPassphraseState.d.ts +4 -4
- package/dist/api/GetPassphraseState.d.ts.map +1 -1
- package/dist/api/protocol-v2/helpers.d.ts +2 -3
- package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
- package/dist/constants/index.d.ts +2 -1
- 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 +1 -0
- 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 +12 -10
- package/dist/index.js +500 -477
- 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 +1 -0
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesUtils.d.ts +2 -0
- package/dist/utils/deviceFeaturesUtils.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 +7 -4
- package/src/api/protocol-v2/DeviceReboot.ts +3 -3
- package/src/api/protocol-v2/helpers.ts +1 -26
- package/src/constants/index.ts +10 -1
- package/src/core/index.ts +2 -0
- package/src/data/messages/messages-protocol-v2.json +329 -323
- package/src/data-manager/connectSettings.ts +6 -0
- package/src/device/Device.ts +12 -1
- package/src/device/DevicePool.ts +6 -6
- package/src/deviceProfile/buildDeviceFeatures.ts +2 -1
- package/src/deviceProfile/buildDeviceProfile.ts +2 -3
- package/src/protocols/protocol-v2/features.ts +8 -7
- package/src/types/api/getPassphraseState.ts +4 -4
- package/src/types/api/protocolV2.ts +2 -3
- package/src/types/settings.ts +5 -0
- package/src/utils/deviceFeaturesUtils.ts +7 -1
|
@@ -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?.bleVersion;
|
|
101
|
+
d.getCurrentSafetyChecks ??= () => d.features?.safetyChecks;
|
|
102
|
+
d.getCurrentDeviceId ??= () => d.features?.deviceId || undefined;
|
|
103
|
+
d.getCurrentSerialNo ??= () => d.features?.serialNo || '';
|
|
104
104
|
d.getCurrentPassphraseProtection ??= () =>
|
|
105
|
-
d.features?.
|
|
105
|
+
d.features?.passphraseProtection;
|
|
106
106
|
d.getCurrentMethodVersionRange ??= (fn: (model: any) => any) => {
|
|
107
107
|
const deviceType = d.getCurrentDeviceType();
|
|
108
108
|
const range = fn(deviceType);
|
|
@@ -162,6 +162,7 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
162
162
|
protocol_version: 1,
|
|
163
163
|
hw: {
|
|
164
164
|
serial_no: 'PR2SERIAL',
|
|
165
|
+
device_id: 'PRO2-DEVICE-ID',
|
|
165
166
|
},
|
|
166
167
|
fw: {
|
|
167
168
|
board: {
|
|
@@ -211,40 +212,34 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
211
212
|
},
|
|
212
213
|
});
|
|
213
214
|
|
|
214
|
-
expect(features.
|
|
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.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');
|
|
215
|
+
expect(features.deviceId).toBe('PRO2-DEVICE-ID');
|
|
216
|
+
expect(features.serialNo).toBe('PR2SERIAL');
|
|
217
|
+
expect(features.deviceType).toBe('pro2');
|
|
218
|
+
expect(features.protocolVersion).toBe(1);
|
|
219
|
+
expect(features.firmwareVersion).toBe('1.2.3');
|
|
220
|
+
expect(features.verify?.firmwareBuildId).toBe('app-build');
|
|
221
|
+
expect(features.verify?.firmwareHash).toBe('abc123');
|
|
222
|
+
expect(features.bootloaderVersion).toBe('0.2.0');
|
|
223
|
+
expect(features.verify?.bootloaderBuildId).toBe('boot-build');
|
|
224
|
+
expect(features.verify?.bootloaderHash).toBe('0a0b');
|
|
225
|
+
expect(features.verify?.boardHash).toBe('0102ff');
|
|
226
|
+
expect(features.bleName).toBe('Pro2 BLE');
|
|
227
|
+
expect(features.bleVersion).toBe('4.5.6');
|
|
228
|
+
expect(features.verify?.bleHash).toBe('0c0d');
|
|
229
|
+
expect(features.se01Version).toBe('7.8.9');
|
|
230
|
+
expect(features.verify?.se01Hash).toBe('0e0f');
|
|
236
231
|
expect(features.label).toBe('My Pro2');
|
|
237
232
|
expect(features.language).toBe('en-US');
|
|
238
233
|
expect(features.initialized).toBe(false);
|
|
239
|
-
expect(features.
|
|
240
|
-
expect(features.
|
|
241
|
-
expect(features.
|
|
234
|
+
expect(features.backupRequired).toBe(true);
|
|
235
|
+
expect(features.passphraseProtection).toBe(true);
|
|
236
|
+
expect(features.bleEnabled).toBe(true);
|
|
242
237
|
});
|
|
243
238
|
|
|
244
239
|
test('uses GetPassphraseState payloads compatible with Pro series passphrase flow', async () => {
|
|
245
240
|
const features = normalizeProtocolV2Features(descriptor as any);
|
|
246
241
|
// Pro2 版本线独立于 Pro 系列:V2 设备无论固件版本都支持 GetPassphraseState
|
|
247
|
-
features.
|
|
242
|
+
features.firmwareVersion = '1.2.3';
|
|
248
243
|
const typedCall = jest.fn().mockResolvedValue({
|
|
249
244
|
type: 'PassphraseState',
|
|
250
245
|
message: {
|
|
@@ -284,12 +279,12 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
284
279
|
|
|
285
280
|
test('returns unified GetPassphraseState object payload for existing Pro devices', async () => {
|
|
286
281
|
const features = {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
282
|
+
deviceId: 'pro-device-id',
|
|
283
|
+
deviceType: 'pro',
|
|
284
|
+
firmwareVersion: '4.15.0',
|
|
285
|
+
passphraseProtection: true,
|
|
286
|
+
sessionId: 'feature-session',
|
|
287
|
+
unlockedAttachPin: true,
|
|
293
288
|
};
|
|
294
289
|
const typedCall = jest.fn().mockResolvedValue({
|
|
295
290
|
type: 'PassphraseState',
|
|
@@ -316,10 +311,10 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
316
311
|
}) as any;
|
|
317
312
|
|
|
318
313
|
await expect(method.run()).resolves.toEqual({
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
314
|
+
passphraseState: 'state-pro',
|
|
315
|
+
sessionId: 'session-pro',
|
|
316
|
+
unlockedAttachPin: false,
|
|
317
|
+
passphraseProtection: true,
|
|
323
318
|
});
|
|
324
319
|
expect(updateInternalState).toHaveBeenCalledWith(
|
|
325
320
|
true,
|
|
@@ -332,12 +327,12 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
332
327
|
|
|
333
328
|
test('uses features for GetPassphraseState response metadata', async () => {
|
|
334
329
|
const features = {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
330
|
+
deviceId: null,
|
|
331
|
+
deviceType: 'pro2',
|
|
332
|
+
firmwareVersion: '4.15.0',
|
|
333
|
+
passphraseProtection: true,
|
|
334
|
+
sessionId: 'feature-session',
|
|
335
|
+
unlockedAttachPin: true,
|
|
341
336
|
};
|
|
342
337
|
const typedCall = jest.fn().mockResolvedValue({
|
|
343
338
|
type: 'PassphraseState',
|
|
@@ -367,14 +362,65 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
367
362
|
}) as any;
|
|
368
363
|
|
|
369
364
|
await expect(method.run()).resolves.toEqual({
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
365
|
+
passphraseState: 'state-pro2',
|
|
366
|
+
sessionId: 'session-pro2',
|
|
367
|
+
unlockedAttachPin: false,
|
|
368
|
+
passphraseProtection: true,
|
|
374
369
|
});
|
|
375
370
|
expect(getFeatures).not.toHaveBeenCalled();
|
|
376
371
|
});
|
|
377
372
|
|
|
373
|
+
test('honors initSession when getting Pro2 passphrase state', async () => {
|
|
374
|
+
const features = {
|
|
375
|
+
deviceId: 'pro2-device-id',
|
|
376
|
+
deviceType: 'pro2',
|
|
377
|
+
firmwareVersion: '9.9.9',
|
|
378
|
+
passphraseProtection: true,
|
|
379
|
+
sessionId: 'old-feature-session',
|
|
380
|
+
unlockedAttachPin: false,
|
|
381
|
+
};
|
|
382
|
+
const typedCall = jest.fn().mockResolvedValue({
|
|
383
|
+
type: 'PassphraseState',
|
|
384
|
+
message: {
|
|
385
|
+
passphrase_state: 'state-pro2-new',
|
|
386
|
+
unlocked_attach_pin: false,
|
|
387
|
+
},
|
|
388
|
+
});
|
|
389
|
+
const clearInternalState = jest.fn();
|
|
390
|
+
const updateInternalState = jest.fn();
|
|
391
|
+
const method = new GetPassphraseState({
|
|
392
|
+
payload: {
|
|
393
|
+
method: 'getPassphraseState',
|
|
394
|
+
connectId: 'connect-id',
|
|
395
|
+
initSession: true,
|
|
396
|
+
},
|
|
397
|
+
});
|
|
398
|
+
method.device = stubDevice({
|
|
399
|
+
originalDescriptor: { ...descriptor, protocolType: 'V2' },
|
|
400
|
+
features,
|
|
401
|
+
commands: { typedCall },
|
|
402
|
+
clearInternalState,
|
|
403
|
+
updateInternalState,
|
|
404
|
+
getCurrentDeviceId: () => 'pro2-device-id',
|
|
405
|
+
getCurrentPassphraseProtection: () => true,
|
|
406
|
+
}) as any;
|
|
407
|
+
|
|
408
|
+
await expect(method.run()).resolves.toEqual({
|
|
409
|
+
passphraseState: 'state-pro2-new',
|
|
410
|
+
sessionId: undefined,
|
|
411
|
+
unlockedAttachPin: false,
|
|
412
|
+
passphraseProtection: true,
|
|
413
|
+
});
|
|
414
|
+
expect(clearInternalState).toHaveBeenCalledTimes(1);
|
|
415
|
+
expect(updateInternalState).toHaveBeenCalledWith(
|
|
416
|
+
true,
|
|
417
|
+
'state-pro2-new',
|
|
418
|
+
'pro2-device-id',
|
|
419
|
+
undefined,
|
|
420
|
+
null
|
|
421
|
+
);
|
|
422
|
+
});
|
|
423
|
+
|
|
378
424
|
test('stores Pro2 passphrase session cache without synthetic device id', async () => {
|
|
379
425
|
const device = Device.fromDescriptor({ ...descriptor, protocolType: 'V2' } as any);
|
|
380
426
|
const typedCall = jest.fn().mockResolvedValue({
|
|
@@ -423,8 +469,8 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
423
469
|
hw: { serial_no: 'PR2SERIAL' },
|
|
424
470
|
}
|
|
425
471
|
);
|
|
426
|
-
(device as any).features.
|
|
427
|
-
(device as any).features.
|
|
472
|
+
(device as any).features.firmwareVersion = '4.15.0';
|
|
473
|
+
(device as any).features.passphraseProtection = true;
|
|
428
474
|
(device as any).features.unlocked = true;
|
|
429
475
|
(device as any).commands = { typedCall };
|
|
430
476
|
|
|
@@ -434,8 +480,8 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
434
480
|
});
|
|
435
481
|
|
|
436
482
|
expect(device.passphraseState).toBeUndefined();
|
|
437
|
-
expect(device.features?.
|
|
438
|
-
expect(device.features?.
|
|
483
|
+
expect(device.features?.passphraseProtection).toBe(true);
|
|
484
|
+
expect(device.features?.sessionId).toBeNull();
|
|
439
485
|
expect(device.getInternalState()).toBeUndefined();
|
|
440
486
|
device.passphraseState = 'state-auto';
|
|
441
487
|
expect(device.getInternalState()).toBe('session-auto');
|
|
@@ -465,7 +511,7 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
465
511
|
},
|
|
466
512
|
}
|
|
467
513
|
);
|
|
468
|
-
(device as any).features.
|
|
514
|
+
(device as any).features.firmwareVersion = '4.15.0';
|
|
469
515
|
(device as any).features.unlocked = true;
|
|
470
516
|
(device as any).commands = { typedCall };
|
|
471
517
|
|
|
@@ -476,8 +522,8 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
476
522
|
newSession: 'main-pin-session',
|
|
477
523
|
});
|
|
478
524
|
|
|
479
|
-
expect(device.features?.
|
|
480
|
-
expect(device.features?.
|
|
525
|
+
expect(device.features?.passphraseProtection).toBe(false);
|
|
526
|
+
expect(device.features?.sessionId).toBeNull();
|
|
481
527
|
expect(device.getInternalState()).toBeUndefined();
|
|
482
528
|
expect(typedCall).toHaveBeenLastCalledWith('GetPassphraseState', 'PassphraseState', {
|
|
483
529
|
_only_main_pin: true,
|
|
@@ -499,8 +545,8 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
499
545
|
...descriptor,
|
|
500
546
|
protocolType: 'V2',
|
|
501
547
|
} as any);
|
|
502
|
-
(device as any).features.
|
|
503
|
-
(device as any).features.
|
|
548
|
+
(device as any).features.firmwareVersion = '4.15.0';
|
|
549
|
+
(device as any).features.passphraseProtection = true;
|
|
504
550
|
(device as any).commands = { typedCall };
|
|
505
551
|
|
|
506
552
|
await expect(device.checkPassphraseStateSafety('expected-state', false, true)).resolves.toBe(
|
|
@@ -516,15 +562,14 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
516
562
|
test('marks fallback features as unavailable when DeviceInfo is missing', () => {
|
|
517
563
|
const features = normalizeProtocolV2Features(descriptor as any);
|
|
518
564
|
|
|
519
|
-
expect(features.
|
|
520
|
-
expect(features.
|
|
521
|
-
expect(features.onekey_serial_no).toBeUndefined();
|
|
565
|
+
expect(features.deviceId).toBeNull();
|
|
566
|
+
expect(features.serialNo).toBe('');
|
|
522
567
|
expect(features.initialized).toBeNull();
|
|
523
568
|
expect(features.unlocked).toBeNull();
|
|
524
|
-
expect(features.
|
|
569
|
+
expect(features.firmwarePresent).toBeNull();
|
|
525
570
|
});
|
|
526
571
|
|
|
527
|
-
test('does not
|
|
572
|
+
test('uses Protocol V2 hw.device_id and does not fall back to serial_no', () => {
|
|
528
573
|
const features = normalizeProtocolV2Features(
|
|
529
574
|
{
|
|
530
575
|
id: 'PR2000000000',
|
|
@@ -534,23 +579,41 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
534
579
|
{
|
|
535
580
|
hw: {
|
|
536
581
|
serial_no: 'PR9999999999',
|
|
582
|
+
device_id: 'DEVICE-ID-9999',
|
|
537
583
|
},
|
|
538
584
|
}
|
|
539
585
|
);
|
|
540
586
|
|
|
541
|
-
expect(features.
|
|
542
|
-
expect(features.
|
|
543
|
-
|
|
587
|
+
expect(features.deviceId).toBe('DEVICE-ID-9999');
|
|
588
|
+
expect(features.serialNo).toBe('PR9999999999');
|
|
589
|
+
});
|
|
590
|
+
|
|
591
|
+
test('does not use Protocol V2 serial_no as deviceId when hw.device_id is absent', () => {
|
|
592
|
+
const features = normalizeProtocolV2Features(
|
|
593
|
+
{
|
|
594
|
+
id: 'PR2000000000',
|
|
595
|
+
path: 'PR2000000000',
|
|
596
|
+
protocolType: 'V2',
|
|
597
|
+
} as any,
|
|
598
|
+
{
|
|
599
|
+
hw: {
|
|
600
|
+
serial_no: 'PR9999999999',
|
|
601
|
+
},
|
|
602
|
+
}
|
|
603
|
+
);
|
|
604
|
+
|
|
605
|
+
expect(features.deviceId).toBeNull();
|
|
606
|
+
expect(features.serialNo).toBe('PR9999999999');
|
|
544
607
|
});
|
|
545
608
|
|
|
546
609
|
test('uses Protocol V2 features directly when profile is absent', () => {
|
|
547
610
|
const device = Device.fromDescriptor({ ...descriptor, protocolType: 'V2' } as any);
|
|
548
611
|
(device as any).features = {
|
|
549
612
|
...normalizeProtocolV2Features({ ...descriptor, protocolType: 'V2' } as any),
|
|
550
|
-
|
|
613
|
+
serialNo: 'LEGACY-SERIAL',
|
|
551
614
|
label: 'Legacy Label',
|
|
552
|
-
|
|
553
|
-
|
|
615
|
+
bleName: 'Legacy BLE',
|
|
616
|
+
passphraseProtection: true,
|
|
554
617
|
};
|
|
555
618
|
|
|
556
619
|
expect(device.toMessageObject()).toMatchObject({
|
|
@@ -568,9 +631,8 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
568
631
|
const cached = Device.fromDescriptor({ ...descriptor, protocolType: 'V2' } as any);
|
|
569
632
|
(cached as any).features = {
|
|
570
633
|
...normalizeProtocolV2Features({ ...descriptor, protocolType: 'V2' } as any),
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
onekey_serial_no: 'LEGACY-SERIAL',
|
|
634
|
+
deviceId: null,
|
|
635
|
+
serialNo: 'LEGACY-SERIAL',
|
|
574
636
|
};
|
|
575
637
|
|
|
576
638
|
const current = Device.fromDescriptor({ ...descriptor, protocolType: 'V2' } as any);
|
|
@@ -603,9 +665,9 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
603
665
|
descriptor: descriptor as any,
|
|
604
666
|
});
|
|
605
667
|
|
|
606
|
-
expect(features.
|
|
668
|
+
expect(features.deviceId).toBeNull();
|
|
607
669
|
expect(features.initialized).toBe(true);
|
|
608
|
-
expect(features.
|
|
670
|
+
expect(features.passphraseProtection).toBe(true);
|
|
609
671
|
expect(commands.typedCall).toHaveBeenCalledTimes(1);
|
|
610
672
|
expect(commands.typedCall).toHaveBeenNthCalledWith(
|
|
611
673
|
1,
|
|
@@ -993,7 +1055,7 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
993
1055
|
});
|
|
994
1056
|
});
|
|
995
1057
|
|
|
996
|
-
test('
|
|
1058
|
+
test('does not call legacy OnekeyGetFeatures for Protocol V2 devices', async () => {
|
|
997
1059
|
const method = new GetOnekeyFeatures({
|
|
998
1060
|
id: 1,
|
|
999
1061
|
payload: {
|
|
@@ -1029,13 +1091,7 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
1029
1091
|
}),
|
|
1030
1092
|
expect.anything()
|
|
1031
1093
|
);
|
|
1032
|
-
expect(message).
|
|
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
|
-
});
|
|
1094
|
+
expect(message).toEqual({});
|
|
1039
1095
|
expect(message).not.toHaveProperty('label');
|
|
1040
1096
|
});
|
|
1041
1097
|
|
|
@@ -1074,17 +1130,17 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
1074
1130
|
await device.initialize();
|
|
1075
1131
|
|
|
1076
1132
|
expect(device.features).toMatchObject({
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1133
|
+
deviceId: null,
|
|
1134
|
+
firmwareVersion: '1.2.3',
|
|
1135
|
+
passphraseProtection: false,
|
|
1080
1136
|
label: 'renamed',
|
|
1081
1137
|
});
|
|
1082
1138
|
expect((device as any).profile).toBeUndefined();
|
|
1083
1139
|
// status 字段被第二次刷新更新
|
|
1084
|
-
expect(device.features?.
|
|
1140
|
+
expect(device.features?.passphraseProtection).toBe(false);
|
|
1085
1141
|
expect(device.features?.label).toBe('renamed');
|
|
1086
1142
|
// 轻量刷新不含 fw target,已有版本信息按字段级合并保留
|
|
1087
|
-
expect(device.features?.
|
|
1143
|
+
expect(device.features?.firmwareVersion).toBe('1.2.3');
|
|
1088
1144
|
expect(typedCall).toHaveBeenCalledTimes(2);
|
|
1089
1145
|
expect(typedCall).toHaveBeenNthCalledWith(
|
|
1090
1146
|
1,
|
|
@@ -1158,15 +1214,15 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
1158
1214
|
const features = await device.getFeatures();
|
|
1159
1215
|
|
|
1160
1216
|
expect(device.features).toMatchObject({
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1217
|
+
deviceId: null,
|
|
1218
|
+
firmwareVersion: '1.2.4',
|
|
1219
|
+
passphraseProtection: true,
|
|
1164
1220
|
});
|
|
1165
1221
|
expect(features).toMatchObject({
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1222
|
+
deviceType: 'pro2',
|
|
1223
|
+
serialNo: 'PR2SERIAL',
|
|
1224
|
+
firmwareVersion: '1.2.4',
|
|
1225
|
+
passphraseProtection: true,
|
|
1170
1226
|
});
|
|
1171
1227
|
expect(typedCall).toHaveBeenCalledTimes(2);
|
|
1172
1228
|
expect(typedCall).toHaveBeenNthCalledWith(
|
|
@@ -1262,9 +1318,9 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
1262
1318
|
expect(typedCall).not.toHaveBeenCalledWith('GetAddress', 'Address', expect.anything());
|
|
1263
1319
|
expect(typedCall).not.toHaveBeenCalledWith('GetFeatures', 'Features', {});
|
|
1264
1320
|
expect(features).toMatchObject({
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1321
|
+
deviceType: 'pro2',
|
|
1322
|
+
deviceId: null,
|
|
1323
|
+
firmwareVersion: '1.2.3',
|
|
1268
1324
|
unlocked: true,
|
|
1269
1325
|
});
|
|
1270
1326
|
});
|
|
@@ -1291,7 +1347,7 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
1291
1347
|
await device.unlockDevice();
|
|
1292
1348
|
|
|
1293
1349
|
expect((device as any).profile).toBeUndefined();
|
|
1294
|
-
expect(device.features?.
|
|
1350
|
+
expect(device.features?.passphraseProtection).toBe(true);
|
|
1295
1351
|
});
|
|
1296
1352
|
});
|
|
1297
1353
|
|
|
@@ -1310,7 +1366,7 @@ describe('API compatibility handling', () => {
|
|
|
1310
1366
|
method.init();
|
|
1311
1367
|
(method as any).device = stubDevice({
|
|
1312
1368
|
features: {
|
|
1313
|
-
|
|
1369
|
+
deviceType: 'pro2',
|
|
1314
1370
|
},
|
|
1315
1371
|
originalDescriptor: {
|
|
1316
1372
|
protocolType: 'V2',
|
|
@@ -1348,7 +1404,7 @@ describe('API compatibility handling', () => {
|
|
|
1348
1404
|
|
|
1349
1405
|
test('does not mark Pro2 Tron, Solana, TON, SUI and Polkadot methods as unsupported', () => {
|
|
1350
1406
|
const features = {
|
|
1351
|
-
|
|
1407
|
+
deviceType: 'pro2',
|
|
1352
1408
|
} as Features;
|
|
1353
1409
|
|
|
1354
1410
|
const tronMethod = new TronGetAddress({
|
|
@@ -1499,7 +1555,7 @@ describe('API compatibility handling', () => {
|
|
|
1499
1555
|
|
|
1500
1556
|
test('allows Pro2 Solana signing methods through Protocol V2 version checks', () => {
|
|
1501
1557
|
const features = {
|
|
1502
|
-
|
|
1558
|
+
deviceType: 'pro2',
|
|
1503
1559
|
} as Features;
|
|
1504
1560
|
|
|
1505
1561
|
const solSignMessageMethod = new SolSignMessage({
|
|
@@ -1593,7 +1649,7 @@ describe('API compatibility handling', () => {
|
|
|
1593
1649
|
method.init();
|
|
1594
1650
|
(method as any).device = stubDevice({
|
|
1595
1651
|
features: {
|
|
1596
|
-
|
|
1652
|
+
deviceType: 'pro2',
|
|
1597
1653
|
},
|
|
1598
1654
|
originalDescriptor: {
|
|
1599
1655
|
protocolType: 'V2',
|
|
@@ -2467,7 +2523,7 @@ describe('Protocol V2 reboot methods', () => {
|
|
|
2467
2523
|
});
|
|
2468
2524
|
});
|
|
2469
2525
|
|
|
2470
|
-
test('sends
|
|
2526
|
+
test('sends DevReboot from deviceReboot', async () => {
|
|
2471
2527
|
const typedCall = jest.fn().mockResolvedValue({ message: { message: 'ok' } });
|
|
2472
2528
|
const method = new DeviceReboot({
|
|
2473
2529
|
id: 1,
|
|
@@ -2481,7 +2537,7 @@ describe('Protocol V2 reboot methods', () => {
|
|
|
2481
2537
|
|
|
2482
2538
|
await method.run();
|
|
2483
2539
|
|
|
2484
|
-
expect(typedCall).toHaveBeenCalledWith('
|
|
2540
|
+
expect(typedCall).toHaveBeenCalledWith('DevReboot', 'Success', {
|
|
2485
2541
|
reboot_type: 2,
|
|
2486
2542
|
});
|
|
2487
2543
|
});
|
|
@@ -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
|
+
passphraseState: string | undefined;
|
|
6
|
+
sessionId: string | undefined;
|
|
7
|
+
unlockedAttachPin: boolean | undefined;
|
|
8
|
+
passphraseProtection: boolean | null;
|
|
9
9
|
}>;
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=GetPassphraseState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetPassphraseState.d.ts","sourceRoot":"","sources":["../../src/api/GetPassphraseState.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU;IACxD,IAAI;IAKE,GAAG;;;;;;
|
|
1
|
+
{"version":3,"file":"GetPassphraseState.d.ts","sourceRoot":"","sources":["../../src/api/GetPassphraseState.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU;IACxD,IAAI;IAKE,GAAG;;;;;;CAwBV"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DevRebootType
|
|
1
|
+
import { DevRebootType } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { DevFirmwareTarget, DevFirmwareTargetType, TransportCallOptions } from '@onekeyfe/hd-transport';
|
|
3
|
-
export type RebootTypeInput = DevRebootType |
|
|
3
|
+
export type RebootTypeInput = DevRebootType | keyof typeof DevRebootType | string | number;
|
|
4
4
|
export type DeviceRebootParams = {
|
|
5
5
|
rebootType?: RebootTypeInput;
|
|
6
6
|
reboot_type?: RebootTypeInput;
|
|
@@ -29,6 +29,5 @@ 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;
|
|
33
32
|
export declare function normalizeFirmwareTargets(params: DeviceFirmwareUpdateParams): DevFirmwareTarget[];
|
|
34
33
|
//# 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,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"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B,EAA2C,CAAC;AAE7C,eAAO,MAAM,6BAA6B,UAAW,OAAO,WA6B3D,CAAC;AAEF,eAAO,MAAM,mCAAmC,UAAW,OAAO,YAwBjE,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,GAAG,aAAa,CAQrF;AAyBD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,0BAA0B,GAAG,iBAAiB,EAAE,CA0BhG"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { safeThrowError } from './errors';
|
|
2
|
-
export { Messages as PROTO, TonSignDataType } from '@onekeyfe/hd-transport';
|
|
2
|
+
export { Messages as PROTO, ResourceType, TonSignDataType, TonWalletVersion, } from '@onekeyfe/hd-transport';
|
|
3
|
+
export type { HDNodeType, Success as DeviceSuccess, } from '@onekeyfe/hd-transport';
|
|
3
4
|
//# 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,EACL,QAAQ,IAAI,KAAK,EACjB,YAAY,EACZ,eAAe,EACf,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,UAAU,EACV,OAAO,IAAI,aAAa,GACzB,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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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;AAqBD,eAAO,MAAM,MAAM,4DAqBlB,CAAC;AAEF,eAAO,MAAM,aAAa,SAAU,MAAM,uBAKzC,CAAC;AAEF,eAAO,MAAM,oBAAoB,WAAW,QAAQ,eAAe,CAAC,oBA6DnE,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/device/Device.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ export declare class Device extends EventEmitter {
|
|
|
92
92
|
getCurrentDeviceType(): IDeviceType;
|
|
93
93
|
getCurrentDeviceId(): string | undefined;
|
|
94
94
|
getCurrentSerialNo(): string;
|
|
95
|
+
getConnectId(): string;
|
|
95
96
|
getCurrentBleName(): string | null;
|
|
96
97
|
getCurrentLabel(): string | null;
|
|
97
98
|
getCurrentPassphraseProtection(): boolean | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Device.d.ts","sourceRoot":"","sources":["../../src/device/Device.ts"],"names":[],"mappings":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AAE,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,QAoIF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildDeviceProfile.d.ts","sourceRoot":"","sources":["../../src/deviceProfile/buildDeviceProfile.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAEhB,aAAa,EAIb,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,c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