@trezor/connect 9.6.3 → 9.6.4

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 (163) hide show
  1. package/CHANGELOG.md +14 -5
  2. package/README.md +1 -1
  3. package/lib/api/applyFlags.d.ts +1 -1
  4. package/lib/api/applyFlags.js +2 -2
  5. package/lib/api/applySettings.d.ts +1 -1
  6. package/lib/api/authenticateDevice.js +4 -0
  7. package/lib/api/authorizeCoinjoin.d.ts +1 -1
  8. package/lib/api/backupDevice.d.ts +1 -1
  9. package/lib/api/backupDevice.js +2 -2
  10. package/lib/api/bitcoin/TransactionComposer.d.ts +1 -1
  11. package/lib/api/bitcoin/inputs.d.ts +1 -1
  12. package/lib/api/bitcoin/transactionBytes.d.ts +2 -2
  13. package/lib/api/bleUnpair.js +1 -1
  14. package/lib/api/cancelCoinjoinAuthorization.d.ts +1 -1
  15. package/lib/api/cardano/api/cardanoSignTransaction.d.ts +2 -2
  16. package/lib/api/cardano/cardanoInputs.js +2 -2
  17. package/lib/api/changePin.d.ts +1 -1
  18. package/lib/api/changePin.js +2 -2
  19. package/lib/api/changeWipeCode.d.ts +1 -1
  20. package/lib/api/cipherKeyValue.d.ts +1 -1
  21. package/lib/api/eos/api/eosGetPublicKey.d.ts +1 -1
  22. package/lib/api/eos/api/eosSignTransaction.d.ts +1 -1
  23. package/lib/api/eos/eosSignTx.d.ts +20 -20
  24. package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +5 -5
  25. package/lib/api/ethereum/api/ethereumSignMessage.d.ts +1 -2
  26. package/lib/api/ethereum/api/ethereumVerifyMessage.d.ts +1 -1
  27. package/lib/api/evoluGetNode.d.ts +1 -1
  28. package/lib/api/evoluGetNode.js +2 -2
  29. package/lib/api/firmware/calculateFirmwareHash.d.ts +9 -2
  30. package/lib/api/firmware/calculateFirmwareHash.js +11 -1
  31. package/lib/api/firmware/verifyAuthenticityProof.d.ts +3 -1
  32. package/lib/api/firmware/verifyAuthenticityProof.js +10 -15
  33. package/lib/api/getCoinInfo.d.ts +34 -34
  34. package/lib/api/getFeatures.d.ts +1 -0
  35. package/lib/api/getFirmwareHash.d.ts +1 -1
  36. package/lib/api/getFirmwareHash.js +2 -2
  37. package/lib/api/getNonce.d.ts +1 -1
  38. package/lib/api/getOwnershipId.d.ts +1 -1
  39. package/lib/api/getOwnershipId.js +2 -2
  40. package/lib/api/getOwnershipProof.d.ts +1 -1
  41. package/lib/api/getOwnershipProof.js +2 -2
  42. package/lib/api/getPublicKey.d.ts +5 -5
  43. package/lib/api/loadDevice.d.ts +1 -1
  44. package/lib/api/loadDevice.js +2 -2
  45. package/lib/api/nem/api/nemSignTransaction.d.ts +1 -1
  46. package/lib/api/nem/nemSignTx.d.ts +9 -9
  47. package/lib/api/recoveryDevice.d.ts +1 -1
  48. package/lib/api/requestLogin.d.ts +1 -1
  49. package/lib/api/ripple/api/rippleSignTransaction.d.ts +1 -1
  50. package/lib/api/setBrightness.d.ts +1 -1
  51. package/lib/api/setBrightness.js +2 -2
  52. package/lib/api/setBusy.d.ts +1 -1
  53. package/lib/api/setBusy.js +2 -2
  54. package/lib/api/showDeviceTutorial.d.ts +1 -1
  55. package/lib/api/signMessage.d.ts +1 -1
  56. package/lib/api/solana/api/solanaComposeTransaction.d.ts +6 -0
  57. package/lib/api/solana/api/solanaComposeTransaction.js +9 -0
  58. package/lib/api/solana/api/solanaSignTransaction.js +4 -4
  59. package/lib/api/tezos/api/tezosGetPublicKey.d.ts +1 -1
  60. package/lib/api/tezos/api/tezosSignTransaction.d.ts +1 -1
  61. package/lib/api/tezos/tezosSignTx.d.ts +17 -17
  62. package/lib/api/unlockPath.d.ts +1 -1
  63. package/lib/core/AbstractMethod.d.ts +4 -1
  64. package/lib/core/index.js +8 -1
  65. package/lib/core/onCallFirmwareUpdate.js +42 -51
  66. package/lib/data/coinInfo.d.ts +94 -93
  67. package/lib/data/config.js +9 -1
  68. package/lib/data/defaultFeeLevels.d.ts +1 -1
  69. package/lib/data/defaultFeeLevels.js +1 -1
  70. package/lib/data/deviceAuthenticityBlacklist.d.ts +3 -0
  71. package/lib/data/deviceAuthenticityBlacklist.js +11 -0
  72. package/lib/data/deviceAuthenticityBlacklistConfig.d.ts +11 -0
  73. package/lib/data/deviceAuthenticityBlacklistConfig.js +15 -0
  74. package/lib/data/deviceAuthenticityConfig.js +4 -140
  75. package/lib/data/deviceAuthenticityConfigTypes.d.ts +0 -9
  76. package/lib/data/deviceAuthenticityConfigTypes.js +3 -5
  77. package/lib/data/firmwareInfo.d.ts +12 -7
  78. package/lib/data/firmwareInfo.js +58 -15
  79. package/lib/data/transportInfo.d.ts +11 -1
  80. package/lib/data/udevInfo.d.ts +9 -1
  81. package/lib/data/version.d.ts +1 -1
  82. package/lib/data/version.js +1 -1
  83. package/lib/device/Device.d.ts +20 -10
  84. package/lib/device/Device.js +95 -23
  85. package/lib/device/DeviceCommands.d.ts +4 -4
  86. package/lib/device/DeviceCurrentSession.d.ts +242 -242
  87. package/lib/device/DeviceCurrentSession.js +1 -1
  88. package/lib/device/DeviceList.d.ts +7 -4
  89. package/lib/device/DeviceList.js +14 -4
  90. package/lib/device/StateStorage.d.ts +1 -1
  91. package/lib/device/checkFirmwareRevision.d.ts +1 -1
  92. package/lib/device/checkFirmwareRevision.js +2 -2
  93. package/lib/device/thp/handshake.d.ts +1 -1
  94. package/lib/device/thp/handshake.js +14 -3
  95. package/lib/device/thp/index.d.ts +1 -1
  96. package/lib/device/thp/index.js +29 -4
  97. package/lib/device/thp/pairing.js +1 -3
  98. package/lib/device/thp/session.js +1 -1
  99. package/lib/device/workflow/checkFirmwareHash.js +6 -1
  100. package/lib/device/workflow/handshake.js +3 -7
  101. package/lib/device/workflow/trezorPushNotification.d.ts +3 -0
  102. package/lib/device/workflow/trezorPushNotification.js +76 -0
  103. package/lib/device/workflow/validateState.js +3 -0
  104. package/lib/events/call.d.ts +1 -1
  105. package/lib/events/device.d.ts +11 -3
  106. package/lib/events/device.js +5 -1
  107. package/lib/events/popup.d.ts +1 -1
  108. package/lib/events/transport.d.ts +3 -21
  109. package/lib/events/ui-request.d.ts +15 -8
  110. package/lib/tsconfig.lib.tsbuildinfo +1 -1
  111. package/lib/types/api/applyFlags.d.ts +1 -1
  112. package/lib/types/api/applySettings.d.ts +1 -0
  113. package/lib/types/api/authenticateDevice.d.ts +9 -10
  114. package/lib/types/api/authenticateDevice.js +2 -0
  115. package/lib/types/api/backupDevice.d.ts +1 -1
  116. package/lib/types/api/bitcoin/index.d.ts +1 -1
  117. package/lib/types/api/bleUnpair.d.ts +1 -1
  118. package/lib/types/api/cancelCoinjoinAuthorization.d.ts +1 -1
  119. package/lib/types/api/cardanoComposeTransaction.d.ts +2 -2
  120. package/lib/types/api/cardanoComposeTransaction.js +2 -2
  121. package/lib/types/api/changePin.d.ts +1 -1
  122. package/lib/types/api/changeWipeCode.d.ts +1 -1
  123. package/lib/types/api/composeTransaction.d.ts +1 -1
  124. package/lib/types/api/discoverAccounts.d.ts +1 -1
  125. package/lib/types/api/discoverAccounts.js +1 -1
  126. package/lib/types/api/eosSignTransaction.d.ts +1 -1
  127. package/lib/types/api/ethereum/index.d.ts +8 -8
  128. package/lib/types/api/ethereumSignMessage.d.ts +1 -1
  129. package/lib/types/api/ethereumSignTypedData.d.ts +1 -1
  130. package/lib/types/api/ethereumVerifyMessage.d.ts +1 -1
  131. package/lib/types/api/getAccountInfo.d.ts +1 -1
  132. package/lib/types/api/getAddress.d.ts +6 -6
  133. package/lib/types/api/getFirmwareHash.d.ts +1 -1
  134. package/lib/types/api/nemGetAddress.d.ts +1 -1
  135. package/lib/types/api/nemSignTransaction.d.ts +1 -1
  136. package/lib/types/api/recoveryDevice.d.ts +2 -2
  137. package/lib/types/api/setBusy.d.ts +1 -1
  138. package/lib/types/api/setProxy.d.ts +1 -1
  139. package/lib/types/api/showDeviceTutorial.d.ts +1 -1
  140. package/lib/types/api/signMessage.d.ts +1 -1
  141. package/lib/types/api/solana/index.d.ts +26 -3
  142. package/lib/types/api/solana/index.js +19 -3
  143. package/lib/types/api/tezosSignTransaction.d.ts +1 -1
  144. package/lib/types/api/thpRemoveCredentials.d.ts +1 -1
  145. package/lib/types/api/unlockPath.d.ts +1 -1
  146. package/lib/types/api/verifyMessage.d.ts +1 -1
  147. package/lib/types/api/wipeDevice.d.ts +1 -1
  148. package/lib/types/device.d.ts +9 -4
  149. package/lib/types/device.js +5 -3
  150. package/lib/types/firmware.d.ts +1 -0
  151. package/lib/types/settings.d.ts +2 -2
  152. package/lib/types/workflow.d.ts +4 -0
  153. package/lib/utils/assetUtils.d.ts +6 -4
  154. package/lib/utils/assetUtils.js +13 -2
  155. package/lib/utils/assets-browser.d.ts +0 -4
  156. package/lib/utils/assets-browser.js +3 -11
  157. package/lib/utils/assets.native.js +1 -1
  158. package/lib/utils/deviceFeaturesUtils.d.ts +1 -1
  159. package/lib/utils/firmwareUtils.d.ts +7 -4
  160. package/lib/utils/firmwareUtils.js +21 -14
  161. package/lib/utils/pathUtils.d.ts +3 -2
  162. package/lib/utils/uiPromiseManager.d.ts +9 -9
  163. package/package.json +13 -12
