@trezor/connect 9.3.1-beta.3 → 9.4.1-beta.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.
Files changed (114) hide show
  1. package/CHANGELOG.md +158 -102
  2. package/README.md +1 -1
  3. package/lib/api/binance/api/index.js +4 -6
  4. package/lib/api/bitcoin/Fees.d.ts +2 -2
  5. package/lib/api/bitcoin/outputs.d.ts +1 -1
  6. package/lib/api/bitcoin/refTx.d.ts +2 -2
  7. package/lib/api/cardano/api/index.js +6 -8
  8. package/lib/api/cardano/cardanoInputs.d.ts +10 -10
  9. package/lib/api/cardano/cardanoOutputs.d.ts +23 -23
  10. package/lib/api/cardano/cardanoTokenBundle.d.ts +6 -6
  11. package/lib/api/common/Discovery.d.ts +0 -1
  12. package/lib/api/common/paramsValidator.js +2 -2
  13. package/lib/api/composeTransaction.js +3 -0
  14. package/lib/api/eos/api/index.js +3 -5
  15. package/lib/api/eos/eosSignTx.d.ts +4 -4
  16. package/lib/api/eos/eosSignTx.js +2 -2
  17. package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +68 -68
  18. package/lib/api/ethereum/api/index.js +7 -9
  19. package/lib/api/ethereum/ethereumDefinitions.d.ts +23 -23
  20. package/lib/api/ethereum/ethereumSignTypedData.js +3 -4
  21. package/lib/api/firmware/calculateFirmwareHash.d.ts +0 -1
  22. package/lib/api/firmware/parseFirmwareHeaders.d.ts +0 -1
  23. package/lib/api/firmware/uploadFirmware.d.ts +6 -1
  24. package/lib/api/firmware/verifyAuthenticityProof.d.ts +0 -1
  25. package/lib/api/getAccountInfo.d.ts +38 -38
  26. package/lib/api/getCoinInfo.d.ts +3 -3
  27. package/lib/api/getDeviceState.d.ts +2 -1
  28. package/lib/api/getDeviceState.js +6 -3
  29. package/lib/api/getFeatures.d.ts +10 -10
  30. package/lib/api/index.js +49 -51
  31. package/lib/api/nem/api/index.js +3 -5
  32. package/lib/api/pushTransaction.js +1 -1
  33. package/lib/api/ripple/api/index.js +3 -5
  34. package/lib/api/signTransaction.js +3 -0
  35. package/lib/api/solana/api/index.js +4 -6
  36. package/lib/api/stellar/api/index.js +3 -5
  37. package/lib/api/tezos/api/index.js +4 -6
  38. package/lib/api/tezos/tezosSignTx.js +2 -2
  39. package/lib/backend/Blockchain.d.ts +2 -2
  40. package/lib/backend/BlockchainLink.d.ts +2 -2
  41. package/lib/constants/nem.d.ts +3 -3
  42. package/lib/core/AbstractMethod.d.ts +8 -6
  43. package/lib/core/AbstractMethod.js +26 -3
  44. package/lib/core/index.d.ts +0 -1
  45. package/lib/core/index.js +45 -54
  46. package/lib/core/onCallFirmwareUpdate.js +7 -2
  47. package/lib/data/DataManager.d.ts +5 -31
  48. package/lib/data/coinInfo.d.ts +15 -21
  49. package/lib/data/config.d.ts +5 -31
  50. package/lib/data/config.js +8 -5
  51. package/lib/data/deviceAuthenticityConfig.js +32 -14
  52. package/lib/data/deviceAuthenticityConfigTypes.d.ts +28 -28
  53. package/lib/data/firmwareInfo.d.ts +2 -2
  54. package/lib/data/firmwareInfo.js +8 -7
  55. package/lib/data/models.js +3 -3
  56. package/lib/data/version.d.ts +1 -1
  57. package/lib/data/version.js +1 -1
  58. package/lib/device/Device.d.ts +52 -19
  59. package/lib/device/Device.js +87 -73
  60. package/lib/device/DeviceCommands.d.ts +9 -9
  61. package/lib/device/DeviceCommands.js +10 -10
  62. package/lib/device/DeviceList.js +60 -83
  63. package/lib/device/StateStorage.d.ts +15 -0
  64. package/lib/device/StateStorage.js +40 -0
  65. package/lib/device/checkFirmwareRevision.js +0 -4
  66. package/lib/events/device.d.ts +0 -1
  67. package/lib/events/device.js +0 -1
  68. package/lib/events/ui-request.d.ts +2 -1
  69. package/lib/factory.d.ts +0 -1
  70. package/lib/index.d.ts +0 -1
  71. package/lib/types/api/applySettings.d.ts +14 -14
  72. package/lib/types/api/authenticateDevice.d.ts +30 -30
  73. package/lib/types/api/authorizeCoinjoin.d.ts +10 -10
  74. package/lib/types/api/binance/index.d.ts +152 -152
  75. package/lib/types/api/bitcoin/index.d.ts +12 -12
  76. package/lib/types/api/cancelCoinjoinAuthorization.d.ts +2 -2
  77. package/lib/types/api/cardano/index.d.ts +556 -556
  78. package/lib/types/api/changeLanguage.d.ts +7 -7
  79. package/lib/types/api/cipherKeyValue.d.ts +8 -8
  80. package/lib/types/api/eos/index.d.ts +633 -633
  81. package/lib/types/api/ethereum/index.d.ts +124 -124
  82. package/lib/types/api/firmwareUpdate.d.ts +6 -6
  83. package/lib/types/api/getAccountDescriptor.d.ts +5 -5
  84. package/lib/types/api/getAddress.d.ts +33 -33
  85. package/lib/types/api/getDeviceState.d.ts +3 -1
  86. package/lib/types/api/getOwnershipId.d.ts +25 -25
  87. package/lib/types/api/getOwnershipProof.d.ts +29 -29
  88. package/lib/types/api/getPublicKey.d.ts +25 -25
  89. package/lib/types/api/nem/index.d.ts +707 -707
  90. package/lib/types/api/nemGetAddress.d.ts +7 -7
  91. package/lib/types/api/pushTransaction.d.ts +4 -4
  92. package/lib/types/api/recoveryDevice.d.ts +10 -10
  93. package/lib/types/api/requestLogin.d.ts +28 -28
  94. package/lib/types/api/ripple/index.d.ts +28 -28
  95. package/lib/types/api/solana/index.d.ts +28 -28
  96. package/lib/types/api/stellar/index.d.ts +745 -745
  97. package/lib/types/api/tezos/index.d.ts +129 -129
  98. package/lib/types/api/unlockPath.d.ts +3 -3
  99. package/lib/types/coinInfo.d.ts +246 -246
  100. package/lib/types/device.d.ts +9 -1
  101. package/lib/types/fees.d.ts +22 -22
  102. package/lib/types/firmware.d.ts +1 -1
  103. package/lib/types/params.d.ts +20 -19
  104. package/lib/utils/assetUtils.js +1 -1
  105. package/lib/utils/assets-browser.d.ts +1 -1
  106. package/lib/utils/assets.js +1 -2
  107. package/lib/utils/debug.d.ts +2 -2
  108. package/lib/utils/deviceFeaturesUtils.d.ts +1 -1
  109. package/lib/utils/hdnodeUtils.d.ts +1 -191
  110. package/lib/utils/hdnodeUtils.js +2 -2
  111. package/lib/utils/pathUtils.d.ts +1 -191
  112. package/lib/utils/promiseUtils.d.ts +1 -1
  113. package/lib/utils/uiPromiseManager.d.ts +2 -2
  114. package/package.json +17 -15
