@onekeyfe/hd-core 1.2.8-alpha.119 → 1.2.8-alpha.120

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -40784,6 +40784,9 @@ class Log$n {
40784
40784
  }
40785
40785
  const _logs = {};
40786
40786
  const initLog = (prefix, enabled) => {
40787
+ const existing = _logs[prefix];
40788
+ if (existing)
40789
+ return existing;
40787
40790
  const instance = new Log$n(prefix, !!enabled);
40788
40791
  _logs[prefix] = instance;
40789
40792
  return instance;
@@ -52631,6 +52634,8 @@ const PROTOCOL_V2_CONNECT_POLL_INTERVAL = 500;
52631
52634
  const PROTOCOL_V2_CONNECT_SINGLE_TIMEOUT = 75 * 1000;
52632
52635
  const PROTOCOL_V2_DEVICE_INFO_READY_TIMEOUT = 30 * 1000;
52633
52636
  const PROTOCOL_V2_FILE_TRANSFER_RETRY_COUNT = 3;
52637
+ const PROTOCOL_V2_RESOURCE_HEADER_RECOVERY_LIMIT = 2;
52638
+ const PROTOCOL_V2_BLE_FILE_WRITE_WINDOW_MIN_BOOTLOADER_VERSION = '1.0.4';
52634
52639
  const PROTOCOL_V2_TRANSFER_PROGRESS_HEARTBEAT_MS = 1000;
52635
52640
  const PROTOCOL_V2_INSTALL_STATUS_CONFLICT_CODE = 'FirmwareInstallStatusConflict';
52636
52641
  const PROTOCOL_V2_INSTALL_FAILED_CODE = 'FirmwareInstallFailed';
@@ -52678,6 +52683,11 @@ function assertProtocolV2FirmwareTargetsSupported(deviceType, params, hasExplici
52678
52683
  : `Cannot safely update ${targetList} without a confirmed Pro2 device type`;
52679
52684
  throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.DeviceNotSupportMethod, message);
52680
52685
  }