@@ -8,6 +8,7 @@ const constants_1 = require("../constants");
8
8
  const firmwareInfo_1 = require("../data/firmwareInfo");
9
9
  const events_1 = require("../events");
10
10
  const types_1 = require("../types");
11
+ const firmwareUtils_1 = require("../utils/firmwareUtils");
11
12
  const waitForReconnectedDevice = async ({ bootloader, method, intermediary }, { deviceList, device, registerEvents, postMessage, log, abortSignal, uiPromises, }) => {
12
13
  const target = intermediary || !bootloader ? 'normal' : 'bootloader';
13
14
  let i = 0;
@@ -93,43 +94,24 @@ const waitForReconnectedDevice = async ({ bootloader, method, intermediary }, {
93
94
  }
94
95
  return reconnectedDevice;
95
96
  };
96
- const getRebootMethod = async ({ deviceList, device, log, postMessage, }) => {
97
- let method = 'wait';
98
- if (!device.bluetoothProps) {
99
- return method;
100
- }
101
- const ctrl = new AbortController();
102
- const disconnectedPromise = new Promise(resolve => {
103
- const handleDisconnect = () => {
104
- log.info(`waitForBluetoothReboot device-disconnected. aborted: ${ctrl.signal.aborted}`);
105
- if (!ctrl.signal.aborted) {
106
- ctrl.abort();
107
- method = 'auto';
108
- }
109
- resolve();
110
- };
111
- deviceList.once('device-disconnect', handleDisconnect);
112
- ctrl.signal.addEventListener('abort', () => {
113
- deviceList.off('device-disconnect', handleDisconnect);
114
- resolve();
115
- });
116
- });
117
- await device.release();
118
- const restartPromise = new Promise(resolve => {
119
- (0, utils_1.resolveAfter)(4000).then(() => {
120
- log.info(`waitForBluetoothReboot restartPromise. aborted: ${ctrl.signal.aborted}`);
121
- if (!ctrl.signal.aborted) {
122
- ctrl.abort();
123
- postMessage((0, events_1.createUiMessage)(events_1.UI.FIRMWARE_DISCONNECT, {
124
- device: device.toMessageObject(),
125
- }));
126
- }
97
+ const waitForBluetoothReboot = ({ device, target, postMessage }) => new Promise(resolve => {
98
+ postMessage((0, events_1.createUiMessage)(events_1.UI.FIRMWARE_RECONNECT, {
99
+ device: device.toMessageObject(),
100
+ disconnected: false,
101
+ method: 'auto',
102
+ target,
103
+ i: 0,
104
+ }));
105
+ const handler = () => {
106
+ const deviceIsReady = (target === 'bootloader' && device.features?.bootloader_mode) ||
107
+ (target === 'normal' && device.getThpState()?.properties);
108
+ if (deviceIsReady) {
109
+ device.lifecycle.off('device-changed', handler);
127
110
  resolve();
128
- });
129
- });
130
- await Promise.race([disconnectedPromise, restartPromise]);
131
- return method;
132
- };
111
+ }
112
+ };
113
+ device.lifecycle.on('device-changed', handler);
114
+ });
133
115
  const getInstallationParams = (device, params) => {
134
116
  const btcOnly = params.btcOnly ?? device.firmwareType === types_1.FirmwareType.BitcoinOnly;
135
117
  if (!device.features.bootloader_mode) {
@@ -245,13 +227,18 @@ const onCallFirmwareUpdate = async ({ params, context, }) => {
245
227
  operation: 'downloading',
246
228
  progress: 100,
247
229
  }));
248
- postMessage((0, events_1.createUiMessage)(events_1.UI.FIRMWARE_DOWNLOADED, {
249
- binary: finalBinaryInfo.binary,
250
- binaryVersion: finalBinaryInfo.binaryVersion,
251
- releaseVersion: finalBinaryInfo.releaseVersion,
252
- firmwareType: device.firmwareType,
253
- internalModel: device.features.internal_model,
254
- }));
230
+ const finalBinaryRelease = device?.firmwareReleaseConfigInfo?.release;
231
+ if ((0, firmwareUtils_1.isFirmwareCacheUsedForSelectedSource)()) {
232
+ const message = (0, events_1.createUiMessage)(events_1.UI.FIRMWARE_DOWNLOADED, {
233
+ binary: finalBinaryInfo.binary,
234
+ binaryVersion: finalBinaryInfo.binaryVersion,
235
+ releaseVersion: finalBinaryInfo.releaseVersion,
236
+ firmwareType: device.firmwareType,
237
+ internalModel: device.features.internal_model,
238
+ release: finalBinaryRelease,
239
+ });
240
+ postMessage(message);
241
+ }
255
242
  const deviceInitiallyConnectedInBootloader = device.features.bootloader_mode;
256
243
  let reconnectedDevice = device;
257
244
  if (deviceInitiallyConnectedInBootloader) {
@@ -274,15 +261,15 @@ const onCallFirmwareUpdate = async ({ params, context, }) => {
274
261
  });
275
262
  await device.getCommands().typedCall('RebootToBootloader', 'Success', rebootParams);
276
263
  log.info('onCallFirmwareUpdate', 'waiting for disconnected event after rebootToBootloader...');
277
- if (device.bluetoothProps) {
264
+ if (device.descriptor.apiType === 'bluetooth') {
278
265
  await device.release();
279
- postMessage((0, events_1.createUiMessage)(events_1.UI.FIRMWARE_DISCONNECT, {
280
- device: device.toMessageObject(),
281
- }));
266
+ await waitForBluetoothReboot({ device, target: 'bootloader', postMessage });
282
267
  }
283
- await disconnectedPromise;
284
- if (device.features.major_version === 1) {
285
- await (0, utils_1.resolveAfter)(2000);
268
+ else {
269
+ await disconnectedPromise;
270
+ if (device.features.major_version === 1) {
271
+ await (0, utils_1.resolveAfter)(2000);
272
+ }
286
273
  }
287
274
  reconnectedDevice = await waitForReconnectedDevice({ bootloader: true, method: 'auto' }, { ...context, device });
288
275
  }
@@ -311,7 +298,11 @@ const onCallFirmwareUpdate = async ({ params, context, }) => {
311
298
  updateFlowType,
312
299
  });
313
300
  }