package/lib/core/index.js CHANGED
@@ -20,6 +20,7 @@ const debug_1 = require("../utils/debug");
20
20
  const BlockchainLink_1 = require("../backend/BlockchainLink");
21
21
  const interactionTimeout_1 = require("../utils/interactionTimeout");
22
22
  const onCallFirmwareUpdate_1 = require("./onCallFirmwareUpdate");
23
+ const StateStorage_1 = require("../device/StateStorage");
23
24
  const _log = (0, debug_1.initLog)('Core');
24
25
  const waitForPopup = ({ popupPromise, sendCoreMessage }) => {
25
26
  sendCoreMessage((0, events_2.createUiMessage)(events_2.UI.REQUEST_UI_WINDOW));
@@ -30,7 +31,6 @@ const startInteractionTimeout = (context) => context.interactionTimeout.start(()
30
31
  });
31
32
  const initDevice = async (context, devicePath) => {
32
33
  const { uiPromises, deviceList, sendCoreMessage } = context;
33
- await deviceList.pendingConnection();
34
34
  (0, DeviceList_1.assertDeviceListConnected)(deviceList);
35
35
  const isWebUsb = deviceList.transportType() === 'WebUsbTransport';
36
36
  let device;
@@ -150,7 +150,7 @@ const inner = async (context, method, device) => {
150
150
  }
151
151
  const unexpectedMode = device.hasUnexpectedMode(method.allowDeviceMode, method.requireDeviceMode);
152
152
  if (unexpectedMode) {
153
- device.keepSession = false;
153
+ device.keepTransportSession = false;
154
154
  if (isUsingPopup) {
155
155
  await waitForPopup(context);
156
156
  sendCoreMessage((0, events_2.createUiMessage)(unexpectedMode, device.toMessageObject()));
@@ -220,12 +220,12 @@ const inner = async (context, method, device) => {
220
220
  }));
221
221
  const uiResp = await uiPromise.promise;
222
222
  if (uiResp.payload) {
223
- device.setInternalState(undefined);
223
+ device.setState({ sessionId: undefined });
224
224
  await device.initialize(method.useCardanoDerivation);
225
225
  invalidDeviceState = await getInvalidDeviceState(context, device, method.preauthorized);
226
226
  }
227
227
  else {
228
- device.setExternalState(invalidDeviceState);
228
+ device.setState({ staticSessionId: invalidDeviceState });
229
229
  break;
230
230
  }
231
231
  }
@@ -235,7 +235,7 @@ const inner = async (context, method, device) => {
235
235
  }
236
236
  }
237
237
  catch (error) {
238
- device.setInternalState(undefined);
238
+ device.setState({ sessionId: undefined });
239
239
  return Promise.reject(error);
240
240
  }
241
241
  }
@@ -257,21 +257,17 @@ const inner = async (context, method, device) => {
257
257
  }
258
258
  };