52686
+ function supportsProtocolV2BleFileWriteWindow(bootloaderVersion, minBootloaderVersion = PROTOCOL_V2_BLE_FILE_WRITE_WINDOW_MIN_BOOTLOADER_VERSION) {
52687
+ return (!!minBootloaderVersion &&
52688
+ !!semver__default["default"].valid(bootloaderVersion) &&
52689
+ semver__default["default"].gte(bootloaderVersion, minBootloaderVersion));
52690
+ }
52681
52691
  const getProtocolV2DeviceTransferProgress = (bytesBeforeChunk, bytesAfterChunk, totalBytes) => {
52682
52692
  if (!Number.isFinite(totalBytes) || totalBytes <= 0) {
52683
52693
  return 0;
@@ -52687,6 +52697,8 @@ const getProtocolV2DeviceTransferProgress = (bytesBeforeChunk, bytesAfterChunk,
52687
52697
  }
52688
52698
  return Math.min(Math.max(Math.ceil((bytesAfterChunk / totalBytes) * 100), 1), 99);
52689
52699
  };
52700
+ const getProtocolV2TransferRate = (bytes, elapsedMs) => elapsedMs > 0 ? Math.round((bytes / elapsedMs) * 1000) : undefined;
52701
+ const getProtocolV2ElapsedMs = (startedAt, now = Date.now()) => Math.max(now - startedAt, 0);
52690
52702
  const PROTOCOL_V2_REMOTE_COMPONENT_TARGETS = {
52691
52703
  BOOTLOADER: {
52692
52704
  fileName: 'bootloader.bin',
@@ -52787,6 +52799,21 @@ const getProtocolV2ErrorCode = (error) => {
52787
52799
  const causeCode = errorCode !== null && errorCode !== void 0 ? errorCode : code;
52788
52800
  return typeof causeCode === 'number' || typeof causeCode === 'string' ? causeCode : undefined;
52789
52801
  };
52802
+ const isProtocolV2ResourceHeaderLinkError = (error) => {
52803
+ if (isProtocolV2DeviceDisconnectedError(error))
52804
+ return true;
52805
+ const errorCode = getProtocolV2ErrorCode(error);
52806
+ if (errorCode === hdShared.HardwareErrorCode.BleTimeoutError)
52807
+ return true;
52808
+ const message = getProtocolV2UnknownErrorText(error);
52809
+ if (errorCode === hdShared.HardwareErrorCode.TransportNotFound && /not connected/i.test(message)) {
52810
+ return true;
52811
+ }
52812
+ return (message.includes('ProtocolV2LinkError') ||
52813
+ message.includes('Device protocol has not been detected') ||
52814
+ message.includes('Electron BLE device state cleaned') ||
52815
+ message.includes('Electron BLE transport released'));
52816
+ };
52790
52817
  const isProtocolV2TerminalInstallStatusError = (error) => {
52791
52818
  var _a;
52792
52819
  return error instanceof hdShared.HardwareError &&
@@ -52917,6 +52944,7 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
52917
52944
  this.protocolV2InstallTerminalSuccessObserved = false;
52918
52945
  this.protocolV2LastTransferProgressAt = 0;
52919
52946
  this.protocolV2LastTransferredBytes = 0;
52947
+ this.protocolV2FileWriteWindowDisabled = false;
52920
52948
  }
52921
52949
  getSupportedProtocols() {
52922
52950
  return ['V2'];
@@ -53063,7 +53091,7 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
53063
53091
  componentArtifacts: preparedPlan ? undefined : payload.componentArtifacts,
53064
53092
  };
53065
53093
  }
53066
- getProtocolV2FirmwareChunkSize(direction, filePath) {
53094
+ getProtocolV2FirmwareChunkSize(direction, filePath, fileWriteWindow = false) {
53067
53095
  var _a, _b;
53068
53096
  const payloadChunkSize = Number((_a = this.params) === null || _a === void 0 ? void 0 : _a.chunkSize);
53069
53097
  const env = DataManager.getSettings('env');
@@ -53073,6 +53101,9 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
53073
53101
  if (direction === 'read') {
53074
53102
  maxChunkSize = hdTransport.PROTOCOL_V2_BLE_FILE_READ_CHUNK_SIZE;
53075
53103
  }
53104
+ else if (fileWriteWindow) {
53105
+ maxChunkSize = hdTransport.PROTOCOL_V2_BLE_FILE_CHUNK_SIZE;
53106
+ }
53076
53107
  else {
53077
53108
  maxChunkSize = PROTOCOL_V2_FIRMWARE_STAGING_PATHS.has(filePath !== null && filePath !== void 0 ? filePath : '')
53078
53109
  ? hdTransport.PROTOCOL_V2_BLE_FIRMWARE_FILE_CHUNK_SIZE
@@ -53887,11 +53918,33 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
53887
53918
  return true;
53888
53919
  }
53889
53920
  catch (error) {
53921
+ if (isProtocolV2ResourceHeaderLinkError(error))
53922
+ throw error;
53890
53923
  Log$6.log(`[FirmwareUpdateV4] RESC bundle ${bundle.name} header check failed: `, error);
53891
53924
  return false;
53892
53925
  }
53893
53926
  });
53894
53927
  }
53928
+ isProtocolV2ResourceBundleUpToDateWithRecovery(bundle, recovery) {
53929
+ return __awaiter(this, void 0, void 0, function* () {
53930
+ for (;;) {
53931
+ try {
53932
+ return yield this.isProtocolV2ResourceBundleUpToDate(bundle);
53933
+ }
53934
+ catch (error) {
53935
+ this.throwIfAborted();
53936
+ if (recovery.remaining <= 0) {
53937
+ Log$6.log(`[FirmwareUpdateV4] RESC bundle ${bundle.name} header check lost the link; reconnect budget used up: `, getProtocolV2UnknownErrorText(error));
53938
+ return false;
53939
+ }
53940
+ recovery.remaining -= 1;
53941
+ Log$6.log(`[FirmwareUpdateV4] RESC bundle ${bundle.name} header check lost the link; reconnecting: `, getProtocolV2UnknownErrorText(error));
53942
+ }
53943
+ yield this.recoverProtocolV2FileTransfer();
53944
+ this.throwIfAborted();
53945
+ }
53946
+ });
53947
+ }
53895
53948
  isProtocolV2BootloaderMode() {
53896
53949
  var _a, _b, _c;
53897
53950
  if (typeof this.device.isBootloader === 'function') {
@@ -54070,8 +54123,9 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
54070
54123
  return __awaiter(this, void 0, void 0, function* () {
54071
54124
  let totalSize = installSources.reduce((total, item) => total + item.source.size, 0);
54072
54125
  const resourcesToSync = [];
54126
+ const headerRecovery = { remaining: PROTOCOL_V2_RESOURCE_HEADER_RECOVERY_LIMIT };
54073
54127
  for (const resource of resourceSources) {
54074
- if (yield this.isProtocolV2ResourceBundleUpToDate(resource)) {
54128
+ if (yield this.isProtocolV2ResourceBundleUpToDateWithRecovery(resource, headerRecovery)) {
54075
54129
  Log$6.log(`[FirmwareUpdateV4] skip RESC bundle ${resource.name}; already up to date`);
54076
54130
  }
54077
54131
  else {
@@ -54116,13 +54170,20 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
54116
54170
  });
54117
54171
  }
54118
54172
  if (totalSize > 0) {
54119
- const elapsedMs = Math.max(Date.now() - transferStartedAt, 0);
54173
+ const elapsedMs = getProtocolV2ElapsedMs(transferStartedAt);
54174
+ const rateBytesPerSecond = getProtocolV2TransferRate(totalSize, elapsedMs);
54120
54175
  this.postProgressMessage(100, 'transferData', {
54121
54176
  transferredBytes: totalSize,
54122
54177
  totalBytes: totalSize,
54123
- rateBytesPerSecond: elapsedMs > 0 ? Math.round((totalSize / elapsedMs) * 1000) : undefined,
54178
+ rateBytesPerSecond,
54124
54179
  elapsedMs,
54125
54180
  });
54181
+ Log$6.debug('[FirmwareUpdateV4] Protocol V2 transfer completed', {
54182
+ files: resourcesToSync.length + installSources.length,
54183
+ totalBytes: totalSize,
54184
+ elapsedMs,
54185
+ rateBytesPerSecond,
54186
+ });
54126
54187
  }
54127
54188
  if (stagedInstallTargets.length === 0) {
54128
54189
  return;
@@ -54132,10 +54193,15 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
54132
54193
  target_id: item.targetId,
54133
54194
  path: item.path,
54134
54195
  }));
54196
+ const installStartedAt = Date.now();
54135
54197
  try {
54136
54198
  yield this.protocolV2StartFirmwareUpdate({ targets });
54137
54199
  yield hdShared.wait(PROTOCOL_V2_INSTALL_STATUS_INITIAL_DELAY);
54138
54200
  yield this.waitForProtocolV2FirmwareUpdateComplete(targets, true);
54201
+ Log$6.debug('[FirmwareUpdateV4] Protocol V2 install completed', {
54202
+ targets: targets.length,
54203
+ elapsedMs: getProtocolV2ElapsedMs(installStartedAt),
54204
+ });
54139
54205
  }
54140
54206
  finally {
54141
54207
  (_a = this.device) === null || _a === void 0 ? void 0 : _a.clearCancelableAction();
@@ -54144,51 +54210,84 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
54144
54210
  }
54145
54211
  protocolV2SourceUpdateProcess({ source, filePath, processedSize, totalSize, transferStartedAt = Date.now(), }) {
54146
54212
  return __awaiter(this, void 0, void 0, function* () {
54213
+ const reportConfirmedChunk = (chunkEnd) => {
54214
+ const transferredBytes = processedSize + chunkEnd;
54215
+ const now = Date.now();
54216
+ const elapsedMs = getProtocolV2ElapsedMs(transferStartedAt, now);
54217
+ const progress = Math.min(Math.ceil((transferredBytes / totalSize) * 100), 99);
54218
+ const shouldPostProgress = transferredBytes >= this.protocolV2LastTransferredBytes &&
54219
+ (progress !== this.protocolV2LastTransferProgress ||
54220
+ now - this.protocolV2LastTransferProgressAt >=
54221
+ PROTOCOL_V2_TRANSFER_PROGRESS_HEARTBEAT_MS ||
54222
+ chunkEnd === source.size);
54223
+ if (shouldPostProgress) {
54224
+ this.protocolV2LastTransferProgress = progress;
54225
+ this.protocolV2LastTransferProgressAt = now;
54226
+ this.protocolV2LastTransferredBytes = transferredBytes;
54227
+ this.postProgressMessage(progress, 'transferData', {
54228
+ transferredBytes,
54229
+ totalBytes: totalSize,
54230
+ rateBytesPerSecond: getProtocolV2TransferRate(transferredBytes, elapsedMs),
54231
+ elapsedMs,
54232
+ });
54233
+ }
54234
+ };
54147
54235
  let lastError;
54148
54236
  for (let attempt = 1; attempt <= PROTOCOL_V2_FILE_TRANSFER_RETRY_COUNT; attempt += 1) {
54149
54237
  this.throwIfAborted();
54238
+ const attemptStartedAt = Date.now();
54239
+ let windowed = false;
54150
54240
  try {
54151
- yield writeFirmwareByteSource({
54152
- source,
54153
- chunkSize: this.getProtocolV2FirmwareChunkSize('write', filePath),
54154
- write: ({ data, sourceOffset, length, first }) => __awaiter(this, void 0, void 0, function* () {
54155
- this.throwIfAborted();
54156
- const chunkEnd = sourceOffset + length;
54157
- const deviceProgress = getProtocolV2DeviceTransferProgress(processedSize + sourceOffset, processedSize + chunkEnd, totalSize);
54158
- const response = yield this.fileWriteChunk(filePath, source.size, sourceOffset, data, first, deviceProgress);
54159
- const rawProcessedByte = response.message.processed_byte;
54160
- const nextOffset = rawProcessedByte === undefined ? chunkEnd : Number(rawProcessedByte);
54161
- if (!Number.isFinite(nextOffset) || nextOffset !== chunkEnd) {
54162
- throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.EmmcFileWriteFirmwareError, `invalid processed_byte ${rawProcessedByte} for offset ${sourceOffset}`);
54163
- }
54164
- const transferredBytes = processedSize + chunkEnd;
54165
- const now = Date.now();
54166
- const elapsedMs = Math.max(now - transferStartedAt, 0);
54167
- const progress = Math.min(Math.ceil((transferredBytes / totalSize) * 100), 99);
54168
- const shouldPostProgress = transferredBytes >= this.protocolV2LastTransferredBytes &&
54169
- (progress !== this.protocolV2LastTransferProgress ||
54170
- now - this.protocolV2LastTransferProgressAt >=
54171
- PROTOCOL_V2_TRANSFER_PROGRESS_HEARTBEAT_MS ||
54172
- chunkEnd === source.size);
54173
- if (shouldPostProgress) {
54174
- this.protocolV2LastTransferProgress = progress;
54175
- this.protocolV2LastTransferProgressAt = now;
54176
- this.protocolV2LastTransferredBytes = transferredBytes;
54177
- this.postProgressMessage(progress, 'transferData', {
54178
- transferredBytes,
54179
- totalBytes: totalSize,
54180
- rateBytesPerSecond: elapsedMs > 0 ? Math.round((transferredBytes / elapsedMs) * 1000) : undefined,
54181
- elapsedMs,
54182
- });
54183
- }
54184
- return length;
54185
- }),
54241
+ windowed =
54242
+ !this.protocolV2FileWriteWindowDisabled && this.shouldUseProtocolV2BleFileWriteWindow();
54243
+ const chunkSize = this.getProtocolV2FirmwareChunkSize('write', filePath, windowed);
54244
+ if (windowed) {
54245
+ yield this.writeProtocolV2SourceWindowed({
54246
+ source,
54247
+ filePath,
54248
+ chunkSize,
54249
+ processedSize,
54250
+ totalSize,
54251
+ onChunkConfirmed: reportConfirmedChunk,
54252
+ });
54253
+ }
54254
+ else {
54255
+ yield writeFirmwareByteSource({
54256
+ source,
54257
+ chunkSize,
54258
+ write: ({ data, sourceOffset, length, first }) => __awaiter(this, void 0, void 0, function* () {
54259
+ this.throwIfAborted();
54260
+ const chunkEnd = sourceOffset + length;
54261
+ const deviceProgress = getProtocolV2DeviceTransferProgress(processedSize + sourceOffset, processedSize + chunkEnd, totalSize);
54262
+ const response = yield this.fileWriteChunk(filePath, source.size, sourceOffset, data, first, deviceProgress);
54263
+ const rawProcessedByte = response.message.processed_byte;
54264
+ const nextOffset = rawProcessedByte === undefined ? chunkEnd : Number(rawProcessedByte);
54265
+ if (!Number.isFinite(nextOffset) || nextOffset !== chunkEnd) {
54266
+ throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.EmmcFileWriteFirmwareError, `invalid processed_byte ${rawProcessedByte} for offset ${sourceOffset}`);
54267
+ }
54268
+ reportConfirmedChunk(chunkEnd);
54269
+ return length;
54270
+ }),
54271
+ });
54272
+ }
54273
+ Log$6.debug('[FirmwareUpdateV4] Protocol V2 file transferred', {
54274
+ path: filePath,
54275
+ bytes: source.size,
54276
+ elapsedMs: getProtocolV2ElapsedMs(attemptStartedAt),
54277
+ attempt,
54278
+ fileWriteWindow: windowed ? hdTransport.PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW : 1,
54186
54279
  });
54187
54280
  return processedSize + source.size;
54188
54281
  }
54189
54282
  catch (error) {
54190
54283
  this.throwIfAborted();
54191
54284
  lastError = error;
54285
+ Log$6.debug('[FirmwareUpdateV4] Protocol V2 file transfer attempt failed', {
54286
+ path: filePath,
54287
+ attempt,
54288
+ fileWriteWindow: windowed ? hdTransport.PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW : 1,
54289
+ error: getProtocolV2UnknownErrorText(error),
54290
+ });
54192
54291
  if (attempt < PROTOCOL_V2_FILE_TRANSFER_RETRY_COUNT) {
54193
54292
  yield this.recoverProtocolV2FileTransfer();
54194
54293
  this.throwIfAborted();
@@ -54871,16 +54970,96 @@ class FirmwareUpdateV4 extends FirmwareUpdateBaseMethod {
54871
54970
  return writeRes;
54872
54971
  });
54873
54972
  }
54973
+ shouldUseProtocolV2BleFileWriteWindow(minBootloaderVersion = PROTOCOL_V2_BLE_FILE_WRITE_WINDOW_MIN_BOOTLOADER_VERSION) {
54974
+ var _a, _b;
54975
+ const env = DataManager.getSettings('env');
54976
+ if ((env !== 'react-native' && env !== 'desktop-web-ble') ||
54977
+ !this.isProtocolV2BootloaderMode()) {
54978
+ return false;
54979
+ }
54980
+ const bootloaderVersion = getDeviceBootloaderVersion(this.device.features).join('.');
54981
+ const enabled = supportsProtocolV2BleFileWriteWindow(bootloaderVersion, minBootloaderVersion);
54982
+ Log$6.debug('[FirmwareUpdateV4] BLE FileWrite window', {
54983
+ enabled,
54984
+ bootloaderVersion,
54985
+ bootloaderBuildId: (_b = (_a = this.device.features) === null || _a === void 0 ? void 0 : _a.verify) === null || _b === void 0 ? void 0 : _b.bootloaderBuildId,
54986
+ });
54987
+ return enabled;
54988
+ }
54989
+ writeProtocolV2SourceWindowed({ source, filePath, chunkSize, processedSize, totalSize, onChunkConfirmed, }) {
54990
+ return __awaiter(this, void 0, void 0, function* () {
54991
+ let sendOffset = 0;
54992
+ let sourceError;
54993
+ const readRequest = () => __awaiter(this, void 0, void 0, function* () {
54994
+ const offset = sendOffset;
54995
+ const length = Math.min(chunkSize, source.size - offset);
54996
+ const data = yield source.readAt(offset, length);
54997
+ sendOffset += length;
54998
+ return {
54999
+ file: { path: filePath, offset, total_size: source.size, data },
55000
+ overwrite: offset === 0,
55001
+ append: false,
55002
+ ui_percentage: getProtocolV2DeviceTransferProgress(processedSize + offset, processedSize + sendOffset, totalSize),
55003
+ };
55004
+ });
55005
+ const nextRequest = () => __awaiter(this, void 0, void 0, function* () {
55006
+ var _a;
55007
+ if (((_a = this.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) || sendOffset >= source.size)
55008
+ return undefined;
55009
+ try {
55010
+ return yield readRequest();
55011
+ }
55012
+ catch (error) {
55013
+ sourceError = error;
55014
+ return undefined;
55015
+ }
55016
+ });
55017
+ this.throwIfAborted();
55018
+ if (source.size === 0)
55019
+ return;
55020
+ const firstRequest = yield readRequest();
55021
+ const response = yield this.device
55022
+ .getCommands()
55023
+ .typedCall('FilesystemFileWrite', 'FilesystemFile', firstRequest, {
55024
+ timeoutMs: PROTOCOL_V2_FILE_WRITE_RESPONSE_TIMEOUT,
55025
+ writeWithResponse: false,
55026
+ fileWritePipeline: {
55027
+ next: nextRequest,
55028
+ onResponse: confirmed => {
55029
+ onChunkConfirmed(Number(confirmed.message.processed_byte));
55030
+ },
55031
+ },
55032
+ })
55033
+ .catch((error) => {
55034
+ this.protocolV2FileWriteWindowDisabled = true;
55035
+ throw error;
55036
+ });
55037
+ this.throwIfAborted();
55038
+ if (sourceError)
55039
+ throw sourceError;
55040
+ const rawProcessedByte = response.message.processed_byte;
55041
+ if (Number(rawProcessedByte) !== source.size) {
55042
+ this.protocolV2FileWriteWindowDisabled = true;
55043
+ throw hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.EmmcFileWriteFirmwareError, `invalid processed_byte ${rawProcessedByte} for file size ${source.size}`);
55044
+ }
55045
+ });
55046
+ }
54874
55047
  recoverProtocolV2FileTransfer() {
54875
55048
  return __awaiter(this, void 0, void 0, function* () {
54876
- const env = DataManager.getSettings('env');
54877
- if (DataManager.isBleConnect(env)) {
54878
- yield hdShared.wait(3000);
55049
+ try {
55050
+ const env = DataManager.getSettings('env');
55051
+ if (DataManager.isBleConnect(env)) {
55052
+ yield hdShared.wait(3000);
55053
+ }
55054
+ yield this.reconnectProtocolV2Device();
55055
+ yield this.verifyProtocolV2ReconnectIdentity();
55056
+ yield this.device.initialize();
55057
+ yield hdShared.wait(2000);
55058
+ }
55059
+ catch (error) {
55060
+ this.throwIfAborted();
55061
+ throw error;
54879
55062
  }
54880
- yield this.reconnectProtocolV2Device();
54881
- yield this.verifyProtocolV2ReconnectIdentity();
54882
- yield this.device.initialize();
54883
- yield hdShared.wait(2000);
54884
55063
  });
54885
55064
  }
54886
55065
  acquireProtocolV2BleDevice(skipProtocolProbe = false) {
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,KAAK,UAAU,GAAG;IA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,oBAAoB;IACxB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IACnC,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,kBAAkB,+BAA+B;IACjD,QAAQ,uBAAuB;IAC/B,eAAe,8BAA8B;IAC7C,mBAAmB,kCAAkC;IACrD,cAAc,6BAA6B;IAC3C,iBAAiB,iCAAiC;IAClD,iBAAiB,gCAAgC;IACjD,kBAAkB,kCAAkC;IACpD,OAAO,oBAAoB;IAC3B,MAAM,WAAW;IACjB,WAAW,kBAAkB;IAC7B,MAAM,aAAa;CACpB;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;CAoBrB,CAAC;AAEF,eAAO,MAAM,SAAS,QAAS,WAAW,QAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-core",
3
- "version": "1.2.8-alpha.119",
3
+ "version": "1.2.8-alpha.120",
4
4
  "description": "Core processes and APIs for communicating with OneKey hardware devices.",
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.2.8-alpha.119",
29
- "@onekeyfe/hd-transport": "1.2.8-alpha.119",
28
+ "@onekeyfe/hd-shared": "1.2.8-alpha.120",
29
+ "@onekeyfe/hd-transport": "1.2.8-alpha.120",
30
30
  "axios": "1.15.2",
31
31
  "bignumber.js": "^9.0.2",
32
32
  "buffer": "^6.0.3",
@@ -46,5 +46,5 @@
46
46
  "@types/w3c-web-usb": "^1.0.10",
47
47
  "@types/web-bluetooth": "^0.0.21"
48
48
  },
49
- "gitHead": "26953c0d533e9a05980abc8ea43e7bbd45ead861"
49
+ "gitHead": "55dea2982ecb17d1699b0226690b4ee3795e97a6"
50
50
  }