@onekeyfe/hd-core 1.0.24-alpha.5 → 1.0.24-alpha.6

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.
@@ -12,7 +12,9 @@ export default class FirmwareUpdateV2 extends BaseMethod<Params> {
12
12
  checkPromise: Deferred<any> | null;
13
13
  init(): void;
14
14
  postTipMessage: (message: string) => void;
15
+ private _promptDeviceInBootloaderForWebDevice;
15
16
  checkDeviceToBootloader(connectId: string | undefined): void;
17
+ private _checkDeviceInBootloaderMode;
16
18
  isEnteredManuallyBoot(features: Features): boolean;
17
19
  isSupportResourceUpdate(features: Features, updateType: string): boolean;
18
20
  checkVersionForCopyTouchResource(features?: Features): void;
@@ -1 +1 @@
1
- {"version":3,"file":"FirmwareUpdateV2.d.ts","sourceRoot":"","sources":["../../src/api/FirmwareUpdateV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAKT,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiB1C,OAAO,KAAK,EAAe,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEtD,KAAK,MAAM,GAAG;IACZ,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,UAAU,GAAG,KAAK,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAIF,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU,CAAC,MAAM,CAAC;IAC9D,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;IAE1C,IAAI;IA2CJ,cAAc,YAAa,MAAM,UAS/B;IAEF,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS;IAgErD,qBAAqB,CAAC,QAAQ,EAAE,QAAQ;IAUxC,uBAAuB,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM;IAc9D,gCAAgC,CAAC,QAAQ,CAAC,EAAE,QAAQ;IAwB9C,GAAG;CAgHV"}
1
+ {"version":3,"file":"FirmwareUpdateV2.d.ts","sourceRoot":"","sources":["../../src/api/FirmwareUpdateV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAKT,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAiB1C,OAAO,KAAK,EAAe,QAAQ,EAAE,MAAM,UAAU,CAAC;AAItD,KAAK,MAAM,GAAG;IACZ,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,EAAE,UAAU,GAAG,KAAK,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAIF,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU,CAAC,MAAM,CAAC;IAC9D,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAAQ;IAE1C,IAAI;IA2CJ,cAAc,YAAa,MAAM,UAS/B;YAEY,qCAAqC;IAkBnD,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS;YAqFvC,4BAA4B;IAuB1C,qBAAqB,CAAC,QAAQ,EAAE,QAAQ;IAUxC,uBAAuB,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM;IAc9D,gCAAgC,CAAC,QAAQ,CAAC,EAAE,QAAQ;IAwB9C,GAAG;CAgHV"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AACA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAY,6BAA6B,EAAoB,MAAM,wBAAwB,CA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d,GAAG,WACL,6BAA6B,8BAoBvC,CAAC;AAEF,eAAO,MAAM,eAAe;SAKrB,eAAe,CAAC,KAAK,CAAC;eAChB,GAAG;;UASf,CAAC"}
@@ -22,6 +22,10 @@ export interface DeviceEvents {
22
22
  [DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
23
23
  [DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
24
24
  [DEVICE.PASSPHRASE]: [Device, (response: PassphrasePromptResponse, error?: Error) => void];
25
+ [DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
26
+ Device,
27
+ (err: any, deviceId: string) => void
28
+ ];
25
29
  }
26
30
  export interface Device {
27
31
  on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
@@ -1 +1 @@
1
- {"version":3,"file":"Device.d.ts","sourceRoot":"","sources":["../../src/device/Device.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,gBAAgB,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAEL,QAAQ,EAKT,MAAM,qBAAqB,CAAC;AAgB7B,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAE5E,OAAO,EACL,iBAAiB,EACjB,KAAK,MAAM,IAAI,WAAW,EAC1B,KAAK,QAAQ,EACb,KAAK,uBAAuB,EAC7B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,MAAM,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEtF,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAIrC,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;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,SAAS,CAAC,EAAE,MAAM;IAc/B,UAAU,CAAC,OAAO,CAAC,EAAE,WAAW;IAyChC,WAAW;IAKjB,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,CAAC,EAAE,OAAO;IAsBrD,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,EAAE,WAAW,UAAQ;IAiBlE,eAAe,CAAC,MAAM,EAAE,MAAM;IASxB,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,EAAE,UAAU;IAYlD,SAAS,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,OAAO,EAAE,UAAU;IA8EpE,uBAAuB;IASvB,oBAAoB;IAS1B,OAAO;IAoBP,kBAAkB;IAKlB,qBAAqB;IAKrB,MAAM;IAIN,UAAU;IAQV,eAAe,IAAI,OAAO;IAI1B,YAAY;IAIZ,aAAa;IAIb,UAAU;IAIV,YAAY,IAAI,OAAO;IAIvB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;IAsBpD,gBAAgB;IAShB,aAAa,CAAC,QAAQ,EAAE,MAAM;IAOxB,0BAA0B,CAAC,eAAe,CAAC,EAAE,MAAM;CAY1D;AAED,eAAe,MAAM,CAAC"}
@@ -20,6 +20,7 @@ export declare const DEVICE: {
20
20
  readonly PASSPHRASE_ON_DEVICE: "passphrase_on_device";
21
21
  readonly WORD: "word";
22
22
  readonly SUPPORT_FEATURES: "support_features";
23
+ readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "select_device_in_bootloader_for_web_device";
23
24
  readonly FEATURES: "features";
24
25
  };
25
26
  export interface DeviceConnnectRequest {
@@ -1 +1 @@
1
- {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../src/events/device.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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a,CAAC,MAAM,CAAC,GAAG,8BAA8B,CAAC;CACrE;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,MAAM,CAAC,MAAM,CAAC;IAC3B,OAAO,EAAE,0BAA0B,GAAG;QAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;CACjE;AAED,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;AAE7C,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,MAAM,CAAC,QAAQ,CAAC;IAC7B,OAAO,EAAE,qBAAqB,CAAC;CAChC;AAED,MAAM,MAAM,4BAA4B,GAAG,eAAe,GAAG;IAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AACvF,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,OAAO,MAAM,CAAC,gBAAgB,CAAC;IACrC,OAAO,EAAE,4BAA4B,CAAC;CACvC;AAED,MAAM,MAAM,WAAW,GACnB,mBAAmB,GACnB,kBAAkB,GAClB,yBAAyB,GACzB,wBAAwB,GACxB,qBAAqB,CAAC;AAE1B,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG;IAAE,KAAK,EAAE,OAAO,YAAY,CAAA;CAAE,CAAC;AAE9E,MAAM,MAAM,qBAAqB,GAAG,CAClC,IAAI,EAAE,OAAO,YAAY,EACzB,EAAE,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,KACpC,IAAI,CAAC;AAEV,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,CAAC,OAAO,YAAY,EAAE,WAAW,CAQxE,CAAC"}
@@ -9,6 +9,7 @@ export declare const UI_REQUEST: {
9
9
  readonly REQUEST_BUTTON: "ui-button";
10
10
  readonly REQUEST_PASSPHRASE: "ui-request_passphrase";
11
11
  readonly REQUEST_PASSPHRASE_ON_DEVICE: "ui-request_passphrase_on_device";
12
+ readonly REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-request_select_device_in_bootloader_for_web_device";
12
13
  readonly CLOSE_UI_WINDOW: "ui-close_window";
13
14
  readonly DEVICE_PROGRESS: "ui-device_progress";
14
15
  readonly BLUETOOTH_PERMISSION: "ui-bluetooth_permission";
@@ -56,6 +57,12 @@ export interface UiRequestPassphraseOnDevice {
56
57
  passphraseState?: string;
57
58
  };
58
59
  }
60
+ export interface UiRequestSelectDeviceInBootloaderForWebDevice {
61
+ type: typeof UI_REQUEST.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
62
+ payload: {
63
+ device: Device;
64
+ };
65
+ }
59
66
  export interface FirmwareProgress {
60
67
  type: typeof UI_REQUEST.FIRMWARE_PROGRESS;
61
68
  payload: {
@@ -88,7 +95,7 @@ export interface PreviousAddressResult {
88
95
  };
89
96
  };
90
97
  }
91
- export type UiEvent = UiRequestWithoutPayload | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
98
+ export type UiEvent = UiRequestWithoutPayload | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
92
99
  export type UiEventMessage = UiEvent & {
93
100
  event: typeof UI_EVENT;
94
101
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ui-request.d.ts","sourceRoot":"","sources":["../../src/events/ui-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,QAAQ,aAAa,CAAC;AAEnC,eAAO,MAAM,UAA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AAc,GACd,qBAAqB,CAAC;AAE1B,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG;IAAE,KAAK,EAAE,OAAO,QAAQ,CAAA;CAAE,CAAC;AAElE,eAAO,MAAM,eAAe,EAAE,gBAAgB,CAAC,OAAO,QAAQ,EAAE,OAAO,CAK5D,CAAC"}
@@ -3,6 +3,7 @@ import type { MessageFactoryFn } from './utils';
3
3
  export declare const UI_RESPONSE: {
4
4
  readonly RECEIVE_PIN: "ui-receive_pin";
5
5
  readonly RECEIVE_PASSPHRASE: "ui-receive_passphrase";
6
+ readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-receive_select-device-in-bootloader-for-web-device";
6
7
  };
7
8
  export interface UiResponsePin {
8
9
  type: typeof UI_RESPONSE.RECEIVE_PIN;
@@ -16,7 +17,13 @@ export interface UiResponsePassphrase {
16
17
  save?: boolean;
17
18
  };
18
19
  }
19
- export type UiResponseEvent = UiResponsePin | UiResponsePassphrase;
20
+ export interface UiResponseSelectDeviceInBootloaderForWebDevice {
21
+ type: typeof UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
22
+ payload: {
23
+ deviceId: string;
24
+ };
25
+ }
26
+ export type UiResponseEvent = UiResponsePin | UiResponsePassphrase | UiResponseSelectDeviceInBootloaderForWebDevice;
20
27
  export type UiResponseMessage = UiResponseEvent & {
21
28
  event: typeof UI_EVENT;
22
29
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ui-response.d.ts","sourceRoot":"","sources":["../../src/events/ui-response.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,WAAW,CAAC,WAAW,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC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,MAAM,iBAAiB,GAAG,eAAe,GAAG;IAAE,KAAK,EAAE,OAAO,QAAQ,CAAA;CAAE,CAAC;AAE7E,eAAO,MAAM,gBAAgB,EAAE,gBAAgB,CAAC,OAAO,QAAQ,EAAE,eAAe,CAQrE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -2387,6 +2387,7 @@ declare const DEVICE: {
2387
2387
  readonly PASSPHRASE_ON_DEVICE: "passphrase_on_device";
2388
2388
  readonly WORD: "word";
2389
2389
  readonly SUPPORT_FEATURES: "support_features";
2390
+ readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "select_device_in_bootloader_for_web_device";
2390
2391
  readonly FEATURES: "features";
2391
2392
  };
2392
2393
  interface DeviceConnnectRequest {
@@ -2436,6 +2437,7 @@ declare const UI_REQUEST: {
2436
2437
  readonly REQUEST_BUTTON: "ui-button";
2437
2438
  readonly REQUEST_PASSPHRASE: "ui-request_passphrase";
2438
2439
  readonly REQUEST_PASSPHRASE_ON_DEVICE: "ui-request_passphrase_on_device";
2440
+ readonly REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-request_select_device_in_bootloader_for_web_device";
2439
2441
  readonly CLOSE_UI_WINDOW: "ui-close_window";
2440
2442
  readonly DEVICE_PROGRESS: "ui-device_progress";
2441
2443
  readonly BLUETOOTH_PERMISSION: "ui-bluetooth_permission";
@@ -2483,6 +2485,12 @@ interface UiRequestPassphraseOnDevice {
2483
2485
  passphraseState?: string;
2484
2486
  };
2485
2487
  }
2488
+ interface UiRequestSelectDeviceInBootloaderForWebDevice {
2489
+ type: typeof UI_REQUEST.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
2490
+ payload: {
2491
+ device: Device$1;
2492
+ };
2493
+ }
2486
2494
  interface FirmwareProgress {
2487
2495
  type: typeof UI_REQUEST.FIRMWARE_PROGRESS;
2488
2496
  payload: {
@@ -2515,7 +2523,7 @@ interface PreviousAddressResult {
2515
2523
  };
2516
2524
  };
2517
2525
  }
2518
- type UiEvent = UiRequestWithoutPayload | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
2526
+ type UiEvent = UiRequestWithoutPayload | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
2519
2527
  type UiEventMessage = UiEvent & {
2520
2528
  event: typeof UI_EVENT;
2521
2529
  };
@@ -2605,6 +2613,7 @@ type CallMethodKeys = keyof CoreApi;
2605
2613
  declare const UI_RESPONSE: {
2606
2614
  readonly RECEIVE_PIN: "ui-receive_pin";
2607
2615
  readonly RECEIVE_PASSPHRASE: "ui-receive_passphrase";
2616
+ readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-receive_select-device-in-bootloader-for-web-device";
2608
2617
  };
2609
2618
  interface UiResponsePin {
2610
2619
  type: typeof UI_RESPONSE.RECEIVE_PIN;
@@ -2618,7 +2627,13 @@ interface UiResponsePassphrase {
2618
2627
  save?: boolean;
2619
2628
  };
2620
2629
  }
2621
- type UiResponseEvent = UiResponsePin | UiResponsePassphrase;
2630
+ interface UiResponseSelectDeviceInBootloaderForWebDevice {
2631
+ type: typeof UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
2632
+ payload: {
2633
+ deviceId: string;
2634
+ };
2635
+ }
2636
+ type UiResponseEvent = UiResponsePin | UiResponsePassphrase | UiResponseSelectDeviceInBootloaderForWebDevice;
2622
2637
  type UiResponseMessage = UiResponseEvent & {
2623
2638
  event: typeof UI_EVENT;
2624
2639
  };
@@ -2770,6 +2785,10 @@ interface DeviceEvents {
2770
2785
  [DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
2771
2786
  [DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
2772
2787
  [DEVICE.PASSPHRASE]: [Device, (response: PassphrasePromptResponse, error?: Error) => void];
2788
+ [DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
2789
+ Device,
2790
+ (err: any, deviceId: string) => void
2791
+ ];
2773
2792
  }
2774
2793
  interface Device {
2775
2794
  on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
@@ -3019,4 +3038,4 @@ declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, can
3019
3038
  declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
3020
3039
  declare const HardwareTopLevelSdk: () => CoreApi;
3021
3040
 
3022
- export { AccountAddress, AccountAddresses, AlephiumAddress, AlephiumGetAddressParams, AlephiumSignMessageParams, AlephiumSignTransactionParams, AlephiumSignedTx, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AllNetworkAddressParams, AllNetworkGetAddressParams, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BenfenAddress, BenfenGetAddressParams, BenfenGetPublicKeyParams, BenfenPublicKey, BenfenSignMessageParams, BenfenSignTransactionParams, BenfenSignedTx, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CardanoAddress, CardanoGetAddressMethodParams, CardanoGetAddressParams, CardanoSignTransaction, CardanoSignedTxData, CipheredKeyValue, CipheredKeyValueParams, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DataManager, Device$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesPayload, DeviceFirmwareRange, DeviceFlagsParams, DeviceModelToTypes, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendSupportFeatures, DeviceSettingsParams, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUploadResourceParams, DeviceVerifyParams, DeviceVerifySignature, DnxAddress, DnxGetAddressParams, DnxSignTransactionParams, DnxSignature, DnxTxKey, EOneKeyDeviceMode, EVMAccessList, EVMAddress, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FilecoinAddress, FilecoinGetAddressParams, FilecoinSignTransactionParams, FilecoinSignedTx, FirmwareEvent, FirmwareMessage, FirmwareProgress, FirmwareRange, FirmwareRelease$2 as FirmwareRelease, FirmwareTip, FirmwareUpdateBinaryParams, FirmwareUpdateParams, HardwareSDKLowLevel, HardwareTopLevelSdk, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareReleaseInfo, IFrameBridge, IFrameCallMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, ITransportStatus, IVersionArray, IVersionRange, KaspaAddress, KaspaGetAddressParams, KaspaSignInputParams, KaspaSignOutputParams, KaspaSignTransactionParams, KaspaSignature, KnownDevice, LOG, LOG_EVENT, LogBlockEvent, LogEvent, LogEventMessage, LogOutput, LoggerNames, LowLevelCoreApi, LowLevelInjectApi, MajorVersion, MethodResponseMessage, NEMAddress, NEMAggregateModificationTransaction, NEMGetAddressParams, NEMImportanceTransaction, NEMMosaic, NEMMosaicCreationTransaction, NEMMultisigTransaction, NEMProvisionNamespaceTransaction, NEMSignTransactionParams, NEMSupplyChangeTransaction, NEMTransaction, NEMTransferTransaction, NearAddress, NearGetAddressParams, NearSignTransactionParams, NervosAddress, NervosGetAddressParams, NervosSignTransactionParams, NervosSignedTx, NexaAddress, NexaGetAddressParams, NexaSignInputParams, NexaSignOutputParams, NexaSignTransactionParams, NexaSignature, OnekeyFeatures, Params, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, Response, ScdoAddress, ScdoGetAddressParams, ScdoSignMessageParams, ScdoSignTransactionParams, ScdoSignedTx, SearchDevice, SignedTransaction, SolSignMessageParams, SolSignMessageResponse, SolSignOffchainMessageParams, SolSignOffchainMessageResponse, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignMessageParams, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, TonAddress, TonGetAddressParams, TonSignMessageParams, TonSignProofParams, TopLevelInjectApi, TransactionOptions, TransportReleaseStatus, TronAddress, TronDelegateResourceContract, TronFreezeBalanceV2Contract, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceV2Contract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestFirmwareProgressing, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestWithoutPayload, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, checkNeedUpdateBootForClassicAndMini, checkNeedUpdateBootForTouch, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createResponseMessage, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareUpdateField, getHDPath, getHomeScreenDefaultList, getHomeScreenHex, getHomeScreenSize, getLog, getLogger, getMethodVersionRange, getOutputScriptType, getSDKVersion, getScriptType, getTimeStamp, httpRequest, init as initCore, isBleConnect, isValidVersionArray, isValidVersionString, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, safeThrowError, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, versionCompare, versionSplit, wait, whitelist, whitelistExtension };
3041
+ export { AccountAddress, AccountAddresses, AlephiumAddress, AlephiumGetAddressParams, AlephiumSignMessageParams, AlephiumSignTransactionParams, AlephiumSignedTx, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AllNetworkAddressParams, AllNetworkGetAddressParams, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BenfenAddress, BenfenGetAddressParams, BenfenGetPublicKeyParams, BenfenPublicKey, BenfenSignMessageParams, BenfenSignTransactionParams, BenfenSignedTx, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CardanoAddress, CardanoGetAddressMethodParams, CardanoGetAddressParams, CardanoSignTransaction, CardanoSignedTxData, CipheredKeyValue, CipheredKeyValueParams, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DataManager, Device$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesPayload, DeviceFirmwareRange, DeviceFlagsParams, DeviceModelToTypes, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendSupportFeatures, DeviceSettingsParams, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUploadResourceParams, DeviceVerifyParams, DeviceVerifySignature, DnxAddress, DnxGetAddressParams, DnxSignTransactionParams, DnxSignature, DnxTxKey, EOneKeyDeviceMode, EVMAccessList, EVMAddress, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FilecoinAddress, FilecoinGetAddressParams, FilecoinSignTransactionParams, FilecoinSignedTx, FirmwareEvent, FirmwareMessage, FirmwareProgress, FirmwareRange, FirmwareRelease$2 as FirmwareRelease, FirmwareTip, FirmwareUpdateBinaryParams, FirmwareUpdateParams, HardwareSDKLowLevel, HardwareTopLevelSdk, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareReleaseInfo, IFrameBridge, IFrameCallMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, ITransportStatus, IVersionArray, IVersionRange, KaspaAddress, KaspaGetAddressParams, KaspaSignInputParams, KaspaSignOutputParams, KaspaSignTransactionParams, KaspaSignature, KnownDevice, LOG, LOG_EVENT, LogBlockEvent, LogEvent, LogEventMessage, LogOutput, LoggerNames, LowLevelCoreApi, LowLevelInjectApi, MajorVersion, MethodResponseMessage, NEMAddress, NEMAggregateModificationTransaction, NEMGetAddressParams, NEMImportanceTransaction, NEMMosaic, NEMMosaicCreationTransaction, NEMMultisigTransaction, NEMProvisionNamespaceTransaction, NEMSignTransactionParams, NEMSupplyChangeTransaction, NEMTransaction, NEMTransferTransaction, NearAddress, NearGetAddressParams, NearSignTransactionParams, NervosAddress, NervosGetAddressParams, NervosSignTransactionParams, NervosSignedTx, NexaAddress, NexaGetAddressParams, NexaSignInputParams, NexaSignOutputParams, NexaSignTransactionParams, NexaSignature, OnekeyFeatures, Params, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, Response, ScdoAddress, ScdoGetAddressParams, ScdoSignMessageParams, ScdoSignTransactionParams, ScdoSignedTx, SearchDevice, SignedTransaction, SolSignMessageParams, SolSignMessageResponse, SolSignOffchainMessageParams, SolSignOffchainMessageResponse, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignMessageParams, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, TonAddress, TonGetAddressParams, TonSignMessageParams, TonSignProofParams, TopLevelInjectApi, TransactionOptions, TransportReleaseStatus, TronAddress, TronDelegateResourceContract, TronFreezeBalanceV2Contract, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceV2Contract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestFirmwareProgressing, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestSelectDeviceInBootloaderForWebDevice, UiRequestWithoutPayload, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UiResponseSelectDeviceInBootloaderForWebDevice, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, checkNeedUpdateBootForClassicAndMini, checkNeedUpdateBootForTouch, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createResponseMessage, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareUpdateField, getHDPath, getHomeScreenDefaultList, getHomeScreenHex, getHomeScreenSize, getLog, getLogger, getMethodVersionRange, getOutputScriptType, getSDKVersion, getScriptType, getTimeStamp, httpRequest, init as initCore, isBleConnect, isValidVersionArray, isValidVersionString, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, safeThrowError, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, versionCompare, versionSplit, wait, whitelist, whitelistExtension };
package/dist/index.js CHANGED
@@ -25466,6 +25466,7 @@ const UI_REQUEST$1 = {
25466
25466
  REQUEST_BUTTON: 'ui-button',
25467
25467
  REQUEST_PASSPHRASE: 'ui-request_passphrase',
25468
25468
  REQUEST_PASSPHRASE_ON_DEVICE: 'ui-request_passphrase_on_device',
25469
+ REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: 'ui-request_select_device_in_bootloader_for_web_device',
25469
25470
  CLOSE_UI_WINDOW: 'ui-close_window',
25470
25471
  DEVICE_PROGRESS: 'ui-device_progress',
25471
25472
  BLUETOOTH_PERMISSION: 'ui-bluetooth_permission',
@@ -25509,6 +25510,7 @@ const createResponseMessage = (id, success, payload) => ({
25509
25510
  const UI_RESPONSE = {
25510
25511
  RECEIVE_PIN: 'ui-receive_pin',
25511
25512
  RECEIVE_PASSPHRASE: 'ui-receive_passphrase',
25513
+ SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: 'ui-receive_select-device-in-bootloader-for-web-device',
25512
25514
  };
25513
25515
  const createUiResponse = (type, payload) => ({
25514
25516
  event: UI_EVENT,
@@ -25535,6 +25537,7 @@ const DEVICE = {
25535
25537
  PASSPHRASE_ON_DEVICE: 'passphrase_on_device',
25536
25538
  WORD: 'word',
25537
25539
  SUPPORT_FEATURES: 'support_features',
25540
+ SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: 'select_device_in_bootloader_for_web_device',
25538
25541
  FEATURES: 'features',
25539
25542
  };
25540
25543
  const createDeviceMessage = (type, payload) => ({
@@ -28283,6 +28286,22 @@ class FirmwareUpdateV2 extends BaseMethod {
28283
28286
  this.params = Object.assign(Object.assign({}, this.params), { binary: payload.binary });
28284
28287
  }
28285
28288
  }
28289
+ _promptDeviceInBootloaderForWebDevice({ device }) {
28290
+ return __awaiter(this, void 0, void 0, function* () {
28291
+ return new Promise((resolve, reject) => {
28292
+ if (this.device.listenerCount(DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE) > 0) {
28293
+ this.device.emit(DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE, this.device, (err, deviceId) => {
28294
+ if (err) {
28295
+ reject(err);
28296
+ }
28297
+ else {
28298
+ resolve(deviceId);
28299
+ }
28300
+ });
28301
+ }
28302
+ });
28303
+ });
28304
+ }
28286
28305
  checkDeviceToBootloader(connectId) {
28287
28306
  var _a, _b;
28288
28307
  this.checkPromise = hdShared.createDeferred();
@@ -28290,23 +28309,45 @@ class FirmwareUpdateV2 extends BaseMethod {
28290
28309
  const isBleReconnect = connectId && DataManager.isBleConnect(env);
28291
28310
  Log$3.log('FirmwareUpdateV2 [checkDeviceToBootloader] isBleReconnect: ', isBleReconnect);
28292
28311
  let isFirstCheck = true;
28312
+ let checkCount = 0;
28313
+ let timeoutTimer;
28293
28314
  const isTouchOrProDevice = getDeviceType((_a = this === null || this === void 0 ? void 0 : this.device) === null || _a === void 0 ? void 0 : _a.features) === hdShared.EDeviceType.Touch ||
28294
28315
  getDeviceType((_b = this === null || this === void 0 ? void 0 : this.device) === null || _b === void 0 ? void 0 : _b.features) === hdShared.EDeviceType.Pro;
28295
28316
  const intervalTimer = setInterval(() => __awaiter(this, void 0, void 0, function* () {
28296
- var _c, _d, _e, _f, _g, _h, _j, _k;
28317
+ var _c, _d, _e, _f;
28318
+ checkCount += 1;
28297
28319
  Log$3.log('FirmwareUpdateV2 [checkDeviceToBootloader] isFirstCheck: ', isFirstCheck);
28298
28320
  if (isTouchOrProDevice && isFirstCheck) {
28299
28321
  isFirstCheck = false;
28300
28322
  Log$3.log('FirmwareUpdateV2 [checkDeviceToBootloader] wait 3000ms');
28301
28323
  yield wait(3000);
28302
28324
  }
28325
+ console.log('checkCount: ', checkCount);
28326
+ console.log('DataManager.isWebUsbConnect(DataManager.getSettings("env")): ', DataManager.isWebUsbConnect(DataManager.getSettings('env')));
28327
+ if (checkCount > 4 && DataManager.isWebUsbConnect(DataManager.getSettings('env'))) {
28328
+ clearInterval(intervalTimer);
28329
+ clearTimeout(timeoutTimer);
28330
+ try {
28331
+ const confirmed = yield this._promptDeviceInBootloaderForWebDevice({
28332
+ device: this.device,
28333
+ });
28334
+ if (confirmed) {
28335
+ yield this._checkDeviceInBootloaderMode(connectId, intervalTimer, timeoutTimer);
28336
+ }
28337
+ }
28338
+ catch (e) {
28339
+ Log$3.log('FirmwareUpdateV2 [checkDeviceToBootloader] promptDeviceInBootloaderForWebDevice failed: ', e);
28340
+ (_c = this.checkPromise) === null || _c === void 0 ? void 0 : _c.reject(e);
28341
+ }
28342
+ return;
28343
+ }
28303
28344
  if (isBleReconnect) {
28304
28345
  try {
28305
- yield ((_c = this.device.deviceConnector) === null || _c === void 0 ? void 0 : _c.acquire(this.device.originalDescriptor.id, null, true));
28346
+ yield ((_d = this.device.deviceConnector) === null || _d === void 0 ? void 0 : _d.acquire(this.device.originalDescriptor.id, null, true));
28306
28347
  yield this.device.initialize();
28307
- if ((_d = this.device.features) === null || _d === void 0 ? void 0 : _d.bootloader_mode) {
28348
+ if ((_e = this.device.features) === null || _e === void 0 ? void 0 : _e.bootloader_mode) {
28308
28349
  clearInterval(intervalTimer);
28309
- (_e = this.checkPromise) === null || _e === void 0 ? void 0 : _e.resolve(true);
28350
+ (_f = this.checkPromise) === null || _f === void 0 ? void 0 : _f.resolve(true);
28310
28351
  }
28311
28352
  }
28312
28353
  catch (e) {
@@ -28314,24 +28355,35 @@ class FirmwareUpdateV2 extends BaseMethod {
28314
28355
  }
28315
28356
  }
28316
28357
  else {
28317
- const deviceDiff = yield ((_f = this.device.deviceConnector) === null || _f === void 0 ? void 0 : _f.enumerate());
28318
- const devicesDescriptor = (_g = deviceDiff === null || deviceDiff === void 0 ? void 0 : deviceDiff.descriptors) !== null && _g !== void 0 ? _g : [];
28319
- const { deviceList } = yield DevicePool.getDevices(devicesDescriptor, connectId);
28320
- if (deviceList.length === 1 && ((_j = (_h = deviceList[0]) === null || _h === void 0 ? void 0 : _h.features) === null || _j === void 0 ? void 0 : _j.bootloader_mode)) {
28321
- this.device.updateFromCache(deviceList[0]);
28322
- this.device.commands.disposed = false;
28323
- clearInterval(intervalTimer);
28324
- (_k = this.checkPromise) === null || _k === void 0 ? void 0 : _k.resolve(true);
28325
- }
28358
+ yield this._checkDeviceInBootloaderMode(connectId, intervalTimer, timeoutTimer);
28326
28359
  }
28327
28360
  }), isBleReconnect ? 3000 : 2000);
28328
- setTimeout(() => {
28361
+ timeoutTimer = setTimeout(() => {
28329
28362
  if (this.checkPromise) {
28330
28363
  clearInterval(intervalTimer);
28331
28364
  this.checkPromise.reject(new Error());
28332
28365
  }
28333
28366
  }, 30000);
28334
28367
  }
28368
+ _checkDeviceInBootloaderMode(connectId, intervalTimer, timeoutTimer) {
28369
+ var _a, _b, _c, _d, _e;
28370
+ return __awaiter(this, void 0, void 0, function* () {
28371
+ const deviceDiff = yield ((_a = this.device.deviceConnector) === null || _a === void 0 ? void 0 : _a.enumerate());
28372
+ const devicesDescriptor = (_b = deviceDiff === null || deviceDiff === void 0 ? void 0 : deviceDiff.descriptors) !== null && _b !== void 0 ? _b : [];
28373
+ const { deviceList } = yield DevicePool.getDevices(devicesDescriptor, connectId);
28374
+ if (deviceList.length === 1 && ((_d = (_c = deviceList[0]) === null || _c === void 0 ? void 0 : _c.features) === null || _d === void 0 ? void 0 : _d.bootloader_mode)) {
28375
+ this.device.updateFromCache(deviceList[0]);
28376
+ this.device.commands.disposed = false;
28377
+ if (intervalTimer)
28378
+ clearInterval(intervalTimer);
28379
+ if (timeoutTimer)
28380
+ clearTimeout(timeoutTimer);
28381
+ (_e = this.checkPromise) === null || _e === void 0 ? void 0 : _e.resolve(true);
28382
+ return true;
28383
+ }
28384
+ return false;
28385
+ });
28386
+ }
28335
28387
  isEnteredManuallyBoot(features) {
28336
28388
  const deviceType = getDeviceType(features);
28337
28389
  const isMini = deviceType === hdShared.EDeviceType.Mini;
@@ -36821,6 +36873,7 @@ const callAPI = (message) => __awaiter(void 0, void 0, void 0, function* () {
36821
36873
  device.on(DEVICE.PASSPHRASE, message.payload.useEmptyPassphrase ? onEmptyPassphraseHandler : onDevicePassphraseHandler);
36822
36874
  device.on(DEVICE.PASSPHRASE_ON_DEVICE, onEnterPassphraseOnDeviceHandler);
36823
36875
  device.on(DEVICE.FEATURES, onDeviceFeaturesHandler);
36876
+ device.on(DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE, onSelectDeviceInBootloaderForWebDeviceHandler);
36824
36877
  try {
36825
36878
  const inner = () => __awaiter(void 0, void 0, void 0, function* () {
36826
36879
  var _b;
@@ -37237,6 +37290,15 @@ const onEnterPassphraseOnDeviceHandler = (...[device]) => {
37237
37290
  passphraseState: device.passphraseState,
37238
37291
  }));
37239
37292
  };
37293
+ const onSelectDeviceInBootloaderForWebDeviceHandler = (...[device, callback]) => __awaiter(void 0, void 0, void 0, function* () {
37294
+ Log.debug('onSelectDeviceInBootloaderForWebDeviceHandler');
37295
+ const uiPromise = createUiPromise(UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE, device);
37296
+ postMessage(createUiMessage(UI_REQUEST$1.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE, {
37297
+ device: device.toMessageObject(),
37298
+ }));
37299
+ const uiResp = yield uiPromise.promise;
37300
+ callback(null, uiResp.payload.deviceId);
37301
+ });
37240
37302
  const postMessage = (message) => {
37241
37303
  _core.emit(CORE_EVENT, message);
37242
37304
  };
@@ -37255,7 +37317,8 @@ class Core extends events.exports {
37255
37317
  return __awaiter(this, void 0, void 0, function* () {
37256
37318
  switch (message.type) {
37257
37319
  case UI_RESPONSE.RECEIVE_PIN:
37258
- case UI_RESPONSE.RECEIVE_PASSPHRASE: {
37320
+ case UI_RESPONSE.RECEIVE_PASSPHRASE:
37321
+ case UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: {
37259
37322
  const uiPromise = findUiPromise(message.type);
37260
37323
  if (uiPromise) {
37261
37324
  Log.log('receive UI Response: ', message.type);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-core",
3
- "version": "1.0.24-alpha.5",
3
+ "version": "1.0.24-alpha.6",
4
4
  "description": "> TODO: description",
5
5
  "author": "OneKey",
6
6
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
@@ -25,8 +25,8 @@
25
25
  "url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@onekeyfe/hd-shared": "^1.0.24-alpha.5",
29
- "@onekeyfe/hd-transport": "^1.0.24-alpha.5",
28
+ "@onekeyfe/hd-shared": "^1.0.24-alpha.6",
29
+ "@onekeyfe/hd-transport": "^1.0.24-alpha.6",
30
30
  "axios": "^0.27.2",
31
31
  "bignumber.js": "^9.0.2",
32
32
  "bytebuffer": "^5.0.1",
@@ -46,5 +46,5 @@
46
46
  "@types/web-bluetooth": "^0.0.21",
47
47
  "ripple-keypairs": "^1.1.4"
48
48
  },
49
- "gitHead": "31edbcbcbb4dee44ddba8fb5a6bde9d48957e3a9"
49
+ "gitHead": "4a1e7ef50f159a44d0592e0d4e8f91e3c35823e5"
50
50
  }
@@ -26,6 +26,8 @@ import { DeviceModelToTypes } from '../types';
26
26
  import { DataManager } from '../data-manager';
27
27
 
28
28
  import type { KnownDevice, Features } from '../types';
29
+ import type { Device } from '../device/Device';
30
+ import { DEVICE } from '../events';
29
31
 
30
32
  type Params = {
31
33
  binary?: ArrayBuffer;
@@ -94,6 +96,24 @@ export default class FirmwareUpdateV2 extends BaseMethod<Params> {
94
96
  );
95
97
  };
96
98
 
99
+ private async _promptDeviceInBootloaderForWebDevice({ device }: { device: Device }) {
100
+ return new Promise((resolve, reject) => {
101
+ if (this.device.listenerCount(DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE) > 0) {
102
+ this.device.emit(
103
+ DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE,
104
+ this.device,
105
+ (err, deviceId) => {
106
+ if (err) {
107
+ reject(err);
108
+ } else {
109
+ resolve(deviceId);
110
+ }
111
+ }
112
+ );
113
+ }
114
+ });
115
+ }
116
+
97
117
  checkDeviceToBootloader(connectId: string | undefined) {
98
118
  this.checkPromise = createDeferred();
99
119
  const env = DataManager.getSettings('env');
@@ -103,17 +123,50 @@ export default class FirmwareUpdateV2 extends BaseMethod<Params> {
103
123
 
104
124
  // check device goto bootloader mode
105
125
  let isFirstCheck = true;
126
+ let checkCount = 0;
127
+ // eslint-disable-next-line prefer-const
128
+ let timeoutTimer: ReturnType<typeof setTimeout> | undefined;
129
+
106
130
  const isTouchOrProDevice =
107
131
  getDeviceType(this?.device?.features) === EDeviceType.Touch ||
108
132
  getDeviceType(this?.device?.features) === EDeviceType.Pro;
133
+
109
134
  const intervalTimer: ReturnType<typeof setInterval> | undefined = setInterval(
110
135
  async () => {
136
+ checkCount += 1;
111
137
  Log.log('FirmwareUpdateV2 [checkDeviceToBootloader] isFirstCheck: ', isFirstCheck);
112
138
  if (isTouchOrProDevice && isFirstCheck) {
113
139
  isFirstCheck = false;
114
140
  Log.log('FirmwareUpdateV2 [checkDeviceToBootloader] wait 3000ms');
115
141
  await wait(3000);
116
142
  }
143
+
144
+ console.log('checkCount: ', checkCount);
145
+ console.log(
146
+ 'DataManager.isWebUsbConnect(DataManager.getSettings("env")): ',
147
+ DataManager.isWebUsbConnect(DataManager.getSettings('env'))
148
+ );
149
+ if (checkCount > 4 && DataManager.isWebUsbConnect(DataManager.getSettings('env'))) {
150
+ clearInterval(intervalTimer);
151
+ clearTimeout(timeoutTimer);
152
+
153
+ try {
154
+ const confirmed = await this._promptDeviceInBootloaderForWebDevice({
155
+ device: this.device,
156
+ });
157
+ if (confirmed) {
158
+ await this._checkDeviceInBootloaderMode(connectId, intervalTimer, timeoutTimer);
159
+ }
160
+ } catch (e) {
161
+ Log.log(
162
+ 'FirmwareUpdateV2 [checkDeviceToBootloader] promptDeviceInBootloaderForWebDevice failed: ',
163
+ e
164
+ );
165
+ this.checkPromise?.reject(e);
166
+ }
167
+ return;
168
+ }
169
+
117
170
  if (isBleReconnect) {
118
171
  try {
119
172
  await this.device.deviceConnector?.acquire(
@@ -131,26 +184,14 @@ export default class FirmwareUpdateV2 extends BaseMethod<Params> {
131
184
  Log.log('catch Bluetooth error when device is restarting: ', e);
132
185
  }
133
186
  } else {
134
- const deviceDiff = await this.device.deviceConnector?.enumerate();
135
- const devicesDescriptor = deviceDiff?.descriptors ?? [];
136
- const { deviceList } = await DevicePool.getDevices(devicesDescriptor, connectId);
137
-
138
- if (deviceList.length === 1 && deviceList[0]?.features?.bootloader_mode) {
139
- // should update current device from cache
140
- // because device was reboot and had some new requests
141
- this.device.updateFromCache(deviceList[0]);
142
- this.device.commands.disposed = false;
143
-
144
- clearInterval(intervalTimer);
145
- this.checkPromise?.resolve(true);
146
- }
187
+ await this._checkDeviceInBootloaderMode(connectId, intervalTimer, timeoutTimer);
147
188
  }
148
189
  },
149
190
  isBleReconnect ? 3000 : 2000
150
191
  );
151
192
 
152
193
  // check goto bootloader mode timeout and throw error
153
- setTimeout(() => {
194
+ timeoutTimer = setTimeout(() => {
154
195
  if (this.checkPromise) {
155
196
  clearInterval(intervalTimer);
156
197
  this.checkPromise.reject(new Error());
@@ -158,6 +199,29 @@ export default class FirmwareUpdateV2 extends BaseMethod<Params> {
158
199
  }, 30000);
159
200
  }
160
201
 
202
+ private async _checkDeviceInBootloaderMode(
203
+ connectId: string | undefined,
204
+ intervalTimer?: ReturnType<typeof setInterval>,
205
+ timeoutTimer?: ReturnType<typeof setTimeout>
206
+ ) {
207
+ const deviceDiff = await this.device.deviceConnector?.enumerate();
208
+ const devicesDescriptor = deviceDiff?.descriptors ?? [];
209
+ const { deviceList } = await DevicePool.getDevices(devicesDescriptor, connectId);
210
+
211
+ if (deviceList.length === 1 && deviceList[0]?.features?.bootloader_mode) {
212
+ // should update current device from cache
213
+ // because device was reboot and had some new requests
214
+ this.device.updateFromCache(deviceList[0]);
215
+ this.device.commands.disposed = false;
216
+
217
+ if (intervalTimer) clearInterval(intervalTimer);
218
+ if (timeoutTimer) clearTimeout(timeoutTimer);
219
+ this.checkPromise?.resolve(true);
220
+ return true;
221
+ }
222
+ return false;
223
+ }
224
+
161
225
  isEnteredManuallyBoot(features: Features) {
162
226
  const deviceType = getDeviceType(features);
163
227
  const isMini = deviceType === EDeviceType.Mini;
package/src/core/index.ts CHANGED
@@ -162,6 +162,10 @@ export const callAPI = async (message: CoreMessage) => {
162
162
  );
163
163
  device.on(DEVICE.PASSPHRASE_ON_DEVICE, onEnterPassphraseOnDeviceHandler);
164
164
  device.on(DEVICE.FEATURES, onDeviceFeaturesHandler);
165
+ device.on(
166
+ DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE,
167
+ onSelectDeviceInBootloaderForWebDeviceHandler
168
+ );
165
169
 
166
170
  try {
167
171
  const inner = async (): Promise<void> => {
@@ -710,6 +714,20 @@ const onEnterPassphraseOnDeviceHandler = (
710
714
  );
711
715
  };
712
716
 
717
+ const onSelectDeviceInBootloaderForWebDeviceHandler = async (
718
+ ...[device, callback]: [...DeviceEvents['select_device_in_bootloader_for_web_device']]
719
+ ) => {
720
+ Log.debug('onSelectDeviceInBootloaderForWebDeviceHandler');
721
+ const uiPromise = createUiPromise(UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE, device);
722
+ postMessage(
723
+ createUiMessage(UI_REQUEST.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE, {
724
+ device: device.toMessageObject() as KnownDevice,
725
+ })
726
+ );
727
+ const uiResp = await uiPromise.promise;
728
+ callback(null, uiResp.payload.deviceId);
729
+ };
730
+
713
731
  /**
714
732
  * Emit message to listener (parent).
715
733
  * Clear method reference from _callMethods
@@ -739,7 +757,8 @@ export default class Core extends EventEmitter {
739
757
  async handleMessage(message: CoreMessage) {
740
758
  switch (message.type) {
741
759
  case UI_RESPONSE.RECEIVE_PIN:
742
- case UI_RESPONSE.RECEIVE_PASSPHRASE: {
760
+ case UI_RESPONSE.RECEIVE_PASSPHRASE:
761
+ case UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: {
743
762
  const uiPromise = findUiPromise(message.type);
744
763
  if (uiPromise) {
745
764
  Log.log('receive UI Response: ', message.type);
@@ -63,6 +63,10 @@ export interface DeviceEvents {
63
63
  [DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
64
64
  [DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
65
65
  [DEVICE.PASSPHRASE]: [Device, (response: PassphrasePromptResponse, error?: Error) => void];
66
+ [DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
67
+ Device,
68
+ (err: any, deviceId: string) => void
69
+ ];
66
70
  }
67
71
 
68
72
  export interface Device {
@@ -25,6 +25,7 @@ export const DEVICE = {
25
25
  PASSPHRASE_ON_DEVICE: 'passphrase_on_device',
26
26
  WORD: 'word',
27
27
  SUPPORT_FEATURES: 'support_features',
28
+ SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: 'select_device_in_bootloader_for_web_device',
28
29
 
29
30
  FEATURES: 'features',
30
31
  } as const;
@@ -11,6 +11,8 @@ export const UI_REQUEST = {
11
11
  REQUEST_BUTTON: 'ui-button',
12
12
  REQUEST_PASSPHRASE: 'ui-request_passphrase',
13
13
  REQUEST_PASSPHRASE_ON_DEVICE: 'ui-request_passphrase_on_device',
14
+ REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE:
15
+ 'ui-request_select_device_in_bootloader_for_web_device',
14
16
 
15
17
  CLOSE_UI_WINDOW: 'ui-close_window',
16
18
  DEVICE_PROGRESS: 'ui-device_progress',
@@ -78,6 +80,13 @@ export interface UiRequestPassphraseOnDevice {
78
80
  };
79
81
  }
80
82
 
83
+ export interface UiRequestSelectDeviceInBootloaderForWebDevice {
84
+ type: typeof UI_REQUEST.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
85
+ payload: {
86
+ device: Device;
87
+ };
88
+ }
89
+
81
90
  export interface FirmwareProgress {
82
91
  type: typeof UI_REQUEST.FIRMWARE_PROGRESS;
83
92
  payload: {
@@ -118,6 +127,7 @@ export type UiEvent =
118
127
  | UiRequestButton
119
128
  | UiRequestPassphraseOnDevice
120
129
  | UiRequestPassphrase
130
+ | UiRequestSelectDeviceInBootloaderForWebDevice
121
131
  | FirmwareProgress
122
132
  | FirmwareTip
123
133
  | DeviceProgress
@@ -4,6 +4,8 @@ import type { MessageFactoryFn } from './utils';
4
4
  export const UI_RESPONSE = {
5
5
  RECEIVE_PIN: 'ui-receive_pin',
6
6
  RECEIVE_PASSPHRASE: 'ui-receive_passphrase',
7
+ SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE:
8
+ 'ui-receive_select-device-in-bootloader-for-web-device',
7
9
  } as const;
8
10
 
9
11
  export interface UiResponsePin {
@@ -20,7 +22,17 @@ export interface UiResponsePassphrase {
20
22
  };
21
23
  }
22
24
 
23
- export type UiResponseEvent = UiResponsePin | UiResponsePassphrase;
25
+ export interface UiResponseSelectDeviceInBootloaderForWebDevice {
26
+ type: typeof UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
27
+ payload: {
28
+ deviceId: string;
29
+ };
30
+ }
31
+
32
+ export type UiResponseEvent =
33
+ | UiResponsePin
34
+ | UiResponsePassphrase
35
+ | UiResponseSelectDeviceInBootloaderForWebDevice;
24
36
 
25
37
  export type UiResponseMessage = UiResponseEvent & { event: typeof UI_EVENT };
26
38