259
259
  const onCall = async (context, message) => {
260
- var _a;
261
260
  if (!message.id || !message.payload || message.type !== events_2.IFRAME.CALL) {
262
261
  throw constants_1.ERRORS.TypedError('Method_InvalidParameter', 'onCall: message.id or message.payload is missing');
263
262
  }
264
- const { uiPromises, deviceList, callMethods, methodSynchronize, resolveWaitForFirstMethod, getOverridePromise, setOverridePromise, sendCoreMessage, } = context;
263
+ const { uiPromises, callMethods, methodSynchronize, resolveWaitForFirstMethod, sendCoreMessage, } = context;
265
264
  const responseID = message.id;
266
265
  const origin = DataManager_1.DataManager.getSettings('origin');
267
- const env = DataManager_1.DataManager.getSettings('env');
268
- const useCoreInPopup = DataManager_1.DataManager.getSettings('useCoreInPopup');
269
266
  const { preferredDevice } = connect_common_1.storage.loadForOrigin(origin) || {};
270
267
  if (preferredDevice && !message.payload.device) {
271
268
  message.payload.device = preferredDevice;
272
269
  }
273
270
  let method;
274
- let messageResponse;
275
271
  try {
276
272
  method = await methodSynchronize(async () => {
277
273
  var _a;
@@ -301,19 +297,13 @@ const onCall = async (context, message) => {
301
297
  sendCoreMessage((0, events_2.createPopupMessage)(events_2.POPUP.CANCEL_POPUP_REQUEST));
302
298
  }
303
299
  const response = await method.run();
304
- messageResponse = (0, events_2.createResponseMessage)(method.responseID, true, response);
300
+ sendCoreMessage((0, events_2.createResponseMessage)(method.responseID, true, response));
305
301
  }
306
302
  catch (error) {
307
- messageResponse = (0, events_2.createResponseMessage)(method.responseID, false, { error });
303
+ sendCoreMessage((0, events_2.createResponseMessage)(method.responseID, false, { error }));
308
304
  }
309
- sendCoreMessage(messageResponse);
310
305
  return Promise.resolve();
311
306
  }
312
- if (!deviceList.isConnected() && !deviceList.pendingConnection()) {
313
- const { transports, pendingTransportEvent } = DataManager_1.DataManager.getSettings();
314
- deviceList.setTransports(transports);
315
- await deviceList.init({ pendingTransportEvent });
316
- }
317
307
  if (method.isManagementRestricted()) {
318
308
  sendCoreMessage((0, events_2.createPopupMessage)(events_2.POPUP.CANCEL_POPUP_REQUEST));
319
309
  sendCoreMessage((0, events_2.createResponseMessage)(responseID, false, {
@@ -321,21 +311,42 @@ const onCall = async (context, message) => {
321
311
  }));
322
312
  return Promise.resolve();
323
313
  }
324
- let device;
325
- try {
326
- device = await initDevice(context, method.devicePath);
314
+ return await onCallDevice(context, message, method);
315
+ };
316
+ const onCallDevice = async (context, message, method) => {
317
+ var _a;
318
+ const { deviceList, callMethods, getOverridePromise, setOverridePromise, sendCoreMessage } = context;
319
+ const responseID = message.id;
320
+ const { origin, env, useCoreInPopup } = DataManager_1.DataManager.getSettings();
321
+ if (!deviceList.isConnected() && !deviceList.pendingConnection()) {
322
+ deviceList.init();
327
323
  }
328
- catch (error) {
329
- if (error.code === 'Transport_Missing') {
330
- await waitForPopup(context);
331
- sendCoreMessage((0, events_2.createUiMessage)(events_2.UI.TRANSPORT));
324
+ await deviceList.pendingConnection();
325
+ const shouldRetry = ['web', 'webextension'].includes(env);
326
+ let tempDevice;
327
+ while (!tempDevice) {
328
+ try {
329
+ tempDevice = await initDevice(context, method.devicePath);
332
330
  }
333
- else {
334
- sendCoreMessage((0, events_2.createPopupMessage)(events_2.POPUP.CANCEL_POPUP_REQUEST));
331
+ catch (error) {
332
+ if (error.code === 'Transport_Missing') {
333
+ await waitForPopup(context);
334
+ sendCoreMessage((0, events_2.createUiMessage)(events_2.UI.TRANSPORT));
335
+ if (deviceList.pendingConnection() && shouldRetry) {
336
+ while (deviceList.pendingConnection()) {
337
+ await deviceList.pendingConnection();
338
+ }
339
+ continue;
340
+ }
341
+ }
342
+ else {
343
+ sendCoreMessage((0, events_2.createPopupMessage)(events_2.POPUP.CANCEL_POPUP_REQUEST));
344
+ }
345
+ sendCoreMessage((0, events_2.createResponseMessage)(responseID, false, { error }));
346
+ throw error;
335
347
  }
336
- sendCoreMessage((0, events_2.createResponseMessage)(responseID, false, { error }));
337
- throw error;
338
348
  }
349
+ const device = tempDevice;
339
350
  method.setDevice(device);
340
351
  const previousCall = callMethods.filter(call => call && call !== method && call.devicePath === method.devicePath);
341
352
  if (previousCall.length > 0 && method.overridePreviousCall) {
@@ -363,7 +374,7 @@ const onCall = async (context, message) => {
363
374
  }
364
375
  device.setInstance((_a = message.payload.device) === null || _a === void 0 ? void 0 : _a.instance);
365
376
  if (method.hasExpectedDeviceState) {
366
- device.setExternalState(method.deviceState);
377
+ device.setState(method.deviceState);
367
378
  }
368
379
  device.on(events_2.DEVICE.BUTTON, onDeviceButtonHandler(context, method));
369
380
  device.on(events_2.DEVICE.PIN, onDevicePinHandler(context));
@@ -372,30 +383,10 @@ const onCall = async (context, message) => {
372
383
  device.on(events_2.DEVICE.PASSPHRASE_ON_DEVICE, () => {
373
384
  sendCoreMessage((0, events_2.createUiMessage)(events_2.UI.REQUEST_PASSPHRASE_ON_DEVICE, { device: device.toMessageObject() }));
374
385
  });
375
- device.on(events_2.DEVICE.SAVE_STATE, (state) => {
376
- if (useCoreInPopup && env === 'webextension') {
377
- connect_common_1.storage.saveForOrigin(store => {
378
- return {
379
- ...store,
380
- preferredDevice: store.preferredDevice
381
- ? {
382
- ...store.preferredDevice,
383
- internalState: state,
384
- internalStateExpiration: Date.now() + 1000 * 60 * 15,
385
- }
386
- : undefined,
387
- };
388
- }, origin);
389
- }
390
- });
391
- if (!device.getInternalState() && useCoreInPopup && env === 'webextension') {
392
- const { preferredDevice } = connect_common_1.storage.loadForOrigin(origin) || {};
393
- if ((preferredDevice === null || preferredDevice === void 0 ? void 0 : preferredDevice.internalState) &&
394
- (preferredDevice === null || preferredDevice === void 0 ? void 0 : preferredDevice.internalStateExpiration) &&
395
- preferredDevice.internalStateExpiration > new Date().getTime()) {
396
- device.setInternalState(preferredDevice.internalState);
397
- }
386
+ if (useCoreInPopup && env === 'webextension' && origin) {
387
+ device.initStorage(new StateStorage_1.WebextensionStateStorage(origin));
398
388
  }
389
+ let messageResponse;
399
390
  try {
400
391
  if (getOverridePromise()) {
401
392
  await getOverridePromise();
@@ -524,7 +515,7 @@ const onPopupClosed = (context, customErrorMessage) => {
524
515
  : constants_1.ERRORS.TypedError('Method_Interrupted');
525
516
  if (deviceList.isConnected() && deviceList.asArray().length > 0) {
526
517
  deviceList.allDevices().forEach(d => {
527
- d.keepSession = false;
518
+ d.keepTransportSession = false;
528
519
  if (d.isUsedHere()) {
529
520
  setOverridePromise(d.interruptionFromUser(error));
530
521
  }
@@ -88,7 +88,8 @@ const getInstallationParams = (device, params) => {
88
88
  const isUpdatingToEqualFirmwareType = (device.firmwareType === 'bitcoin-only') === btcOnly;
89
89
  const upgrade = device.atLeast('2.6.3') && isUpdatingToNewerVersion && isUpdatingToEqualFirmwareType;
90
90
  const manual = !device.atLeast(['1.10.0', '2.6.0']) && !upgrade;
91
- const language = device.atLeast('2.7.0');
91
+ const language = device.atLeast('2.7.0') &&
92
+ device.features.internal_model !== constants_1.PROTO.DeviceModelInternal.T2T1;
92
93
  return {
93
94
  manual,
94
95
  upgrade,
@@ -207,6 +208,9 @@ const onCallFirmwareUpdate = async ({ params, context: { deviceList, postMessage
207
208
  }).catch(() => {
208
209
  })
209
210
  : null;
211
+ const disconnectedPromise = new Promise(resolve => {
212
+ deviceList.once('device-disconnect', resolve);
213
+ });
210
214
  if (!languageBlob) {
211
215
  await device.getCommands().typedCall('RebootToBootloader', 'Success', rebootParams);
212
216
  }
@@ -220,7 +224,8 @@ const onCallFirmwareUpdate = async ({ params, context: { deviceList, postMessage
220
224
  rebootResponse = await device.getCommands().typedCall('TranslationDataAck', ['TranslationDataRequest', 'Success'], { data_chunk: Buffer.from(chunk).toString('hex') });
221
225
  }
222
226
  }
223
- await device.release();
227
+ log.info('onCallFirmwareUpdate', 'waiting for disconnected event after rebootToBootloader...');
228
+ await disconnectedPromise;
224
229
  if (device.features.major_version === 1) {
225
230
  await (0, utils_1.createTimeoutPromise)(2000);
226
231
  }
@@ -156,21 +156,8 @@ export declare class DataManager {
156
156
  T1B1: string;
157
157
  T2T1: string;
158
158
  T2B1: string;
159
- T3B1?: undefined;
160
- T3T1?: undefined;
161
- };
162
- comment: string[];
163
- coin?: undefined;
164
- max?: undefined;
165
- capabilities?: undefined;
166
- } | {
167
- methods: string[];
168
- min: {
169
- T1B1: string;
170
- T2T1: string;
171
- T2B1?: undefined;
172
- T3B1?: undefined;
173
- T3T1?: undefined;
159
+ T3B1: string;
160
+ T3T1: string;
174
161
  };
175
162
  coin?: undefined;
176
163
  max?: undefined;
@@ -181,7 +168,7 @@ export declare class DataManager {
181
168
  min: {
182
169
  T1B1: string;
183
170
  T2T1: string;
184
- T2B1: string;
171
+ T2B1?: undefined;
185
172
  T3B1?: undefined;
186
173
  T3T1?: undefined;
187
174
  };
@@ -191,19 +178,6 @@ export declare class DataManager {
191
178
  capabilities?: undefined;
192
179
  } | {
193
180
  capabilities: string[];
194
- min: {
195
- T1B1: string;
196
- T2T1: string;
197
- T2B1: string;
198
- T3B1?: undefined;
199
- T3T1?: undefined;
200
- };
201
- comment: string[];
202
- coin?: undefined;
203
- methods?: undefined;
204
- max?: undefined;
205
- } | {
206
- methods: string[];
207
181
  min: {
208
182
  T1B1: string;
209
183
  T2T1: string;
@@ -211,10 +185,10 @@ export declare class DataManager {
211
185
  T3B1: string;
212
186
  T3T1: string;
213
187
  };
188
+ comment: string[];
214
189
  coin?: undefined;
190
+ methods?: undefined;
215
191
  max?: undefined;
216
- comment?: undefined;
217
- capabilities?: undefined;
218
192
  })[];
219
193
  };
220
194
  }
@@ -23,7 +23,7 @@ export declare const getBitcoinNetwork: (pathOrName: DerivationPath) => ({
23
23
  defaultFees: {
24
24
  feeLimit?: string | undefined;
25
25
  feePerTx?: string | undefined;
26
- label: "high" | "normal" | "economy" | "low" | "custom";
26
+ label: "normal" | "custom" | "high" | "economy" | "low";
27
27
  feePerUnit: string;
28
28
  blocks: number;
29
29
  }[];
@@ -81,7 +81,7 @@ export declare const getEthereumNetwork: (pathOrName: DerivationPath) => ({
81
81
  defaultFees: {
82
82
  feeLimit?: string | undefined;
83
83
  feePerTx?: string | undefined;
84
- label: "high" | "normal" | "economy" | "low" | "custom";
84
+ label: "normal" | "custom" | "high" | "economy" | "low";
85
85
  feePerUnit: string;
86
86
  blocks: number;
87
87
  }[];
@@ -114,7 +114,7 @@ export declare const getMiscNetwork: (pathOrName: DerivationPath) => ({
114
114
  defaultFees: {
115
115
  feeLimit?: string | undefined;
116
116
  feePerTx?: string | undefined;
117
- label: "high" | "normal" | "economy" | "low" | "custom";
117
+ label: "normal" | "custom" | "high" | "economy" | "low";
118
118
  feePerUnit: string;
119
119
  blocks: number;
120
120
  }[];
@@ -171,7 +171,7 @@ export declare const fixCoinInfoNetwork: (ci: BitcoinNetworkInfo, path: number[]
171
171
  defaultFees: {
172
172
  feeLimit?: string | undefined;
173
173
  feePerTx?: string | undefined;
174
- label: "high" | "normal" | "economy" | "low" | "custom";
174
+ label: "normal" | "custom" | "high" | "economy" | "low";
175
175
  feePerUnit: string;
176
176
  blocks: number;
177
177
  }[];
@@ -229,7 +229,7 @@ export declare const getCoinInfoByHash: (hash: string, networkInfo: any) => {
229
229
  defaultFees: {
230
230
  feeLimit?: string | undefined;
231
231
  feePerTx?: string | undefined;
232
- label: "high" | "normal" | "economy" | "low" | "custom";
232
+ label: "normal" | "custom" | "high" | "economy" | "low";
233
233
  feePerUnit: string;
234
234
  blocks: number;
235
235
  }[];
@@ -287,7 +287,7 @@ export declare const getCoinInfo: (currency: string) => ({
287
287
  defaultFees: {
288
288
  feeLimit?: string | undefined;
289
289
  feePerTx?: string | undefined;
290
- label: "high" | "normal" | "economy" | "low" | "custom";
290
+ label: "normal" | "custom" | "high" | "economy" | "low";
291
291
  feePerUnit: string;
292
292
  blocks: number;
293
293
  }[];
@@ -344,7 +344,7 @@ export declare const getCoinInfo: (currency: string) => ({
344
344
  defaultFees: {
345
345
  feeLimit?: string | undefined;
346
346
  feePerTx?: string | undefined;
347
- label: "high" | "normal" | "economy" | "low" | "custom";
347
+ label: "normal" | "custom" | "high" | "economy" | "low";
348
348
  feePerUnit: string;
349
349
  blocks: number;
350
350
  }[];
@@ -376,7 +376,7 @@ export declare const getCoinInfo: (currency: string) => ({
376
376
  defaultFees: {
377
377
  feeLimit?: string | undefined;
378
378
  feePerTx?: string | undefined;
379
- label: "high" | "normal" | "economy" | "low" | "custom";
379
+ label: "normal" | "custom" | "high" | "economy" | "low";
380
380
  feePerUnit: string;
381
381
  blocks: number;
382
382
  }[];
@@ -391,13 +391,7 @@ export declare const ethereumNetworkInfoBase: {
391
391
  minFee: number;
392
392
  maxFee: number;
393
393
  dustLimit: number;
394
- defaultFees: {
395
- feeLimit?: string | undefined;
396
- feePerTx?: string | undefined;
397
- label: "high" | "normal" | "economy" | "low" | "custom";
398
- feePerUnit: string;
399
- blocks: number;
400
- }[];
394
+ defaultFees: import("../types").FeeLevel[];
401
395
  type: "ethereum";
402
396
  decimals: number;
403
397
  };
@@ -426,7 +420,7 @@ export declare const getUniqueNetworks: (networks: (CoinInfo | undefined)[]) =>
426
420
  defaultFees: {
427
421
  feeLimit?: string | undefined;
428
422
  feePerTx?: string | undefined;
429
- label: "high" | "normal" | "economy" | "low" | "custom";
423
+ label: "normal" | "custom" | "high" | "economy" | "low";
430
424
  feePerUnit: string;
431
425
  blocks: number;
432
426
  }[];
@@ -483,7 +477,7 @@ export declare const getUniqueNetworks: (networks: (CoinInfo | undefined)[]) =>
483
477
  defaultFees: {
484
478
  feeLimit?: string | undefined;
485
479
  feePerTx?: string | undefined;
486
- label: "high" | "normal" | "economy" | "low" | "custom";
480
+ label: "normal" | "custom" | "high" | "economy" | "low";
487
481
  feePerUnit: string;
488
482
  blocks: number;
489
483
  }[];
@@ -515,7 +509,7 @@ export declare const getUniqueNetworks: (networks: (CoinInfo | undefined)[]) =>
515
509
  defaultFees: {
516
510
  feeLimit?: string | undefined;
517
511
  feePerTx?: string | undefined;
518
- label: "high" | "normal" | "economy" | "low" | "custom";
512
+ label: "normal" | "custom" | "high" | "economy" | "low";
519
513
  feePerUnit: string;
520
514
  blocks: number;
521
515
  }[];
@@ -548,7 +542,7 @@ export declare const getAllNetworks: () => (({
548
542
  defaultFees: {
549
543
  feeLimit?: string | undefined;
550
544
  feePerTx?: string | undefined;
551
- label: "high" | "normal" | "economy" | "low" | "custom";
545
+ label: "normal" | "custom" | "high" | "economy" | "low";
552
546
  feePerUnit: string;
553
547
  blocks: number;
554
548
  }[];
@@ -605,7 +599,7 @@ export declare const getAllNetworks: () => (({
605
599
  defaultFees: {
606
600
  feeLimit?: string | undefined;
607
601
  feePerTx?: string | undefined;
608
- label: "high" | "normal" | "economy" | "low" | "custom";
602
+ label: "normal" | "custom" | "high" | "economy" | "low";
609
603
  feePerUnit: string;
610
604
  blocks: number;
611
605
  }[];
@@ -637,7 +631,7 @@ export declare const getAllNetworks: () => (({
637
631
  defaultFees: {
638
632
  feeLimit?: string | undefined;
639
633
  feePerTx?: string | undefined;
640
- label: "high" | "normal" | "economy" | "low" | "custom";
634
+ label: "normal" | "custom" | "high" | "economy" | "low";
641
635
  feePerUnit: string;
642
636
  blocks: number;
643
637
  }[];
@@ -144,21 +144,8 @@ export declare const config: {
144
144
  T1B1: string;
145
145
  T2T1: string;
146
146
  T2B1: string;
147
- T3B1?: undefined;
148
- T3T1?: undefined;
149
- };
150
- comment: string[];
151
- coin?: undefined;
152
- max?: undefined;
153
- capabilities?: undefined;
154
- } | {
155
- methods: string[];
156
- min: {
157
- T1B1: string;
158
- T2T1: string;
159
- T2B1?: undefined;
160
- T3B1?: undefined;
161
- T3T1?: undefined;
147
+ T3B1: string;
148
+ T3T1: string;
162
149
  };
163
150
  coin?: undefined;
164
151
  max?: undefined;
@@ -169,7 +156,7 @@ export declare const config: {
169
156
  min: {
170
157
  T1B1: string;
171
158
  T2T1: string;
172
- T2B1: string;
159
+ T2B1?: undefined;
173
160
  T3B1?: undefined;
174
161
  T3T1?: undefined;
175
162
  };
@@ -179,19 +166,6 @@ export declare const config: {
179
166
  capabilities?: undefined;
180
167
  } | {
181
168
  capabilities: string[];
182
- min: {
183
- T1B1: string;
184
- T2T1: string;
185
- T2B1: string;
186
- T3B1?: undefined;
187
- T3T1?: undefined;
188
- };
189
- comment: string[];
190
- coin?: undefined;
191
- methods?: undefined;
192
- max?: undefined;
193
- } | {
194
- methods: string[];
195
169
  min: {
196
170
  T1B1: string;
197
171
  T2T1: string;
@@ -199,10 +173,10 @@ export declare const config: {
199
173
  T3B1: string;
200
174
  T3T1: string;
201
175
  };
176
+ comment: string[];
202
177
  coin?: undefined;
178
+ methods?: undefined;
203
179
  max?: undefined;
204
- comment?: undefined;
205
- capabilities?: undefined;
206
180
  })[];
207
181
  };
208
182
  //# sourceMappingURL=config.d.ts.map
@@ -91,6 +91,10 @@ exports.config = {
91
91
  name: 'firmware-t2b1',
92
92
  url: './data/firmware/t2b1/releases.json',
93
93
  },
94
+ {
95
+ name: 'firmware-t3b1',
96
+ url: './data/firmware/t3b1/releases.json',
97
+ },
94
98
  {
95
99
  name: 'firmware-t3t1',
96
100
  url: './data/firmware/t3t1/releases.json',
@@ -250,8 +254,7 @@ exports.config = {
250
254
  },
251
255
  {
252
256
  methods: ['showDeviceTutorial', 'authenticateDevice'],
253
- min: { T1B1: '0', T2T1: '0', T2B1: '2.6.1' },
254
- comment: ['Only on T2B1'],
257
+ min: { T1B1: '0', T2T1: '0', T2B1: '2.6.1', T3B1: '2.8.1', T3T1: '2.8.0' },
255
258
  },
256
259
  {
257
260
  methods: ['rebootToBootloader'],
@@ -263,11 +266,11 @@ exports.config = {
263
266
  },
264
267
  {
265
268
  methods: ['solanaGetPublicKey', 'solanaGetAddress', 'solanaSignTransaction'],
266
- min: { T1B1: '0', T2T1: '2.6.4', T2B1: '2.6.4' },
269
+ min: { T1B1: '0', T2T1: '2.6.4', T2B1: '2.6.4', T3B1: '2.8.1', T3T1: '2.7.2' },
267
270
  },
268
271
  {
269
272
  capabilities: ['chunkify'],
270
- min: { T1B1: '0', T2T1: '2.6.3', T2B1: '2.6.3' },
273
+ min: { T1B1: '0', T2T1: '2.6.3', T2B1: '2.6.3', T3B1: '2.8.1', T3T1: '2.7.2' },
271
274
  comment: [
272
275
  "Since firmware 2.6.3 there is a new protobuf field 'chunkify' in almost all getAddress and signTx methods",
273
276
  ],
@@ -279,7 +282,7 @@ exports.config = {
279
282
  T2T1: '2.7.0',
280
283
  T2B1: '2.7.0',
281
284
  T3B1: '2.8.1',
282
- T3T1: '2.7.1',
285
+ T3T1: '2.7.2',
283
286
  },
284
287
  },
285
288
  ],
@@ -39,6 +39,15 @@ exports.deviceAuthenticityConfig = {
39
39
  '046d3161213d66b5464ff6546d48f87a807849da6d58f3e58fbc4b21db89cd837955c37afae9a719a8f0899893398188d986b14971c390bc0a69bee8dfabdaa9ad',
40
40
  '043e0d5b87f4db112911e1e83f3e5907c310caab70b5bc05980226ee20900d6c87c7b2d0004bf5bfe7af3a161174fe8b762bbc71886c7af1c4ad89166a8221b465',
41
41
  '0435817aec4f46df42a3d3cbbe5def767c7eeee56be38b0e0977aa62c225fedd08b99c9496fb9cccbed3507044b4dd4db8191faa750f217cad9a581224106c2be7',
42
+ '046f76dbc25d287e6e942fc373639f53f29f06a194dcf5018737dbe694102a4f41bd4648507d6c32863f739f45dfe3837c0ad6bde690cb90eb69b7821abab459e5',
43
+ '04bd0c975ef09a2532e83b8331240c55be5db624450cfeeb302cc2581f289badaef8e06c96b48544190cc3d1a20f0850e43b463bd8480aae549930e9ae95ead78d',
44
+ '04cdd0215b29e28d388fd27914c7cc81b3895e8c61a8abb39b8905a00bba0765824648677e99038154a54da3be52067396562f901264a42b7cfbe7045223b83365',
45
+ '04f147bf44c91272c3fb5aaa4a4fe6a36a355c9c77d80fb62564d3f43fdcff4ccda03b14510df7ee5ff81a5522709e86a1ddb5e6fea6b3dd7e29ee1a43cd23bf95',
46
+ '042c6900f85f7193ad5e4e8e1c2d63a1bd874f03fac1966e33cb3ca9e76de8f70f054125fe15aace443a8978f0781225b819f7326d202f624d803b89ed833e8d67',
47
+ '04dfc672fd79e75d74d2a9163b46b95982e8f93b0e75e11ecaaac869e59c83af4f384ce1e72075dabfeac4a6ca63db0d2e8658324007cc0bec9882ddf286172cda',
48
+ '04c243743ba6326a443c34d503ea5d2d3036e1fbc8dbb072d4ae0f9b8016910db38e234641b87557fb44bcddee612722a67831bbac9758982a5843d9077be9434d',
49
+ '04f1a32b84249a4b909974e32b33cc78aeef8144ef57744e792e6203fb8acce348f0d5d5535ed9a65ac741744a264de2073e49dbcd989819cddc90285b5e97a28a',
50
+ '04894fa385d11809244da4f3d7de8ddd70c25abd5d4d3054b438d09016f2fd0a98729e15ea1483fbde83489fec6c64f8be014db8dc22227babcecdb5fd996ea671',
42
51
  ],
43
52
  debug: {
44
53
  rootPubKeys: [
@@ -49,6 +58,20 @@ exports.deviceAuthenticityConfig = {
49
58
  ],
50
59
  },
51
60
  },
61
+ T3B1: {
62
+ rootPubKeys: [
63
+ '045b5c3fdd01f3602092834209b86df0ca86a9faf25cac35c73bf6237d66eb21eafcec3706f1ccd5eb4cc7f2fa1751213eccb1c78389afba89a5788ff31ee46a5d',
64
+ ],
65
+ caPubKeys: [
66
+ '04860857f8ceb107cf03cc6ef56523b5e440e2ed51933cc49ac8a498063f06ab891bdafd0a1655aa287b9ded8a898d9532ec9d6550db3bb524e7af3e474b013d87',
67
+ '047962b89421e26daa51e0c368d6bbd7d49dcf972b0a6f148c115aedbba533e1574740dfa51c11992c276872ac2f11b3e0f54499c3347e83410142818ac4579b8e',
68
+ '04bc9f1e23ceed59b3e7b6b760a41f1f37ccc252adb1186e4035ec3f46266656400c7cd4c7153c9dec581b655c9ba1f74878c84128e60a66eed46e251e2eaf065f',
69
+ ],
70
+ debug: {
71
+ rootPubKeys: [],
72
+ caPubKeys: [],
73
+ },
74
+ },
52
75
  T3T1: {
53
76
  rootPubKeys: [
54
77
  '041854b27fb1d9f65abb66828e78c9dc0ca301e66081ab0c6a4d104f9df1cd0ad5a7c75f77a8c092f55cf825d2abaf734f934c9394d5e75f75a5a06a5ee9be93ae',
@@ -60,6 +83,15 @@ exports.deviceAuthenticityConfig = {
60
83
  '041aec4007b431c7b5978c126f7e9015e7601f47e835fe13e2028883a45fc8c5d039641474b8cad1e53c4c169fe7d1905402307850ada15b788353ca7c7000939b',
61
84
  '04debf2a916d0c5209220ca6d202aefa174913b345d1cfd21a85ddc160626c70a559ac0ec1172041f679d99e3e1d6a30b84b04ed25ba47f707e9c2450dd4d8d1da',
62
85
  '045d6d5119d95f29eba79d230df9c5531e0b7c030ba9e7de0cf48a2eb82c57f0a927977f0e1f23bda144d1e90f63b62dc86c14d46bee7bf676619b3db23dc17935',
86
+ '040f7744e5a4314bfc5ebacfcc271051cf1bdc07ed6b373ea039a22e41df716c4a830d60c3b96e33474de846951e5c94cf210dede28b8d11cdb3eb47723d9dc377',
87
+ '044a68d0893322763cd94f997f9c4b7e9e61160113e2fdc25b9f4c5b3a1e9984dec56360b8be5e93830ad11e8e7b1a2a86803efc2f67b70495e1fe65b44934f0cf',
88
+ '04d3198ee960b7f74add67c2feb96e4a175ac8da1ad0103946e080ede248db9ef7b57f2461f73c6d44e746ebc407bdc4ef9cfa209aad2ca4932d187579c546ecf9',
89
+ '04a613b704d607841c8779606858d47e4919841bd990d7e24e4a33044ed2ba2033a55536cca8af95be9604cf7947705dee794774e1e0d9225476396753eb246453',
90
+ '045bfb9c36e4fb0d70b3c7e208ef08097de047de4cbaf35fbb698633adeae61fb97e398d72ebb5c2facd23c86274dea6e43be5559faef0bf74496800e74f2fb220',
91
+ '04839950fbd7c2da853d839360e838b486cc303ab3434dad8f36891d3fa3ba91f8da5ddd3af1ca73dc6267d0dff52700afb3a24add0da2586f8d17aacb37f49926',
92
+ '04903be00e4c5561413513eec337f0a6bec4968711de83242856e6b2bf1f06b26732b7bb1322a817448c03fc2f312318af67be580add0768179ce1af1f5e777bd0',
93
+ '0464f0ef96854bc7f081396ce7a2c75df4208f551c19d27f5a81238d47b842df800383a736a1b5b1c9e1e458d05ea1584e12278ab5e1252a098820251b37917c22',
94
+ '0401f3f804333b4d0caa18d27dfc0698dbc11c33b703019018e5819734ef2551615ba6915e6119bd7d36c035553ea660f1ccf7c34e2375e8e1ddf0a471b76707fd',
63
95
  ],
64
96
  debug: {
65
97
  rootPubKeys: [
@@ -70,19 +102,5 @@ exports.deviceAuthenticityConfig = {
70
102
  ],
71
103
  },
72
104
  },
73
- T3B1: {
74
- rootPubKeys: [
75
- '045b5c3fdd01f3602092834209b86df0ca86a9faf25cac35c73bf6237d66eb21eafcec3706f1ccd5eb4cc7f2fa1751213eccb1c78389afba89a5788ff31ee46a5d',
76
- ],
77
- caPubKeys: [
78
- '04860857f8ceb107cf03cc6ef56523b5e440e2ed51933cc49ac8a498063f06ab891bdafd0a1655aa287b9ded8a898d9532ec9d6550db3bb524e7af3e474b013d87',
79
- '047962b89421e26daa51e0c368d6bbd7d49dcf972b0a6f148c115aedbba533e1574740dfa51c11992c276872ac2f11b3e0f54499c3347e83410142818ac4579b8e',
80
- '04bc9f1e23ceed59b3e7b6b760a41f1f37ccc252adb1186e4035ec3f46266656400c7cd4c7153c9dec581b655c9ba1f74878c84128e60a66eed46e251e2eaf065f',
81
- ],
82
- debug: {
83
- rootPubKeys: [],
84
- caPubKeys: [],
85
- },
86
- },
87
105
  };
88
106
  //# sourceMappingURL=deviceAuthenticityConfig.js.map