314
- const method = await getRebootMethod({ deviceList, device, log, postMessage });
301
+ let method = 'wait';
302
+ if (device.descriptor.apiType === 'bluetooth') {
303
+ await waitForBluetoothReboot({ device, target: 'normal', postMessage });
304
+ method = 'auto';
305
+ }
315
306
  reconnectedDevice = await waitForReconnectedDevice({ bootloader: false, method }, { ...context, device: reconnectedDevice });
316
307
  const installedVersion = reconnectedDevice.getVersion();
317
308
  if (!bootloaderVersion || !installedVersion) {
@@ -1,15 +1,26 @@
1
- import type { BitcoinNetworkInfo, DerivationPath } from '../types';
1
+ import type { BitcoinNetworkInfo } from '../types/coinInfo';
2
+ import type { DerivationPath } from '../types/params';
2
3
  export declare const getBitcoinNetwork: (pathOrName: DerivationPath) => Readonly<{
3
4
  blockchainLink?: {
4
5
  type: string;
5
6
  url: string[];
6
7
  } | undefined;
7
8
  label: string;
9
+ name: string;
8
10
  blockTime: number;
9
11
  minFee: number;
10
12
  maxFee: number;
11
13
  minPriorityFee: number;
12
- name: string;
14
+ defaultFees: {
15
+ feePerTx?: string | undefined;
16
+ feeLimit?: string | undefined;
17
+ baseFeePerGas?: string | undefined;
18
+ maxFeePerGas?: string | undefined;
19
+ maxPriorityFeePerGas?: string | undefined;
20
+ label: "normal" | "custom" | "high" | "economy" | "low";
21
+ blocks: number;
22
+ feePerUnit: string;
23
+ }[];
13
24
  shortcut: string;
14
25
  slip44: number;
15
26
  support: {
@@ -23,21 +34,11 @@ export declare const getBitcoinNetwork: (pathOrName: DerivationPath) => Readonly
23
34
  connect: boolean;
24
35
  };
25
36
  decimals: number;
26
- defaultFees: {
27
- feePerTx?: string | undefined;
28
- feeLimit?: string | undefined;
29
- baseFeePerGas?: string | undefined;
30
- maxFeePerGas?: string | undefined;
31
- maxPriorityFeePerGas?: string | undefined;
32
- label: "normal" | "custom" | "high" | "economy" | "low";
33
- blocks: number;
34
- feePerUnit: string;
35
- }[];
36
37
  } & {
38
+ taproot?: boolean | undefined;
37
39
  cashAddrPrefix?: string | undefined;
38
40
  xPubMagicSegwitNative?: number | undefined;
39
41
  xPubMagicSegwit?: number | undefined;
40
- taproot?: boolean | undefined;
41
42
  type: "bitcoin";
42
43
  dustLimit: number;
43
44
  curveName: string;
@@ -69,11 +70,21 @@ export declare const getEthereumNetwork: (pathOrNetworkSymbol: DerivationPath) =
69
70
  url: string[];
70
71
  } | undefined;
71
72
  label: string;
73
+ name: string;
72
74
  blockTime: number;
73
75
  minFee: number;
74
76
  maxFee: number;
75
77
  minPriorityFee: number;
76
- name: string;
78
+ defaultFees: {
79
+ feePerTx?: string | undefined;
80
+ feeLimit?: string | undefined;
81
+ baseFeePerGas?: string | undefined;
82
+ maxFeePerGas?: string | undefined;
83
+ maxPriorityFeePerGas?: string | undefined;
84
+ label: "normal" | "custom" | "high" | "economy" | "low";
85
+ blocks: number;
86
+ feePerUnit: string;
87
+ }[];
77
88
  shortcut: string;
78
89
  slip44: number;
79
90
  support: {
@@ -87,16 +98,6 @@ export declare const getEthereumNetwork: (pathOrNetworkSymbol: DerivationPath) =
87
98
  connect: boolean;
88
99
  };
89
100
  decimals: number;
90
- defaultFees: {
91
- feePerTx?: string | undefined;
92
- feeLimit?: string | undefined;
93
- baseFeePerGas?: string | undefined;
94
- maxFeePerGas?: string | undefined;
95
- maxPriorityFeePerGas?: string | undefined;
96
- label: "normal" | "custom" | "high" | "economy" | "low";
97
- blocks: number;
98
- feePerUnit: string;
99
- }[];
100
101
  } & {
101
102
  network?: undefined;
102
103
  type: "ethereum";
@@ -108,11 +109,21 @@ export declare const getMiscNetwork: (pathOrName: DerivationPath) => Readonly<{
108
109
  url: string[];
109
110
  } | undefined;
110
111
  label: string;
112
+ name: string;
111
113
  blockTime: number;
112
114
  minFee: number;
113
115
  maxFee: number;
114
116
  minPriorityFee: number;
115
- name: string;
117
+ defaultFees: {
118
+ feePerTx?: string | undefined;
119
+ feeLimit?: string | undefined;
120
+ baseFeePerGas?: string | undefined;
121
+ maxFeePerGas?: string | undefined;
122
+ maxPriorityFeePerGas?: string | undefined;
123
+ label: "normal" | "custom" | "high" | "economy" | "low";
124
+ blocks: number;
125
+ feePerUnit: string;
126
+ }[];
116
127
  shortcut: string;
117
128
  slip44: number;
118
129
  support: {
@@ -126,16 +137,6 @@ export declare const getMiscNetwork: (pathOrName: DerivationPath) => Readonly<{
126
137
  connect: boolean;
127
138
  };
128
139
  decimals: number;
129
- defaultFees: {
130
- feePerTx?: string | undefined;
131
- feeLimit?: string | undefined;
132
- baseFeePerGas?: string | undefined;
133
- maxFeePerGas?: string | undefined;
134
- maxPriorityFeePerGas?: string | undefined;
135
- label: "normal" | "custom" | "high" | "economy" | "low";
136
- blocks: number;
137
- feePerUnit: string;
138
- }[];
139
140
  } & {
140
141
  network?: undefined;
141
142
  type: "nem" | "misc";
@@ -171,11 +172,21 @@ export declare const fixCoinInfoNetwork: (ci: BitcoinNetworkInfo, path: number[]
171
172
  url: string[];
172
173
  } | undefined;
173
174
  label: string;
175
+ name: string;
174
176
  blockTime: number;
175
177
  minFee: number;
176
178
  maxFee: number;
177
179
  minPriorityFee: number;
178
- name: string;
180
+ defaultFees: {
181
+ feePerTx?: string | undefined;
182
+ feeLimit?: string | undefined;
183
+ baseFeePerGas?: string | undefined;
184
+ maxFeePerGas?: string | undefined;
185
+ maxPriorityFeePerGas?: string | undefined;
186
+ label: "normal" | "custom" | "high" | "economy" | "low";
187
+ blocks: number;
188
+ feePerUnit: string;
189
+ }[];
179
190
  shortcut: string;
180
191
  slip44: number;
181
192
  support: {
@@ -189,21 +200,11 @@ export declare const fixCoinInfoNetwork: (ci: BitcoinNetworkInfo, path: number[]
189
200
  connect: boolean;
190
201
  };
191
202
  decimals: number;
192
- defaultFees: {
193
- feePerTx?: string | undefined;
194
- feeLimit?: string | undefined;
195
- baseFeePerGas?: string | undefined;
196
- maxFeePerGas?: string | undefined;
197
- maxPriorityFeePerGas?: string | undefined;
198
- label: "normal" | "custom" | "high" | "economy" | "low";
199
- blocks: number;
200
- feePerUnit: string;
201
- }[];
202
203
  } & {
204
+ taproot?: boolean | undefined;
203
205
  cashAddrPrefix?: string | undefined;
204
206
  xPubMagicSegwitNative?: number | undefined;
205
207
  xPubMagicSegwit?: number | undefined;
206
- taproot?: boolean | undefined;
207
208
  type: "bitcoin";
208
209
  dustLimit: number;
209
210
  curveName: string;
@@ -235,11 +236,21 @@ export declare const getCoinInfo: (currency: string) => Readonly<{
235
236
  url: string[];
236
237
  } | undefined;
237
238
  label: string;
239
+ name: string;
238
240
  blockTime: number;
239
241
  minFee: number;
240
242
  maxFee: number;
241
243
  minPriorityFee: number;
242
- name: string;
244
+ defaultFees: {
245
+ feePerTx?: string | undefined;
246
+ feeLimit?: string | undefined;
247
+ baseFeePerGas?: string | undefined;
248
+ maxFeePerGas?: string | undefined;
249
+ maxPriorityFeePerGas?: string | undefined;
250
+ label: "normal" | "custom" | "high" | "economy" | "low";
251
+ blocks: number;
252
+ feePerUnit: string;
253
+ }[];
243
254
  shortcut: string;
244
255
  slip44: number;
245
256
  support: {
@@ -253,21 +264,11 @@ export declare const getCoinInfo: (currency: string) => Readonly<{
253
264
  connect: boolean;
254
265
  };
255
266
  decimals: number;
256
- defaultFees: {
257
- feePerTx?: string | undefined;
258
- feeLimit?: string | undefined;
259
- baseFeePerGas?: string | undefined;
260
- maxFeePerGas?: string | undefined;
261
- maxPriorityFeePerGas?: string | undefined;
262
- label: "normal" | "custom" | "high" | "economy" | "low";
263
- blocks: number;
264
- feePerUnit: string;
265
- }[];
266
267
  } & {
268
+ taproot?: boolean | undefined;
267
269
  cashAddrPrefix?: string | undefined;
268
270
  xPubMagicSegwitNative?: number | undefined;
269
271
  xPubMagicSegwit?: number | undefined;
270
- taproot?: boolean | undefined;
271
272
  type: "bitcoin";
272
273
  dustLimit: number;
273
274
  curveName: string;
@@ -308,11 +309,21 @@ export declare const getAllNetworks: () => (({
308
309
  url: string[];
309
310
  } | undefined;
310
311
  label: string;
312
+ name: string;
311
313
  blockTime: number;
312
314
  minFee: number;
313
315
  maxFee: number;
314
316
  minPriorityFee: number;
315
- name: string;
317
+ defaultFees: {
318
+ feePerTx?: string | undefined;
319
+ feeLimit?: string | undefined;
320
+ baseFeePerGas?: string | undefined;
321
+ maxFeePerGas?: string | undefined;
322
+ maxPriorityFeePerGas?: string | undefined;
323
+ label: "normal" | "custom" | "high" | "economy" | "low";
324
+ blocks: number;
325
+ feePerUnit: string;
326
+ }[];
316
327
  shortcut: string;
317
328
  slip44: number;
318
329
  support: {
@@ -326,21 +337,11 @@ export declare const getAllNetworks: () => (({
326
337
  connect: boolean;
327
338
  };
328
339
  decimals: number;
329
- defaultFees: {
330
- feePerTx?: string | undefined;
331
- feeLimit?: string | undefined;
332
- baseFeePerGas?: string | undefined;
333
- maxFeePerGas?: string | undefined;
334
- maxPriorityFeePerGas?: string | undefined;
335
- label: "normal" | "custom" | "high" | "economy" | "low";
336
- blocks: number;
337
- feePerUnit: string;
338
- }[];
339
340
  } & {
341
+ taproot?: boolean | undefined;
340
342
  cashAddrPrefix?: string | undefined;
341
343
  xPubMagicSegwitNative?: number | undefined;
342
344
  xPubMagicSegwit?: number | undefined;
343
- taproot?: boolean | undefined;
344
345
  type: "bitcoin";
345
346
  dustLimit: number;
346
347
  curveName: string;
@@ -371,11 +372,21 @@ export declare const getAllNetworks: () => (({
371
372
  url: string[];
372
373
  } | undefined;
373
374
  label: string;
375
+ name: string;
374
376
  blockTime: number;
375
377
  minFee: number;
376
378
  maxFee: number;
377
379
  minPriorityFee: number;
378
- name: string;
380
+ defaultFees: {
381
+ feePerTx?: string | undefined;
382
+ feeLimit?: string | undefined;
383
+ baseFeePerGas?: string | undefined;
384
+ maxFeePerGas?: string | undefined;
385
+ maxPriorityFeePerGas?: string | undefined;
386
+ label: "normal" | "custom" | "high" | "economy" | "low";
387
+ blocks: number;
388
+ feePerUnit: string;
389
+ }[];
379
390
  shortcut: string;
380
391
  slip44: number;
381
392
  support: {
@@ -389,16 +400,6 @@ export declare const getAllNetworks: () => (({
389
400
  connect: boolean;
390
401
  };
391
402
  decimals: number;
392
- defaultFees: {
393
- feePerTx?: string | undefined;
394
- feeLimit?: string | undefined;
395
- baseFeePerGas?: string | undefined;
396
- maxFeePerGas?: string | undefined;
397
- maxPriorityFeePerGas?: string | undefined;
398
- label: "normal" | "custom" | "high" | "economy" | "low";
399
- blocks: number;
400
- feePerUnit: string;
401
- }[];
402
403
  } & {
403
404
  network?: undefined;
404
405
  type: "ethereum";
@@ -409,11 +410,21 @@ export declare const getAllNetworks: () => (({
409
410
  url: string[];
410
411
  } | undefined;
411
412
  label: string;
413
+ name: string;
412
414
  blockTime: number;
413
415
  minFee: number;
414
416
  maxFee: number;
415
417
  minPriorityFee: number;
416
- name: string;
418
+ defaultFees: {
419
+ feePerTx?: string | undefined;
420
+ feeLimit?: string | undefined;
421
+ baseFeePerGas?: string | undefined;
422
+ maxFeePerGas?: string | undefined;
423
+ maxPriorityFeePerGas?: string | undefined;
424
+ label: "normal" | "custom" | "high" | "economy" | "low";
425
+ blocks: number;
426
+ feePerUnit: string;
427
+ }[];
417
428
  shortcut: string;
418
429
  slip44: number;
419
430
  support: {
@@ -427,16 +438,6 @@ export declare const getAllNetworks: () => (({
427
438
  connect: boolean;
428
439
  };
429
440
  decimals: number;
430
- defaultFees: {
431
- feePerTx?: string | undefined;
432
- feeLimit?: string | undefined;
433
- baseFeePerGas?: string | undefined;
434
- maxFeePerGas?: string | undefined;
435
- maxPriorityFeePerGas?: string | undefined;
436
- label: "normal" | "custom" | "high" | "economy" | "low";
437
- blocks: number;
438
- feePerUnit: string;
439
- }[];
440
441
  } & {
441
442
  network?: undefined;
442
443
  type: "nem" | "misc";
@@ -32,6 +32,14 @@ exports.config = {
32
32
  origin: 'nkbihfbeogaeaoehlefnkodbefgpgknn',
33
33
  label: 'MetaMask',
34
34
  },
35
+ {
36
+ origin: 'bfibaipbbpipfifeecgfehbpmfhdakgo',
37
+ label: 'Nightly DEV',
38
+ },
39
+ {
40
+ origin: 'fiikommddbeccaoicoejoniammnalkfa',
41
+ label: 'Nightly',
42
+ },
35
43
  {
36
44
  origin: 'bpcdaglidgnlggelgbjfagekoapjmccp',
37
45
  label: 'Rainbow DEV',
@@ -122,7 +130,7 @@ exports.config = {
122
130
  ],
123
131
  },
124
132
  {
125
- coin: ['eth', 'tsep', 'thol'],
133
+ coin: ['eth', 'tsep', 'thod'],
126
134
  min: { T1B1: '1.8.0', T2T1: '2.1.0' },
127
135
  comment: ['There were protobuf backwards incompatible changes.'],
128
136
  },
@@ -1,4 +1,4 @@
1
- import { FeeInfo, FeeLevel } from '../types';
1
+ import type { FeeInfo, FeeLevel } from '../types/fees';
2
2
  export declare const DEFAULT_BITCOIN_LONGTERM_FEE_RATE = "1";
3
3
  interface CoinsJsonData {
4
4
  shortcut: string;
@@ -6,7 +6,7 @@ const BLOCKS_FOR_FEE_LEVEL = {
6
6
  btc: {
7
7
  high: 1,
8
8
  normal: 3,
9
- economy: 12,
9
+ economy: 6,
10
10
  low: 36,
11
11
  },
12
12
  };
@@ -0,0 +1,3 @@
1
+ import { DeviceAuthenticityBlacklistConfig } from './deviceAuthenticityBlacklistConfig';
2
+ export declare const deviceAuthenticityBlacklist: DeviceAuthenticityBlacklistConfig;
3
+ //# sourceMappingURL=deviceAuthenticityBlacklist.d.ts.map
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deviceAuthenticityBlacklist = void 0;
4
+ exports.deviceAuthenticityBlacklist = {
5
+ version: 1,
6
+ blacklistedCaPubKeys: [],
7
+ debug: {
8
+ blacklistedCaPubKeys: [],
9
+ },
10
+ };
11
+ //# sourceMappingURL=deviceAuthenticityBlacklist.js.map
@@ -0,0 +1,11 @@
1
+ import { Static } from '@trezor/schema-utils';
2
+ export type DeviceAuthenticityBlacklistConfig = Static<typeof DeviceAuthenticityBlacklistConfig>;
3
+ export declare const DeviceAuthenticityBlacklistConfig: import("@trezor/schema-utils").TIntersect<[import("@trezor/schema-utils").TObject<{
4
+ blacklistedCaPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
5
+ }>, import("@trezor/schema-utils").TObject<{
6
+ version: import("@trezor/schema-utils").TNumber;
7
+ debug: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
8
+ blacklistedCaPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
9
+ }>>;
10
+ }>]>;
11
+ //# sourceMappingURL=deviceAuthenticityBlacklistConfig.d.ts.map
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeviceAuthenticityBlacklistConfig = void 0;
4
+ const schema_utils_1 = require("@trezor/schema-utils");
5
+ const CertPubKeysBlacklist = schema_utils_1.Type.Object({
6
+ blacklistedCaPubKeys: schema_utils_1.Type.Array(schema_utils_1.Type.String()),
7
+ });
8
+ exports.DeviceAuthenticityBlacklistConfig = schema_utils_1.Type.Intersect([
9
+ CertPubKeysBlacklist,
10
+ schema_utils_1.Type.Object({
11
+ version: schema_utils_1.Type.Number(),
12
+ debug: schema_utils_1.Type.Optional(CertPubKeysBlacklist),
13
+ }),
14
+ ]);
15
+ //# sourceMappingURL=deviceAuthenticityBlacklistConfig.js.map