@trezor/connect 9.4.0 → 9.4.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 +92 -4
  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
@@ -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
@@ -1,38 +1,38 @@
1
1
  import { Static } from '@trezor/schema-utils';
2
2
  export type DeviceAuthenticityConfig = Static<typeof DeviceAuthenticityConfig>;
3
- export declare const DeviceAuthenticityConfig: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
4
- T2B1: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
5
- rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
6
- caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
7
- }>, import("@sinclair/typebox").TObject<{
8
- debug: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
9
- rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
10
- caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
3
+ export declare const DeviceAuthenticityConfig: import("@sinclair/typebox/build/esm/index.mjs").TIntersect<[import("@sinclair/typebox/build/esm/index.mjs").TIntersect<[import("@trezor/schema-utils").TObject<{
4
+ T2B1: import("@sinclair/typebox/build/esm/index.mjs").TIntersect<[import("@trezor/schema-utils").TObject<{
5
+ rootPubKeys: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TString>;
6
+ caPubKeys: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TString>;
7
+ }>, import("@trezor/schema-utils").TObject<{
8
+ debug: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@trezor/schema-utils").TObject<{
9
+ rootPubKeys: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TString>;
10
+ caPubKeys: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TString>;
11
11
  }>>;
12
12
  }>]>;
13
- T3B1: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
14
- rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
15
- caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
16
- }>, import("@sinclair/typebox").TObject<{
17
- debug: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
18
- rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
19
- caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
13
+ T3B1: import("@sinclair/typebox/build/esm/index.mjs").TIntersect<[import("@trezor/schema-utils").TObject<{
14
+ rootPubKeys: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TString>;
15
+ caPubKeys: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TString>;
16
+ }>, import("@trezor/schema-utils").TObject<{
17
+ debug: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@trezor/schema-utils").TObject<{
18
+ rootPubKeys: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TString>;
19
+ caPubKeys: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TString>;
20
20
  }>>;
21
21
  }>]>;
22
- T3T1: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
23
- rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
24
- caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
25
- }>, import("@sinclair/typebox").TObject<{
26
- debug: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
27
- rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
28
- caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
22
+ T3T1: import("@sinclair/typebox/build/esm/index.mjs").TIntersect<[import("@trezor/schema-utils").TObject<{
23
+ rootPubKeys: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TString>;
24
+ caPubKeys: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TString>;
25
+ }>, import("@trezor/schema-utils").TObject<{
26
+ debug: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@trezor/schema-utils").TObject<{
27
+ rootPubKeys: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TString>;
28
+ caPubKeys: import("@sinclair/typebox/build/esm/index.mjs").TArray<import("@sinclair/typebox/build/esm/index.mjs").TString>;
29
29
  }>>;
30
30
  }>]>;
31
- }>, import("@sinclair/typebox").TObject<{
32
- T1B1: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
33
- T2T1: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
34
- }>]>, import("@sinclair/typebox").TObject<{
35
- version: import("@sinclair/typebox").TNumber;
36
- timestamp: import("@sinclair/typebox").TString;
31
+ }>, import("@trezor/schema-utils").TObject<{
32
+ T1B1: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TUndefined>;
33
+ T2T1: import("@sinclair/typebox/build/esm/index.mjs").TOptional<import("@sinclair/typebox/build/esm/index.mjs").TUndefined>;
34
+ }>]>, import("@trezor/schema-utils").TObject<{
35
+ version: import("@sinclair/typebox/build/esm/index.mjs").TNumber;
36
+ timestamp: import("@sinclair/typebox/build/esm/index.mjs").TString;
37
37
  }>]>;
38
38
  //# sourceMappingURL=deviceAuthenticityConfigTypes.d.ts.map
@@ -1,12 +1,12 @@
1
1
  import type { Features, FirmwareRelease, ReleaseInfo } from '../types';
2
2
  import { DeviceModelInternal } from '../types';
3
3
  export declare const parseFirmware: (json: any, deviceModel: DeviceModelInternal) => void;
