@onekeyfe/hd-core 1.0.36-alpha.1 → 1.0.37
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
|
@@ -24989,12 +24989,18 @@ const supportBatchPublicKey = (features, options) => {
|
|
|
24989
24989
|
if (!!(options === null || options === void 0 ? void 0 : options.includeNode) && deviceType === hdShared.EDeviceType.Pro) {
|
|
24990
24990
|
return semver__default["default"].gte(currentVersion, '4.14.0');
|
|
24991
24991
|
}
|
|
24992
|
+
if (!!(options === null || options === void 0 ? void 0 : options.includeNode) && deviceType === hdShared.EDeviceType.Touch) {
|
|
24993
|
+
return semver__default["default"].gte(currentVersion, '4.11.0');
|
|
24994
|
+
}
|
|
24992
24995
|
if (!!(options === null || options === void 0 ? void 0 : options.includeNode) && DeviceModelToTypes.model_classic1s.includes(deviceType)) {
|
|
24993
24996
|
return semver__default["default"].gte(currentVersion, '3.12.0');
|
|
24994
24997
|
}
|
|
24995
|
-
if (!!(options === null || options === void 0 ? void 0 : options.includeNode) &&
|
|
24998
|
+
if (!!(options === null || options === void 0 ? void 0 : options.includeNode) && DeviceModelToTypes.model_mini.includes(deviceType)) {
|
|
24996
24999
|
return semver__default["default"].gte(currentVersion, '3.10.0');
|
|
24997
25000
|
}
|
|
25001
|
+
if (options === null || options === void 0 ? void 0 : options.includeNode) {
|
|
25002
|
+
return false;
|
|
25003
|
+
}
|
|
24998
25004
|
if (deviceType === hdShared.EDeviceType.Touch || deviceType === hdShared.EDeviceType.Pro) {
|
|
24999
25005
|
return semver__default["default"].gte(currentVersion, '3.1.0');
|
|
25000
25006
|
}
|
|
@@ -29116,10 +29122,10 @@ class FirmwareUpdateBaseMethod extends BaseMethod {
|
|
|
29116
29122
|
let progress;
|
|
29117
29123
|
if (totalSize !== undefined && processedSize !== undefined) {
|
|
29118
29124
|
currentFileProcessed = processedSize + chunkEnd;
|
|
29119
|
-
progress = Math.min(Math.
|
|
29125
|
+
progress = Math.min(Math.ceil((currentFileProcessed / totalSize) * 100), 99);
|
|
29120
29126
|
}
|
|
29121
29127
|
else {
|
|
29122
|
-
progress = Math.min(Math.
|
|
29128
|
+
progress = Math.min(Math.ceil(((i + 1) / totalChunks) * 100), 99);
|
|
29123
29129
|
}
|
|
29124
29130
|
const writeRes = yield this.emmcFileWriteWithRetry(filePath, chunkLength, offset, chunk, overwrite, progress);
|
|
29125
29131
|
offset += writeRes.message.processed_byte;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceFeaturesUtils.d.ts","sourceRoot":"","sources":["../../src/utils/deviceFeaturesUtils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE7D,OAAoB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE1F,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAI1C,eAAO,MAAM,wBAAwB,aACzB,QAAQ,GAAG,SAAS,KAC7B;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,cAAc,EAAE,cAAc,CAAA;CAiClD,CAAC;AAEF,eAAO,MAAM,yBAAyB,aAAc,QAAQ,KAAG,kBAU9D,CAAC;AAEF,eAAO,MAAM,oBAAoB,cAAe,QAAQ,KAAG,kBAW1D,CAAC;AAEF,eAAO,MAAM,uCAAuC,WAAkB,MAAM,4BAqB3E,CAAC;AAEF,eAAO,MAAM,kBAAkB,aACnB,QAAQ,GAAG,SAAS,YACpB,cAAc,4BAgBzB,CAAC;AAEF,eAAO,MAAM,qBAAqB,cACrB,QAAQ,YACT;IACR,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,KACA,
|
|
1
|
+
{"version":3,"file":"deviceFeaturesUtils.d.ts","sourceRoot":"","sources":["../../src/utils/deviceFeaturesUtils.ts"],"names":[],"mappings":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fe/hd-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
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.
|
|
29
|
-
"@onekeyfe/hd-transport": "^1.0.
|
|
28
|
+
"@onekeyfe/hd-shared": "^1.0.37",
|
|
29
|
+
"@onekeyfe/hd-transport": "^1.0.37",
|
|
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": "
|
|
49
|
+
"gitHead": "da0c9ea1fafecff38f87b243cb072c175ad5c5f2"
|
|
50
50
|
}
|
|
@@ -306,9 +306,9 @@ export class FirmwareUpdateBaseMethod<Params> extends BaseMethod<Params> {
|
|
|
306
306
|
let progress: number;
|
|
307
307
|
if (totalSize !== undefined && processedSize !== undefined) {
|
|
308
308
|
currentFileProcessed = processedSize + chunkEnd;
|
|
309
|
-
progress = Math.min(Math.
|
|
309
|
+
progress = Math.min(Math.ceil((currentFileProcessed / totalSize) * 100), 99);
|
|
310
310
|
} else {
|
|
311
|
-
progress = Math.min(Math.
|
|
311
|
+
progress = Math.min(Math.ceil(((i + 1) / totalChunks) * 100), 99);
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
const writeRes = await this.emmcFileWriteWithRetry(
|
|
@@ -130,12 +130,18 @@ export const supportBatchPublicKey = (
|
|
|
130
130
|
if (!!options?.includeNode && deviceType === EDeviceType.Pro) {
|
|
131
131
|
return semver.gte(currentVersion, '4.14.0');
|
|
132
132
|
}
|
|
133
|
+
if (!!options?.includeNode && deviceType === EDeviceType.Touch) {
|
|
134
|
+
return semver.gte(currentVersion, '4.11.0');
|
|
135
|
+
}
|
|
133
136
|
if (!!options?.includeNode && DeviceModelToTypes.model_classic1s.includes(deviceType)) {
|
|
134
137
|
return semver.gte(currentVersion, '3.12.0');
|
|
135
138
|
}
|
|
136
|
-
if (!!options?.includeNode && deviceType
|
|
139
|
+
if (!!options?.includeNode && DeviceModelToTypes.model_mini.includes(deviceType)) {
|
|
137
140
|
return semver.gte(currentVersion, '3.10.0');
|
|
138
141
|
}
|
|
142
|
+
if (options?.includeNode) {
|
|
143
|
+
return false;
|
|
144
|
+
}
|
|
139
145
|
|
|
140
146
|
// support batch get public key
|
|
141
147
|
if (deviceType === EDeviceType.Touch || deviceType === EDeviceType.Pro) {
|