@trezor/connect 9.1.11 → 9.2.0
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/CHANGELOG.md +92 -0
- package/README.md +1 -1
- package/lib/api/binance/api/binanceSignTransaction.d.ts +1 -1
- package/lib/api/binance/binanceSignTx.d.ts +1 -1
- package/lib/api/bitcoin/Fees.d.ts +2 -2
- package/lib/api/bitcoin/TransactionComposer.d.ts +2 -2
- package/lib/api/bitcoin/refTx.js +3 -4
- package/lib/api/blockchainGetCurrentFiatRates.d.ts +1 -1
- package/lib/api/blockchainGetFiatRatesForTimestamps.d.ts +1 -1
- package/lib/api/cardano/cardanoOutputs.d.ts +1 -1
- package/lib/api/cardano/cardanoTokenBundle.d.ts +2 -2
- package/lib/api/changeLanguage.d.ts +11 -0
- package/lib/api/changeLanguage.js +73 -0
- package/lib/api/common/paramsValidator.js +4 -5
- package/lib/api/eos/eosSignTx.d.ts +57 -57
- package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +6 -6
- package/lib/api/ethereum/api/ethereumSignMessage.d.ts +2 -2
- package/lib/api/ethereum/api/ethereumSignTransaction.d.ts +2 -2
- package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +6 -6
- package/lib/api/ethereum/api/ethereumSignTypedData.js +2 -2
- package/lib/api/ethereum/ethereumDefinitions.d.ts +2 -2
- package/lib/api/ethereum/ethereumSignTx.d.ts +3 -3
- package/lib/api/firmware/getBinary.d.ts +1 -1
- package/lib/api/firmware/getBinary.js +4 -5
- package/lib/api/firmware/modifyFirmware.js +2 -3
- package/lib/api/firmware/uploadFirmware.d.ts +2 -2
- package/lib/api/firmware/verifyAuthenticityProof.js +3 -3
- package/lib/api/getAccountInfo.d.ts +2 -0
- package/lib/api/getCoinInfo.d.ts +19 -19
- package/lib/api/getFeatures.d.ts +11 -11
- package/lib/api/getPublicKey.d.ts +6 -6
- package/lib/api/index.d.ts +1 -0
- package/lib/api/index.js +3 -1
- package/lib/api/nem/nemSignTx.d.ts +14 -14
- package/lib/api/rebootToBootloader.d.ts +2 -1
- package/lib/api/rebootToBootloader.js +10 -1
- package/lib/api/recoveryDevice.d.ts +1 -0
- package/lib/api/recoveryDevice.js +3 -0
- package/lib/api/stellar/stellarSignTx.d.ts +1 -1
- package/lib/api/stellar/stellarSignTx.js +6 -0
- package/lib/api/tezos/tezosSignTx.d.ts +18 -18
- package/lib/backend/BackendManager.d.ts +5 -2
- package/lib/backend/BackendManager.js +54 -20
- package/lib/backend/Blockchain.d.ts +8 -8
- package/lib/backend/Blockchain.js +37 -27
- package/lib/constants/index.d.ts +1 -1
- package/lib/constants/index.js +2 -1
- package/lib/core/AbstractMethod.d.ts +4 -4
- package/lib/core/AbstractMethod.js +23 -22
- package/lib/core/index.d.ts +3 -6
- package/lib/core/index.js +73 -52
- package/lib/core/method.d.ts +1 -3
- package/lib/core/method.native.d.ts +1 -3
- package/lib/data/DataManager.d.ts +2 -2
- package/lib/data/analyticsInfo.d.ts +2 -2
- package/lib/data/coinInfo.d.ts +103 -103
- package/lib/data/coinInfo.js +6 -6
- package/lib/data/config.js +1 -1
- package/lib/data/connectSettings.js +3 -0
- package/lib/data/deviceAuthenticityConfig.js +7 -1
- package/lib/data/firmwareInfo.d.ts +1 -1
- package/lib/data/firmwareInfo.js +14 -12
- package/lib/data/version.d.ts +1 -1
- package/lib/data/version.js +1 -1
- package/lib/device/Device.d.ts +7 -6
- package/lib/device/Device.js +13 -11
- package/lib/device/DeviceCommands.d.ts +7 -7
- package/lib/device/DeviceCommands.js +4 -4
- package/lib/device/DeviceList.d.ts +1 -1
- package/lib/device/DeviceList.js +3 -3
- package/lib/events/blockchain.d.ts +10 -2
- package/lib/events/blockchain.js +1 -0
- package/lib/events/call.d.ts +3 -3
- package/lib/events/core.d.ts +12 -10
- package/lib/events/iframe.d.ts +1 -1
- package/lib/events/popup.d.ts +13 -1
- package/lib/events/ui-promise.d.ts +1 -1
- package/lib/events/ui-request.d.ts +1 -2
- package/lib/events/webextension.d.ts +1 -0
- package/lib/events/webextension.js +1 -0
- package/lib/factory.js +1 -0
- package/lib/index.d.ts +0 -4
- package/lib/index.js +23 -40
- package/lib/types/api/applySettings.d.ts +6 -6
- package/lib/types/api/binance/index.d.ts +10 -10
- package/lib/types/api/cardano/index.d.ts +4 -4
- package/lib/types/api/changeLanguage.d.ts +15 -0
- package/lib/types/api/changeLanguage.js +17 -0
- package/lib/types/api/cipherKeyValue.d.ts +2 -2
- package/lib/types/api/eos/index.d.ts +3 -3
- package/lib/types/api/ethereum/index.d.ts +3 -3
- package/lib/types/api/firmwareUpdate.d.ts +1 -1
- package/lib/types/api/getAddress.d.ts +5 -5
- package/lib/types/api/index.d.ts +2 -0
- package/lib/types/api/nem/index.d.ts +7 -7
- package/lib/types/api/rebootToBootloader.d.ts +2 -2
- package/lib/types/api/recoveryDevice.d.ts +1 -1
- package/lib/types/api/stellar/index.d.ts +169 -146
- package/lib/types/api/stellar/index.js +13 -1
- package/lib/types/device.d.ts +4 -1
- package/lib/types/device.js +2 -2
- package/lib/types/firmware.d.ts +2 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/settings.d.ts +1 -0
- package/lib/utils/assets-browser.d.ts +1 -1
- package/lib/utils/assets.d.ts +3 -1
- package/lib/utils/assets.js +2 -2
- package/lib/utils/deviceFeaturesUtils.js +4 -5
- package/lib/utils/firmwareUtils.js +4 -5
- package/lib/utils/hdnodeUtils.d.ts +3 -3
- package/lib/utils/pathUtils.d.ts +3 -3
- package/lib/utils/promiseUtils.d.ts +0 -1
- package/lib/utils/urlUtils.js +3 -3
- package/package.json +28 -30
package/lib/core/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.initCore = exports.Core = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const events_1 = tslib_1.__importDefault(require("events"));
|
|
6
6
|
const transport_1 = require("@trezor/transport");
|
|
7
|
-
const
|
|
7
|
+
const utils_1 = require("@trezor/utils");
|
|
8
|
+
const utils_2 = require("@trezor/utils");
|
|
9
|
+
const connect_common_1 = require("@trezor/connect-common");
|
|
8
10
|
const DataManager_1 = require("../data/DataManager");
|
|
9
11
|
const DeviceList_1 = require("../device/DeviceList");
|
|
10
12
|
const analyticsInfo_1 = require("../data/analyticsInfo");
|
|
@@ -19,18 +21,21 @@ let _core;
|
|
|
19
21
|
let _deviceList;
|
|
20
22
|
let _popupPromise;
|
|
21
23
|
const _uiPromises = [];
|
|
22
|
-
let _preferredDevice;
|
|
23
24
|
const _callMethods = [];
|
|
24
25
|
let _interactionTimeout;
|
|
25
26
|
let _deviceListInitTimeout;
|
|
26
27
|
let _overridePromise;
|
|
27
|
-
|
|
28
|
+
const methodSynchronize = (0, utils_2.getSynchronize)();
|
|
29
|
+
let waitForFirstMethod = (0, utils_1.createDeferred)();
|
|
28
30
|
const _log = (0, debug_1.initLog)('Core');
|
|
29
31
|
const postMessage = (message) => {
|
|
30
32
|
if (message.event === events_2.RESPONSE_EVENT) {
|
|
31
33
|
const index = _callMethods.findIndex(call => call && call.responseID === message.id);
|
|
32
34
|
if (index >= 0) {
|
|
33
35
|
_callMethods.splice(index, 1);
|
|
36
|
+
if (_callMethods.length === 0) {
|
|
37
|
+
waitForFirstMethod = (0, utils_1.createDeferred)();
|
|
38
|
+
}
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
41
|
_core.emit(events_2.CORE_EVENT, message);
|
|
@@ -40,7 +45,7 @@ const getPopupPromise = (requestWindow = true) => {
|
|
|
40
45
|
postMessage((0, events_2.createUiMessage)(events_2.UI.REQUEST_UI_WINDOW));
|
|
41
46
|
}
|
|
42
47
|
if (!_popupPromise) {
|
|
43
|
-
_popupPromise = (0,
|
|
48
|
+
_popupPromise = (0, utils_1.createDeferred)();
|
|
44
49
|
}
|
|
45
50
|
return _popupPromise;
|
|
46
51
|
};
|
|
@@ -49,7 +54,7 @@ const interactionTimeout = () => _interactionTimeout.start(() => {
|
|
|
49
54
|
});
|
|
50
55
|
const createUiPromise = (promiseEvent, device) => {
|
|
51
56
|
const uiPromise = {
|
|
52
|
-
...(0,
|
|
57
|
+
...(0, utils_1.createDeferred)(promiseEvent),
|
|
53
58
|
device,
|
|
54
59
|
};
|
|
55
60
|
_uiPromises.push(uiPromise);
|
|
@@ -93,13 +98,12 @@ const handleMessage = (message) => {
|
|
|
93
98
|
break;
|
|
94
99
|
}
|
|
95
100
|
case events_2.IFRAME.CALL:
|
|
96
|
-
|
|
101
|
+
onCall(message).catch(error => {
|
|
97
102
|
_log.error('onCall', error);
|
|
98
103
|
});
|
|
99
104
|
break;
|
|
100
105
|
}
|
|
101
106
|
};
|
|
102
|
-
exports.handleMessage = handleMessage;
|
|
103
107
|
const initDevice = async (method) => {
|
|
104
108
|
if (!_deviceList) {
|
|
105
109
|
throw constants_1.ERRORS.TypedError('Transport_Missing');
|
|
@@ -108,15 +112,26 @@ const initDevice = async (method) => {
|
|
|
108
112
|
const isWebUsb = _deviceList.transportType() === 'WebUsbTransport';
|
|
109
113
|
let device;
|
|
110
114
|
let showDeviceSelection = isWebUsb;
|
|
115
|
+
const isUsingPopup = DataManager_1.DataManager.getSettings('popup');
|
|
116
|
+
const origin = DataManager_1.DataManager.getSettings('origin');
|
|
117
|
+
const { preferredDevice } = connect_common_1.storage.load().origin[origin] || {};
|
|
118
|
+
const preferredDeviceInList = preferredDevice && _deviceList.getDevice(preferredDevice.path);
|
|
119
|
+
if (preferredDevice && !preferredDeviceInList) {
|
|
120
|
+
connect_common_1.storage.save(store => {
|
|
121
|
+
store.origin[origin] = { ...store.origin[origin], preferredDevice: undefined };
|
|
122
|
+
return store;
|
|
123
|
+
});
|
|
124
|
+
}
|
|
111
125
|
if (method.devicePath) {
|
|
112
126
|
device = _deviceList.getDevice(method.devicePath);
|
|
113
|
-
showDeviceSelection =
|
|
127
|
+
showDeviceSelection =
|
|
128
|
+
!device || !!(device === null || device === void 0 ? void 0 : device.unreadableError) || (device.isUnacquired() && !!isUsingPopup);
|
|
114
129
|
}
|
|
115
130
|
else {
|
|
116
131
|
const devices = _deviceList.asArray();
|
|
117
132
|
if (devices.length === 1 && !isWebUsb) {
|
|
118
133
|
device = _deviceList.getDevice(devices[0].path);
|
|
119
|
-
showDeviceSelection = !!(device === null || device === void 0 ? void 0 : device.unreadableError);
|
|
134
|
+
showDeviceSelection = !!(device === null || device === void 0 ? void 0 : device.unreadableError) || device.isUnacquired();
|
|
120
135
|
}
|
|
121
136
|
else {
|
|
122
137
|
showDeviceSelection = true;
|
|
@@ -129,7 +144,10 @@ const initDevice = async (method) => {
|
|
|
129
144
|
throw constants_1.ERRORS.TypedError('Transport_Missing');
|
|
130
145
|
}
|
|
131
146
|
const devices = _deviceList.asArray();
|
|
132
|
-
if (devices.length === 1 &&
|
|
147
|
+
if (devices.length === 1 &&
|
|
148
|
+
devices[0].type !== 'unreadable' &&
|
|
149
|
+
devices[0].features &&
|
|
150
|
+
!isWebUsb) {
|
|
133
151
|
device = _deviceList.getDevice(devices[0].path);
|
|
134
152
|
}
|
|
135
153
|
else {
|
|
@@ -141,7 +159,14 @@ const initDevice = async (method) => {
|
|
|
141
159
|
if (uiPromise) {
|
|
142
160
|
const { payload } = await uiPromise.promise;
|
|
143
161
|
if (payload.remember) {
|
|
144
|
-
|
|
162
|
+
const { path, state } = payload.device;
|
|
163
|
+
connect_common_1.storage.save(store => {
|
|
164
|
+
store.origin[origin] = {
|
|
165
|
+
...store.origin[origin],
|
|
166
|
+
preferredDevice: { path, state },
|
|
167
|
+
};
|
|
168
|
+
return store;
|
|
169
|
+
});
|
|
145
170
|
}
|
|
146
171
|
device = _deviceList.getDevice(payload.device.path);
|
|
147
172
|
}
|
|
@@ -160,25 +185,28 @@ const onCall = async (message) => {
|
|
|
160
185
|
const responseID = message.id;
|
|
161
186
|
const trustedHost = DataManager_1.DataManager.getSettings('trustedHost');
|
|
162
187
|
const isUsingPopup = DataManager_1.DataManager.getSettings('popup');
|
|
163
|
-
|
|
164
|
-
|
|
188
|
+
const origin = DataManager_1.DataManager.getSettings('origin');
|
|
189
|
+
const { preferredDevice } = connect_common_1.storage.loadForOrigin(origin) || {};
|
|
190
|
+
if (preferredDevice && !message.payload.device) {
|
|
191
|
+
message.payload.device = preferredDevice;
|
|
165
192
|
}
|
|
166
193
|
let method;
|
|
167
194
|
let messageResponse;
|
|
168
195
|
try {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
196
|
+
method = await methodSynchronize(async () => {
|
|
197
|
+
var _a;
|
|
198
|
+
_log.debug('loading method...');
|
|
199
|
+
const method = await (0, method_1.getMethod)(message);
|
|
200
|
+
_log.debug('method selected', method.name);
|
|
201
|
+
method.postMessage = postMessage;
|
|
202
|
+
method.getPopupPromise = getPopupPromise;
|
|
203
|
+
method.createUiPromise = createUiPromise;
|
|
204
|
+
method.init();
|
|
205
|
+
await ((_a = method.initAsync) === null || _a === void 0 ? void 0 : _a.call(method));
|
|
206
|
+
return method;
|
|
207
|
+
});
|
|
208
|
+
waitForFirstMethod.resolve();
|
|
177
209
|
_callMethods.push(method);
|
|
178
|
-
if (method.initAsync) {
|
|
179
|
-
method.initAsyncPromise = method.initAsync();
|
|
180
|
-
await method.initAsyncPromise;
|
|
181
|
-
}
|
|
182
210
|
}
|
|
183
211
|
catch (error) {
|
|
184
212
|
postMessage((0, events_2.createPopupMessage)(events_2.POPUP.CANCEL_POPUP_REQUEST));
|
|
@@ -203,7 +231,7 @@ const onCall = async (message) => {
|
|
|
203
231
|
return Promise.resolve();
|
|
204
232
|
}
|
|
205
233
|
if (!_deviceList && !DataManager_1.DataManager.getSettings('transportReconnect')) {
|
|
206
|
-
await (
|
|
234
|
+
await initDeviceList(false);
|
|
207
235
|
}
|
|
208
236
|
if (method.isManagementRestricted()) {
|
|
209
237
|
postMessage((0, events_2.createPopupMessage)(events_2.POPUP.CANCEL_POPUP_REQUEST));
|
|
@@ -396,7 +424,7 @@ const onCall = async (message) => {
|
|
|
396
424
|
}
|
|
397
425
|
const response = messageResponse;
|
|
398
426
|
if (response) {
|
|
399
|
-
if (method.
|
|
427
|
+
if (method.name === 'rebootToBootloader' && response.success) {
|
|
400
428
|
await (0, promiseUtils_1.resolveAfter)(1000).promise;
|
|
401
429
|
try {
|
|
402
430
|
await device.run(() => Promise.resolve(), { skipFinalReload: true });
|
|
@@ -419,7 +447,6 @@ const onCall = async (message) => {
|
|
|
419
447
|
}
|
|
420
448
|
}
|
|
421
449
|
};
|
|
422
|
-
exports.onCall = onCall;
|
|
423
450
|
const cleanup = () => {
|
|
424
451
|
_popupPromise = undefined;
|
|
425
452
|
_uiPromises.splice(0);
|
|
@@ -500,6 +527,7 @@ const onPopupClosed = (customErrorMessage) => {
|
|
|
500
527
|
postMessage((0, events_2.createResponseMessage)(m.responseID, false, { error }));
|
|
501
528
|
});
|
|
502
529
|
_callMethods.splice(0, _callMethods.length);
|
|
530
|
+
waitForFirstMethod = (0, utils_1.createDeferred)();
|
|
503
531
|
}
|
|
504
532
|
}
|
|
505
533
|
});
|
|
@@ -549,16 +577,13 @@ const handleDeviceSelectionChanges = (interruptDevice) => {
|
|
|
549
577
|
shouldClosePopup = true;
|
|
550
578
|
}
|
|
551
579
|
});
|
|
552
|
-
if (_preferredDevice && _preferredDevice.path === path) {
|
|
553
|
-
_preferredDevice = undefined;
|
|
554
|
-
}
|
|
555
580
|
if (shouldClosePopup) {
|
|
556
581
|
closePopup();
|
|
557
582
|
cleanup();
|
|
558
583
|
}
|
|
559
584
|
}
|
|
560
585
|
};
|
|
561
|
-
const initDeviceList = async (
|
|
586
|
+
const initDeviceList = async (transportReconnect) => {
|
|
562
587
|
try {
|
|
563
588
|
_deviceList = new DeviceList_1.DeviceList();
|
|
564
589
|
_deviceList.on(events_2.DEVICE.CONNECT, device => {
|
|
@@ -584,11 +609,11 @@ const initDeviceList = async (settings) => {
|
|
|
584
609
|
}
|
|
585
610
|
_deviceList = undefined;
|
|
586
611
|
postMessage((0, events_2.createTransportMessage)(transport_1.TRANSPORT.ERROR, { error }));
|
|
587
|
-
if (
|
|
612
|
+
if (transportReconnect) {
|
|
588
613
|
const { promise, timeout } = (0, promiseUtils_1.resolveAfter)(1000, null);
|
|
589
614
|
_deviceListInitTimeout = timeout;
|
|
590
615
|
promise.then(() => {
|
|
591
|
-
initDeviceList(
|
|
616
|
+
initDeviceList(transportReconnect);
|
|
592
617
|
});
|
|
593
618
|
}
|
|
594
619
|
});
|
|
@@ -601,20 +626,20 @@ const initDeviceList = async (settings) => {
|
|
|
601
626
|
catch (error) {
|
|
602
627
|
_deviceList = undefined;
|
|
603
628
|
postMessage((0, events_2.createTransportMessage)(transport_1.TRANSPORT.ERROR, { error }));
|
|
604
|
-
if (!
|
|
629
|
+
if (!transportReconnect) {
|
|
605
630
|
throw error;
|
|
606
631
|
}
|
|
607
632
|
else {
|
|
608
633
|
const { promise, timeout } = (0, promiseUtils_1.resolveAfter)(3000, null);
|
|
609
634
|
_deviceListInitTimeout = timeout;
|
|
610
635
|
await promise;
|
|
611
|
-
await initDeviceList(
|
|
636
|
+
await initDeviceList(transportReconnect);
|
|
612
637
|
}
|
|
613
638
|
}
|
|
614
639
|
};
|
|
615
640
|
class Core extends events_1.default {
|
|
616
641
|
handleMessage(message) {
|
|
617
|
-
|
|
642
|
+
handleMessage(message);
|
|
618
643
|
}
|
|
619
644
|
async dispose() {
|
|
620
645
|
(0, BlockchainLink_1.dispose)();
|
|
@@ -627,10 +652,8 @@ class Core extends events_1.default {
|
|
|
627
652
|
}
|
|
628
653
|
}
|
|
629
654
|
async getCurrentMethod() {
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
}
|
|
633
|
-
return _callMethods[0];
|
|
655
|
+
await waitForFirstMethod.promise;
|
|
656
|
+
return await methodSynchronize(() => _callMethods[0]);
|
|
634
657
|
}
|
|
635
658
|
getTransportInfo() {
|
|
636
659
|
if (!_deviceList) {
|
|
@@ -646,7 +669,7 @@ class Core extends events_1.default {
|
|
|
646
669
|
}
|
|
647
670
|
}
|
|
648
671
|
exports.Core = Core;
|
|
649
|
-
const initCore = async (settings, logWriterFactory) => {
|
|
672
|
+
const initCore = async (settings, onCoreEvent, logWriterFactory) => {
|
|
650
673
|
if (logWriterFactory) {
|
|
651
674
|
(0, debug_1.setLogWriter)(logWriterFactory);
|
|
652
675
|
}
|
|
@@ -655,29 +678,27 @@ const initCore = async (settings, logWriterFactory) => {
|
|
|
655
678
|
(0, debug_1.enableLog)(DataManager_1.DataManager.getSettings('debug'));
|
|
656
679
|
_core = new Core();
|
|
657
680
|
_interactionTimeout = new interactionTimeout_1.InteractionTimeout(settings.popup ? settings.interactionTimeout : 0);
|
|
658
|
-
|
|
681
|
+
_core.on(events_2.CORE_EVENT, onCoreEvent);
|
|
659
682
|
}
|
|
660
683
|
catch (error) {
|
|
661
684
|
_log.error('init', error);
|
|
662
685
|
throw error;
|
|
663
686
|
}
|
|
664
|
-
};
|
|
665
|
-
exports.initCore = initCore;
|
|
666
|
-
const initTransport = async (settings) => {
|
|
667
687
|
try {
|
|
668
|
-
if (!
|
|
669
|
-
await initDeviceList(
|
|
688
|
+
if (!DataManager_1.DataManager.getSettings('transportReconnect')) {
|
|
689
|
+
await initDeviceList(false);
|
|
670
690
|
}
|
|
671
691
|
else {
|
|
672
|
-
initDeviceList(
|
|
692
|
+
initDeviceList(true);
|
|
673
693
|
}
|
|
674
694
|
}
|
|
675
695
|
catch (error) {
|
|
676
696
|
_log.error('initTransport', error);
|
|
677
697
|
throw error;
|
|
678
698
|
}
|
|
699
|
+
return _core;
|
|
679
700
|
};
|
|
680
|
-
exports.
|
|
701
|
+
exports.initCore = initCore;
|
|
681
702
|
const disableWebUSBTransport = async () => {
|
|
682
703
|
var _a;
|
|
683
704
|
if (!_deviceList)
|
|
@@ -696,7 +717,7 @@ const disableWebUSBTransport = async () => {
|
|
|
696
717
|
}
|
|
697
718
|
try {
|
|
698
719
|
await _deviceList.dispose();
|
|
699
|
-
await initDeviceList(settings);
|
|
720
|
+
await initDeviceList(settings.transportReconnect);
|
|
700
721
|
}
|
|
701
722
|
catch (error) {
|
|
702
723
|
}
|
package/lib/core/method.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { IFrameCallMessage } from '../events';
|
|
2
2
|
import type { AbstractMethod } from './AbstractMethod';
|
|
3
|
-
export declare const getMethod: (message: IFrameCallMessage
|
|
4
|
-
id?: number;
|
|
5
|
-
}) => Promise<AbstractMethod<any>>;
|
|
3
|
+
export declare const getMethod: (message: IFrameCallMessage) => Promise<AbstractMethod<any>>;
|
|
6
4
|
//# sourceMappingURL=method.d.ts.map
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import type { IFrameCallMessage } from '../events';
|
|
2
|
-
export declare const getMethod: (message: IFrameCallMessage
|
|
3
|
-
id?: number;
|
|
4
|
-
}) => Promise<any>;
|
|
2
|
+
export declare const getMethod: (message: IFrameCallMessage) => Promise<any>;
|
|
5
3
|
//# sourceMappingURL=method.native.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ConnectSettings } from '../types';
|
|
2
2
|
type AssetCollection = {
|
|
3
|
-
[key: string]:
|
|
3
|
+
[key: string]: Record<string, any>;
|
|
4
4
|
};
|
|
5
5
|
export declare class DataManager {
|
|
6
6
|
static assets: AssetCollection;
|
|
7
7
|
private static settings;
|
|
8
8
|
private static messages;
|
|
9
9
|
static load(settings: ConnectSettings, withAssets?: boolean): Promise<void>;
|
|
10
|
-
static getProtobufMessages():
|
|
10
|
+
static getProtobufMessages(): Record<string, any>;
|
|
11
11
|
static getSettings(key?: undefined): ConnectSettings;
|
|
12
12
|
static getSettings<T extends keyof ConnectSettings>(key: T): ConnectSettings[T];
|
|
13
13
|
static getConfig(): {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CoreEventMessage } from '../events';
|
|
2
2
|
import type { Device } from '../types';
|
|
3
|
-
export declare const enhancePostMessageWithAnalytics: (callback:
|
|
3
|
+
export declare const enhancePostMessageWithAnalytics: (callback: (message: CoreEventMessage) => void, message: CoreEventMessage, data: {
|
|
4
4
|
device?: Device;
|
|
5
5
|
}) => void;
|
|
6
6
|
//# sourceMappingURL=analyticsInfo.d.ts.map
|