4
+ export declare const getReleases: (deviceModel: DeviceModelInternal) => FirmwareRelease[];
4
5
  export interface GetInfoProps {
5
6
  features: Features;
6
7
  releases: FirmwareRelease[];
7
8
  }
8
9
  export declare const getInfo: ({ features, releases }: GetInfoProps) => ReleaseInfo | null;
9
- export declare const getFirmwareStatus: (features: Features) => "custom" | "valid" | "outdated" | "required" | "unknown" | "none";
10
+ export declare const getFirmwareStatus: (features: Features) => "valid" | "outdated" | "required" | "unknown" | "custom" | "none";
10
11
  export declare const getRelease: (features: Features) => ReleaseInfo | null;
11
- export declare const getReleases: (deviceModel: DeviceModelInternal) => FirmwareRelease[];
12
12
  //# sourceMappingURL=firmwareInfo.d.ts.map
@@ -1,19 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getReleases = exports.getRelease = exports.getFirmwareStatus = exports.getInfo = exports.parseFirmware = void 0;
3
+ exports.getRelease = exports.getFirmwareStatus = exports.getInfo = exports.getReleases = exports.parseFirmware = void 0;
4
4
  const utils_1 = require("@trezor/utils");
5
5
  const firmwareUtils_1 = require("../utils/firmwareUtils");
6
6
  const types_1 = require("../types");
7
7
  const releases = Object.values(types_1.DeviceModelInternal).reduce((acc, key) => ({ ...acc, [key]: [] }), {});
