@onekeyfe/hd-web-sdk 0.2.0 → 0.2.1
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/build/iframe.html +1 -1
- package/build/js/iframe.b3d08698f1332b9d17e0.js +3 -0
- package/build/js/{iframe.99845140d999e0775b6a.js.LICENSE.txt → iframe.b3d08698f1332b9d17e0.js.LICENSE.txt} +0 -0
- package/build/js/iframe.b3d08698f1332b9d17e0.js.map +1 -0
- package/build/onekey-js-sdk.js +23 -2
- package/build/onekey-js-sdk.js.map +1 -1
- package/build/onekey-js-sdk.min.js +1 -1
- package/build/onekey-js-sdk.min.js.map +1 -1
- package/package.json +6 -6
- package/build/js/iframe.99845140d999e0775b6a.js +0 -3
- package/build/js/iframe.99845140d999e0775b6a.js.map +0 -1
package/build/onekey-js-sdk.js
CHANGED
|
@@ -6211,6 +6211,24 @@ const supportBatchPublicKey = features => {
|
|
|
6211
6211
|
return semver__default["default"].gte(currentVersion, '2.6.0');
|
|
6212
6212
|
};
|
|
6213
6213
|
|
|
6214
|
+
const supportModifyHomescreen = features => {
|
|
6215
|
+
if (!features) return {
|
|
6216
|
+
support: false
|
|
6217
|
+
};
|
|
6218
|
+
const currentVersion = getDeviceFirmwareVersion(features).join('.');
|
|
6219
|
+
const deviceType = getDeviceType(features);
|
|
6220
|
+
|
|
6221
|
+
if (deviceType === 'classic' || deviceType === 'mini') {
|
|
6222
|
+
return {
|
|
6223
|
+
support: true
|
|
6224
|
+
};
|
|
6225
|
+
}
|
|
6226
|
+
|
|
6227
|
+
return {
|
|
6228
|
+
support: semver__default["default"].gte(currentVersion, '3.4.0')
|
|
6229
|
+
};
|
|
6230
|
+
};
|
|
6231
|
+
|
|
6214
6232
|
var nested = {
|
|
6215
6233
|
AlgorandGetAddress: {
|
|
6216
6234
|
fields: {
|
|
@@ -18331,6 +18349,7 @@ class DeviceUploadResource extends BaseMethod {
|
|
|
18331
18349
|
run() {
|
|
18332
18350
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18333
18351
|
const res = yield this.device.commands.typedCall('ResourceUpload', ['ResourceRequest', 'ZoomRequest', 'Success'], this.params);
|
|
18352
|
+
this.postMessage(createUiMessage(UI_REQUEST$1.CLOSE_UI_WINDOW));
|
|
18334
18353
|
return this.processResourceRequest(res);
|
|
18335
18354
|
});
|
|
18336
18355
|
}
|
|
@@ -18345,8 +18364,10 @@ class DeviceSupportFeatures extends BaseMethod {
|
|
|
18345
18364
|
run() {
|
|
18346
18365
|
if (!this.device.features) return Promise.reject(hdShared.ERRORS.TypedError(hdShared.HardwareErrorCode.RuntimeError, 'Device not initialized'));
|
|
18347
18366
|
const inputPinOnSoftware = supportInputPinOnSoftware(this.device.features);
|
|
18367
|
+
const modifyHomescreen = supportModifyHomescreen(this.device.features);
|
|
18348
18368
|
return Promise.resolve({
|
|
18349
18369
|
inputPinOnSoftware,
|
|
18370
|
+
modifyHomescreen,
|
|
18350
18371
|
device: this.device.toMessageObject()
|
|
18351
18372
|
});
|
|
18352
18373
|
}
|
|
@@ -47817,7 +47838,7 @@ try {
|
|
|
47817
47838
|
/***/ ((module) => {
|
|
47818
47839
|
|
|
47819
47840
|
"use strict";
|
|
47820
|
-
module.exports = JSON.parse('{"name":"@onekeyfe/hd-core","version":"0.2.
|
|
47841
|
+
module.exports = JSON.parse('{"name":"@onekeyfe/hd-core","version":"0.2.1","description":"> TODO: description","author":"OneKey","homepage":"https://github.com/OneKeyHQ/hardware-js-sdk#readme","license":"ISC","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/OneKeyHQ/hardware-js-sdk.git"},"publishConfig":{"access":"public"},"scripts":{"dev":"rimraf dist && rollup -c ../../build/rollup.config.js -w","build":"rimraf dist && rollup -c ../../build/rollup.config.js","lint":"eslint .","lint:fix":"eslint . --fix"},"bugs":{"url":"https://github.com/OneKeyHQ/hardware-js-sdk/issues"},"dependencies":{"@onekeyfe/hd-shared":"^0.2.1","@onekeyfe/hd-transport":"^0.2.1","axios":"^0.27.2","bignumber.js":"^9.0.2","jszip":"^3.10.1","parse-uri":"^1.0.7","semver":"^7.3.7"},"peerDependencies":{"@noble/hashes":"^1.1.3"},"devDependencies":{"@noble/hashes":"^1.1.3","@types/parse-uri":"^1.0.0","@types/semver":"^7.3.9"}}');
|
|
47821
47842
|
|
|
47822
47843
|
/***/ })
|
|
47823
47844
|
|
|
@@ -50344,7 +50365,7 @@ const src_init = async settings => {
|
|
|
50344
50365
|
|
|
50345
50366
|
try {
|
|
50346
50367
|
await init({ ..._settings,
|
|
50347
|
-
version: "0.2.
|
|
50368
|
+
version: "0.2.1"
|
|
50348
50369
|
});
|
|
50349
50370
|
return true;
|
|
50350
50371
|
} catch (e) {
|