8
8
  const parseFirmware = (json, deviceModel) => {
9
9
  Object.keys(json).forEach(key => {
10
+ var _a;
10
11
  const release = json[key];
11
- releases[deviceModel].push({
12
+ (_a = releases[deviceModel]) === null || _a === void 0 ? void 0 : _a.push({
12
13
  ...release,
13
14
  });
14
15
  });
15
16
  };
16
17
  exports.parseFirmware = parseFirmware;
18
+ const getReleases = (deviceModel) => releases[deviceModel] || [];
19
+ exports.getReleases = getReleases;
17
20
  const getChangelog = (releases, features) => {
18
21
  if (features.bootloader_mode) {
19
22
  if (features.firmware_present && features.major_version === 1) {
@@ -91,7 +94,7 @@ const getSafeReleases = ({ features, releases }) => {
91
94
  return (0, firmwareUtils_1.filterSafeListByFirmware)(releases, firmwareVersion);
92
95
  };
93
96
  const getInfo = ({ features, releases }) => {
94
- if (!Array.isArray(releases)) {
97
+ if (!Array.isArray(releases) || releases.length < 1) {
95
98
  return null;
96
99
  }
97
100
  if (!(0, firmwareUtils_1.isStrictFeatures)(features)) {
@@ -130,7 +133,7 @@ const getFirmwareStatus = (features) => {
130
133
  }
131
134
  const info = (0, exports.getInfo)({
132
135
  features,
133
- releases: releases[features === null || features === void 0 ? void 0 : features.internal_model],
136
+ releases: (0, exports.getReleases)(features === null || features === void 0 ? void 0 : features.internal_model),
134
137
  });
135
138
  if (!info)
136
139
  return 'custom';
@@ -143,9 +146,7 @@ const getFirmwareStatus = (features) => {
143
146
  exports.getFirmwareStatus = getFirmwareStatus;
144
147
  const getRelease = (features) => (0, exports.getInfo)({
145
148
  features,
146
- releases: releases[features === null || features === void 0 ? void 0 : features.internal_model],
149
+ releases: (0, exports.getReleases)(features === null || features === void 0 ? void 0 : features.internal_model),
147
150
  });
148
151
  exports.getRelease = getRelease;
149
- const getReleases = (deviceModel) => releases[deviceModel];
150
- exports.getReleases = getReleases;
151
152
  //# sourceMappingURL=firmwareInfo.js.map
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.models = void 0;
4
- const t2b1 = {
4
+ const safe3Model = {
5
5
  name: 'Trezor Safe 3',
6
6
  colors: {
7
7
  '1': 'Cosmic Black',
@@ -20,8 +20,8 @@ exports.models = {
20
20
  name: 'Trezor Model T',
21
21
  colors: {},
22
22
  },
23
- T2B1: t2b1,
24
- T3B1: t2b1,
23
+ T2B1: safe3Model,
24
+ T3B1: safe3Model,
25
25
  T3T1: {
26
26
  name: 'Trezor Safe 5',
27
27
  colors: {
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "9.4.0";
1
+ export declare const VERSION = "9.4.1";
2
2
  export declare const DEFAULT_DOMAIN: string;
3
3
  export declare const CONTENT_SCRIPT_VERSION = 1;
4
4
  //# sourceMappingURL=version.d.ts.map
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CONTENT_SCRIPT_VERSION = exports.DEFAULT_DOMAIN = exports.VERSION = void 0;
4
- exports.VERSION = '9.4.0';
4
+ exports.VERSION = '9.4.1';
5
5
  const versionN = exports.VERSION.split('.').map(s => parseInt(s, 10));
6
6
  const isBeta = exports.VERSION.includes('beta');
7
7
  exports.DEFAULT_DOMAIN = isBeta
@@ -1,11 +1,11 @@
1
1
  import { Deferred, TypedEmitter } from '@trezor/utils';
2
- import { Session } from '@trezor/transport';
3
2
  import { TransportProtocol } from '@trezor/protocol';
4
3
  import { DeviceCommands, PassphrasePromptResponse } from './DeviceCommands';
5
4
  import { PROTO, NETWORK } from '../constants';
6
5
  import { DEVICE, DeviceButtonRequestPayload } from '../events';
7
6
  import { type Transport, type Descriptor } from '@trezor/transport';
8
- import { Device as DeviceTyped, DeviceFirmwareStatus, Features, ReleaseInfo, UnavailableCapabilities, FirmwareType, VersionArray, KnownDevice } from '../types';
7
+ import { Device as DeviceTyped, DeviceFirmwareStatus, DeviceState, Features, ReleaseInfo, UnavailableCapabilities, FirmwareType, VersionArray, KnownDevice } from '../types';
8
+ import { IStateStorage } from './StateStorage';
9
9
  export type RunOptions = {
10
10
  skipFinalReload?: boolean;
11
11
  waiting?: boolean;
@@ -23,7 +23,6 @@ export interface DeviceEvents {
23
23
  [DEVICE.PASSPHRASE_ON_DEVICE]: () => void;
24
24
  [DEVICE.BUTTON]: (device: Device, payload: DeviceButtonRequestPayload) => void;
25
25
  [DEVICE.ACQUIRED]: () => void;
26
- [DEVICE.SAVE_STATE]: (state: string) => void;
27
26
  }
28
27
  export declare class Device extends TypedEmitter<DeviceEvents> {
29
28
  transport: Transport;
@@ -34,18 +33,18 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
34
33
  firmwareRelease?: ReleaseInfo | null;
35
34
  features: Features;
36
35
  featuresNeedsReload: boolean;
37
- acquirePromise?: ReturnType<Transport['acquire']>;
38
- releasePromise?: ReturnType<Transport['release']>;
39
- runPromise?: Deferred<void>;
36
+ private acquirePromise?;
37
+ private releasePromise?;
38
+ private runPromise?;
39
+ private transportSession?;
40
+ keepTransportSession: boolean;
41
+ commands?: DeviceCommands;
40
42
  loaded: boolean;
41
43
  inconsistent: boolean;
42
44
  firstRunPromise: Deferred<boolean>;
43
- activitySessionID?: Session | null;
44
- commands?: DeviceCommands;
45
- keepSession: boolean;
46
45
  instance: number;
47
- internalState: string[];
48
- externalState: string[];
46
+ private state;
47
+ private stateStorage?;
49
48
  unavailableCapabilities: UnavailableCapabilities;
50
49
  networkTypeState: NETWORK.NetworkType[];
51
50
  firmwareType?: FirmwareType;
@@ -53,6 +52,7 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
53
52
  color?: string;
54
53
  availableTranslations: string[];
55
54
  authenticityChecks: NonNullable<KnownDevice['authenticityChecks']>;
55
+ private useCardanoDerivation;
56
56
  constructor(transport: Transport, descriptor: Descriptor);
57
57
  static fromDescriptor(transport: Transport, originalDescriptor: Descriptor): Device;
58
58
  static createUnacquired(transport: Transport, descriptor: Descriptor, unreadableError?: string): Device;
@@ -67,12 +67,11 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
67
67
  getCommands(): DeviceCommands;
68
68
  setInstance(instance?: number): void;
69
69
  getInstance(): number;
70
- setInternalState(state?: string): void;
71
- getInternalState(): string;
72
- setExternalState(state?: string): void;
73
- getExternalState(): string;
74
- validateState(preauthorized?: boolean): Promise<string | undefined>;
70
+ getState(): DeviceState | undefined;
71
+ setState(state?: Partial<DeviceState>): void;
72
+ validateState(preauthorized?: boolean): Promise<`${string}@${string}:${number}` | undefined>;
75
73
  initialize(useCardanoDerivation: boolean): Promise<void>;
74
+ initStorage(storage: IStateStorage): void;
76
75
  getFeatures(): Promise<void>;
77
76
  checkFirmwareRevision(): Promise<void>;
78
77
  changeLanguage({ language, binary, }: {
@@ -92,7 +91,7 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
92
91
  isInitialized(): boolean;
93
92
  isSeedless(): boolean;
94
93
  isInconsistent(): boolean;
95
- getVersion(): VersionArray | [];
94
+ getVersion(): VersionArray | undefined;
96
95
  atLeast(versions: string[] | string): boolean;
97
96
  isUsed(): boolean;
98
97
  isUsedHere(): boolean;
@@ -100,10 +99,44 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
100
99
  isRunning(): boolean;
101
100
  isLoaded(): boolean;
102
101
  waitForFirstRun(): Promise<boolean>;
103
- getDevicePath(): string;
102
+ getDevicePath(): `${number}`;
104
103
  isT1(): boolean;
105
104
  hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
106
- dispose(): Promise<import("@trezor/transport/lib/types").AbortableCall<void, "Network request failed" | "Wrong result type." | "device disconnected during action" | "unexpected error" | "Aborted by timeout" | "Aborted by signal" | "This transport can not be used in this environment" | "device not found" | "Unable to open device" | "wrong previous session" | "session not found"> | undefined>;
105
+ updateDescriptor(descriptor: Descriptor): void;
106
+ dispose(): Promise<{
107
+ success: false;
108
+ error: "Network request failed";
109
+ } | {
110
+ success: false;
111
+ error: "Wrong result type.";
112
+ } | {
113
+ success: false;
114
+ error: "device disconnected during action";
115
+ } | {
116
+ success: false;
117
+ error: "unexpected error";
118
+ } | {
119
+ success: false;
120
+ error: "session not found";
121
+ } | {
122
+ success: false;
123
+ error: "Aborted by timeout";
124
+ } | {
125
+ success: false;
126
+ error: "Aborted by signal";
127
+ } | {
128
+ success: false;
129
+ error: "This transport can not be used in this environment";
130
+ } | {
131
+ success: false;
132
+ error: "device not found";
133
+ } | {
134
+ success: false;
135
+ error: "Unable to open device";
136
+ } | {
137
+ success: false;
138
+ error: "wrong previous session";
139
+ } | import("@trezor/transport/lib/types").Success<void> | undefined>;
107
140
  getMode(): "normal" | "bootloader" | "initialize" | "seedless";
108
141
  toMessageObject(): DeviceTyped;
109
142
  legacyForceRelease(): Promise<void>;