@trezor/connect 9.4.3-beta.1 → 9.4.3-beta.2

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 (200) hide show
  1. package/CHANGELOG.md +43 -4
  2. package/README.md +1 -1
  3. package/lib/api/applyFlags.js +1 -1
  4. package/lib/api/applySettings.js +1 -1
  5. package/lib/api/authenticateDevice.js +1 -1
  6. package/lib/api/authorizeCoinjoin.js +1 -1
  7. package/lib/api/backupDevice.js +1 -1
  8. package/lib/api/binance/api/binanceGetAddress.js +2 -1
  9. package/lib/api/binance/api/binanceGetPublicKey.js +2 -1
  10. package/lib/api/binance/api/binanceSignTransaction.js +2 -1
  11. package/lib/api/binance/binanceSignTx.js +1 -1
  12. package/lib/api/bitcoin/Fees.js +2 -2
  13. package/lib/api/bitcoin/TransactionComposer.d.ts +3 -3
  14. package/lib/api/bitcoin/TransactionComposer.js +2 -2
  15. package/lib/api/bitcoin/refTx.js +1 -1
  16. package/lib/api/blockchainDisconnect.js +1 -1
  17. package/lib/api/blockchainEvmRpcCall.d.ts +16 -0
  18. package/lib/api/blockchainEvmRpcCall.js +45 -0
  19. package/lib/api/cancelCoinjoinAuthorization.js +1 -1
  20. package/lib/api/cardano/api/cardanoGetAddress.js +2 -1
  21. package/lib/api/cardano/api/cardanoGetNativeScriptHash.js +2 -1
  22. package/lib/api/cardano/api/cardanoGetPublicKey.js +2 -1
  23. package/lib/api/cardano/api/cardanoSignTransaction.js +2 -1
  24. package/lib/api/cardano/cardanoAddressParameters.js +1 -1
  25. package/lib/api/cardano/cardanoAuxiliaryData.js +1 -1
  26. package/lib/api/cardano/cardanoCertificate.js +1 -1
  27. package/lib/api/cardano/cardanoInputs.d.ts +8 -8
  28. package/lib/api/cardano/cardanoInputs.js +1 -1
  29. package/lib/api/cardano/cardanoOutputs.d.ts +22 -22
  30. package/lib/api/cardano/cardanoOutputs.js +1 -1
  31. package/lib/api/cardano/cardanoTokenBundle.d.ts +6 -6
  32. package/lib/api/cardano/cardanoTokenBundle.js +1 -1
  33. package/lib/api/changeLanguage.js +1 -1
  34. package/lib/api/changePin.js +1 -1
  35. package/lib/api/cipherKeyValue.js +1 -1
  36. package/lib/api/common/paramsValidator.js +1 -1
  37. package/lib/api/composeTransaction.d.ts +9 -3
  38. package/lib/api/composeTransaction.js +7 -4
  39. package/lib/api/eos/api/eosGetPublicKey.js +2 -1
  40. package/lib/api/eos/api/eosSignTransaction.js +2 -1
  41. package/lib/api/eos/eosSignTx.d.ts +3 -3
  42. package/lib/api/ethereum/api/ethereumGetAddress.js +2 -1
  43. package/lib/api/ethereum/api/ethereumGetPublicKey.js +2 -1
  44. package/lib/api/ethereum/api/ethereumSignMessage.d.ts +1 -1
  45. package/lib/api/ethereum/api/ethereumSignMessage.js +2 -1
  46. package/lib/api/ethereum/api/ethereumSignTransaction.d.ts +1 -1
  47. package/lib/api/ethereum/api/ethereumSignTransaction.js +13 -7
  48. package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +58 -57
  49. package/lib/api/ethereum/api/ethereumSignTypedData.js +3 -2
  50. package/lib/api/ethereum/api/ethereumVerifyMessage.js +2 -1
  51. package/lib/api/ethereum/ethereumDefinitions.d.ts +21 -21
  52. package/lib/api/ethereum/ethereumDefinitions.js +6 -5
  53. package/lib/api/firmware/getBinary.js +1 -1
  54. package/lib/api/firmware/x509certificate.js +3 -5
  55. package/lib/api/getAccountDescriptor.js +1 -1
  56. package/lib/api/getAddress.js +1 -1
  57. package/lib/api/getCoinInfo.d.ts +3 -0
  58. package/lib/api/getCoinInfo.js +1 -1
  59. package/lib/api/getFirmwareHash.js +1 -1
  60. package/lib/api/getOwnershipId.js +1 -1
  61. package/lib/api/getOwnershipProof.js +1 -1
  62. package/lib/api/getPublicKey.js +1 -1
  63. package/lib/api/index.d.ts +2 -1
  64. package/lib/api/index.js +5 -3
  65. package/lib/api/loadDevice.d.ts +14 -0
  66. package/lib/api/loadDevice.js +44 -0
  67. package/lib/api/nem/api/nemGetAddress.js +2 -1
  68. package/lib/api/nem/api/nemSignTransaction.js +2 -1
  69. package/lib/api/pushTransaction.js +1 -1
  70. package/lib/api/rebootToBootloader.js +1 -1
  71. package/lib/api/recoveryDevice.js +1 -1
  72. package/lib/api/requestLogin.js +1 -1
  73. package/lib/api/resetDevice.js +1 -1
  74. package/lib/api/ripple/api/rippleGetAddress.js +2 -1
  75. package/lib/api/ripple/api/rippleSignTransaction.js +2 -1
  76. package/lib/api/setBrightness.js +1 -1
  77. package/lib/api/setBusy.js +1 -1
  78. package/lib/api/signMessage.js +1 -1
  79. package/lib/api/solana/api/solanaGetAddress.js +2 -1
  80. package/lib/api/solana/api/solanaGetPublicKey.js +2 -1
  81. package/lib/api/solana/api/solanaSignTransaction.js +2 -1
  82. package/lib/api/stellar/api/stellarGetAddress.js +2 -1
  83. package/lib/api/stellar/api/stellarSignTransaction.js +2 -1
  84. package/lib/api/stellar/stellarSignTx.js +1 -1
  85. package/lib/api/tezos/api/tezosGetAddress.js +2 -1
  86. package/lib/api/tezos/api/tezosGetPublicKey.js +2 -1
  87. package/lib/api/tezos/api/tezosSignTransaction.js +2 -1
  88. package/lib/api/tezos/tezosSignTx.js +1 -1
  89. package/lib/api/unlockPath.js +1 -1
  90. package/lib/api/verifyMessage.js +1 -1
  91. package/lib/backend/Blockchain.d.ts +3 -0
  92. package/lib/backend/Blockchain.js +3 -0
  93. package/lib/constants/errors.d.ts +3 -0
  94. package/lib/constants/errors.js +3 -0
  95. package/lib/constants/index.d.ts +1 -0
  96. package/lib/constants/index.js +3 -1
  97. package/lib/constants/nem.d.ts +3 -3
  98. package/lib/constants/utxo.d.ts +3 -0
  99. package/lib/constants/utxo.js +5 -0
  100. package/lib/core/AbstractMethod.d.ts +13 -5
  101. package/lib/core/AbstractMethod.js +50 -24
  102. package/lib/core/index.js +41 -30
  103. package/lib/core/onCallFirmwareUpdate.d.ts +2 -2
  104. package/lib/core/onCallFirmwareUpdate.js +5 -5
  105. package/lib/data/DataManager.d.ts +0 -181
  106. package/lib/data/DataManager.js +40 -6
  107. package/lib/data/analyticsInfo.js +2 -1
  108. package/lib/data/coinInfo.d.ts +14 -0
  109. package/lib/data/config.d.ts +20 -22
  110. package/lib/data/config.js +15 -40
  111. package/lib/data/connectSettings.js +5 -4
  112. package/lib/data/deviceAuthenticityConfig.js +17 -0
  113. package/lib/data/deviceAuthenticityConfigTypes.d.ts +32 -23
  114. package/lib/data/firmwareInfo.d.ts +1 -1
  115. package/lib/data/models.d.ts +9 -0
  116. package/lib/data/models.js +9 -0
  117. package/lib/data/version.d.ts +1 -1
  118. package/lib/data/version.js +1 -1
  119. package/lib/device/Device.d.ts +143 -36
  120. package/lib/device/Device.js +226 -119
  121. package/lib/device/DeviceCommands.js +4 -4
  122. package/lib/device/DeviceList.d.ts +13 -21
  123. package/lib/device/DeviceList.js +54 -168
  124. package/lib/device/prompts.js +3 -2
  125. package/lib/device/resolveDescriptorForTaproot.d.ts +1 -1
  126. package/lib/events/call.d.ts +5 -5
  127. package/lib/events/call.js +2 -2
  128. package/lib/events/device.d.ts +0 -6
  129. package/lib/events/device.js +0 -6
  130. package/lib/events/transport.d.ts +1 -1
  131. package/lib/factory.d.ts +6 -6
  132. package/lib/factory.js +132 -136
  133. package/lib/impl/dynamic.d.ts +13 -19
  134. package/lib/impl/dynamic.js +0 -9
  135. package/lib/index-browser.d.ts +3 -1
  136. package/lib/index-browser.js +0 -3
  137. package/lib/index.d.ts +3 -1
  138. package/lib/index.js +1 -13
  139. package/lib/types/api/applySettings.d.ts +13 -13
  140. package/lib/types/api/authenticateDevice.d.ts +33 -24
  141. package/lib/types/api/authorizeCoinjoin.d.ts +10 -10
  142. package/lib/types/api/binance/index.d.ts +143 -143
  143. package/lib/types/api/binance/index.js +1 -1
  144. package/lib/types/api/bitcoin/index.d.ts +11 -11
  145. package/lib/types/api/bitcoin/index.js +1 -1
  146. package/lib/types/api/blockchainEvmRpcCall.d.ts +4 -0
  147. package/lib/types/api/{checkFirmwareAuthenticity.js → blockchainEvmRpcCall.js} +1 -1
  148. package/lib/types/api/cancelCoinjoinAuthorization.d.ts +1 -1
  149. package/lib/types/api/cardano/index.d.ts +507 -507
  150. package/lib/types/api/changeLanguage.d.ts +6 -6
  151. package/lib/types/api/cipherKeyValue.d.ts +8 -8
  152. package/lib/types/api/cipherKeyValue.js +1 -1
  153. package/lib/types/api/composeTransaction.d.ts +13 -7
  154. package/lib/types/api/eos/index.d.ts +525 -525
  155. package/lib/types/api/eos/index.js +1 -1
  156. package/lib/types/api/ethereum/index.d.ts +100 -100
  157. package/lib/types/api/firmwareUpdate.d.ts +5 -5
  158. package/lib/types/api/getAccountDescriptor.d.ts +4 -4
  159. package/lib/types/api/getAddress.d.ts +32 -32
  160. package/lib/types/api/getOwnershipId.d.ts +24 -24
  161. package/lib/types/api/getOwnershipProof.d.ts +28 -28
  162. package/lib/types/api/getPublicKey.d.ts +24 -24
  163. package/lib/types/api/getPublicKey.js +1 -1
  164. package/lib/types/api/index.d.ts +4 -8
  165. package/lib/types/api/init.d.ts +4 -2
  166. package/lib/types/api/loadDevice.d.ts +4 -0
  167. package/lib/types/api/loadDevice.js +3 -0
  168. package/lib/types/api/nem/index.d.ts +612 -612
  169. package/lib/types/api/nem/index.js +1 -1
  170. package/lib/types/api/nemGetAddress.d.ts +6 -6
  171. package/lib/types/api/pushTransaction.d.ts +3 -3
  172. package/lib/types/api/recoveryDevice.d.ts +9 -9
  173. package/lib/types/api/requestLogin.d.ts +25 -25
  174. package/lib/types/api/ripple/index.d.ts +21 -21
  175. package/lib/types/api/ripple/index.js +1 -1
  176. package/lib/types/api/solana/index.d.ts +23 -23
  177. package/lib/types/api/solana/index.js +1 -1
  178. package/lib/types/api/stellar/index.d.ts +582 -582
  179. package/lib/types/api/stellar/index.js +1 -1
  180. package/lib/types/api/tezos/index.d.ts +120 -120
  181. package/lib/types/api/tezos/index.js +1 -1
  182. package/lib/types/api/unlockPath.d.ts +2 -2
  183. package/lib/types/coinInfo.d.ts +231 -224
  184. package/lib/types/device.d.ts +13 -1
  185. package/lib/types/device.js +3 -1
  186. package/lib/types/fees.d.ts +19 -19
  187. package/lib/types/firmware.d.ts +1 -1
  188. package/lib/types/params.d.ts +21 -18
  189. package/lib/types/settings.d.ts +15 -9
  190. package/lib/types/utils.d.ts +1 -0
  191. package/lib/types/utils.js +3 -0
  192. package/lib/utils/addressUtils.js +2 -2
  193. package/lib/utils/assetUtils.js +3 -3
  194. package/lib/utils/deviceFeaturesUtils.js +1 -1
  195. package/lib/utils/uiPromiseManager.d.ts +2 -1
  196. package/lib/utils/uiPromiseManager.js +3 -3
  197. package/package.json +12 -12
  198. package/lib/api/checkFirmwareAuthenticity.d.ts +0 -11
  199. package/lib/api/checkFirmwareAuthenticity.js +0 -63
  200. package/lib/types/api/checkFirmwareAuthenticity.d.ts +0 -11
@@ -18,11 +18,6 @@ export declare const config: {
18
18
  onionDomains: {
19
19
  'trezor.io': string;
20
20
  };
21
- assets: {
22
- name: string;
23
- url: string;
24
- }[];
25
- messages: string;
26
21
  supportedBrowsers: {
27
22
  chrome: {
28
23
  version: number;
@@ -66,9 +61,8 @@ export declare const config: {
66
61
  min: {
67
62
  T1B1: string;
68
63
  T2T1: string;
69
- T2B1?: undefined;
70
- T3B1?: undefined;
71
64
  T3T1?: undefined;
65
+ T2B1?: undefined;
72
66
  };
73
67
  max: undefined;
74
68
  comment: string[];
@@ -78,9 +72,8 @@ export declare const config: {
78
72
  min: {
79
73
  T1B1: string;
80
74
  T2T1: string;
81
- T2B1?: undefined;
82
- T3B1?: undefined;
83
75
  T3T1?: undefined;
76
+ T2B1?: undefined;
84
77
  };
85
78
  comment: string[];
86
79
  methods?: undefined;
@@ -91,9 +84,8 @@ export declare const config: {
91
84
  min: {
92
85
  T1B1: string;
93
86
  T2T1: string;
94
- T2B1?: undefined;
95
- T3B1?: undefined;
96
87
  T3T1?: undefined;
88
+ T2B1?: undefined;
97
89
  };
98
90
  comment: string[];
99
91
  coin?: undefined;
@@ -104,9 +96,8 @@ export declare const config: {
104
96
  min: {
105
97
  T1B1: string;
106
98
  T2T1: string;
107
- T2B1?: undefined;
108
- T3B1?: undefined;
109
99
  T3T1?: undefined;
100
+ T2B1?: undefined;
110
101
  };
111
102
  comment: string[];
112
103
  coin?: undefined;
@@ -118,9 +109,8 @@ export declare const config: {
118
109
  min: {
119
110
  T1B1: string;
120
111
  T2T1: string;
121
- T2B1?: undefined;
122
- T3B1?: undefined;
123
112
  T3T1?: undefined;
113
+ T2B1?: undefined;
124
114
  };
125
115
  comment: string[];
126
116
  max?: undefined;
@@ -131,9 +121,8 @@ export declare const config: {
131
121
  min: {
132
122
  T1B1: string;
133
123
  T2T1: string;
134
- T2B1?: undefined;
135
- T3B1?: undefined;
136
124
  T3T1?: undefined;
125
+ T2B1?: undefined;
137
126
  };
138
127
  coin?: undefined;
139
128
  max?: undefined;
@@ -143,9 +132,8 @@ export declare const config: {
143
132
  min: {
144
133
  T1B1: string;
145
134
  T2T1: string;
146
- T2B1: string;
147
- T3B1: string;
148
135
  T3T1: string;
136
+ T2B1?: undefined;
149
137
  };
150
138
  coin?: undefined;
151
139
  max?: undefined;
@@ -156,8 +144,19 @@ export declare const config: {
156
144
  min: {
157
145
  T1B1: string;
158
146
  T2T1: string;
147
+ T3T1?: undefined;
159
148
  T2B1?: undefined;
160
- T3B1?: undefined;
149
+ };
150
+ coin?: undefined;
151
+ max?: undefined;
152
+ comment?: undefined;
153
+ capabilities?: undefined;
154
+ } | {
155
+ methods: string[];
156
+ min: {
157
+ T1B1: string;
158
+ T2T1: string;
159
+ T2B1: string;
161
160
  T3T1?: undefined;
162
161
  };
163
162
  coin?: undefined;
@@ -170,8 +169,7 @@ export declare const config: {
170
169
  T1B1: string;
171
170
  T2T1: string;
172
171
  T2B1: string;
173
- T3B1: string;
174
- T3T1: string;
172
+ T3T1?: undefined;
175
173
  };
176
174
  comment: string[];
177
175
  coin?: undefined;
@@ -66,41 +66,6 @@ exports.config = {
66
66
  onionDomains: {
67
67
  'trezor.io': 'trezoriovpjcahpzkrewelclulmszwbqpzmzgub37gbcjlvluxtruqad.onion',
68
68
  },
69
- assets: [
70
- {
71
- name: 'coins',
72
- url: './data/coins.json',
73
- },
74
- {
75
- name: 'coinsEth',
76
- url: './data/coins-eth.json',
77
- },
78
- {
79
- name: 'bridge',
80
- url: './data/bridge/releases.json',
81
- },
82
- {
83
- name: 'firmware-t1b1',
84
- url: './data/firmware/t1b1/releases.json',
85
- },
86
- {
87
- name: 'firmware-t2t1',
88
- url: './data/firmware/t2t1/releases.json',
89
- },
90
- {
91
- name: 'firmware-t2b1',
92
- url: './data/firmware/t2b1/releases.json',
93
- },
94
- {
95
- name: 'firmware-t3b1',
96
- url: './data/firmware/t3b1/releases.json',
97
- },
98
- {
99
- name: 'firmware-t3t1',
100
- url: './data/firmware/t3t1/releases.json',
101
- },
102
- ],
103
- messages: './data/messages/messages.json',
104
69
  supportedBrowsers: {
105
70
  chrome: {
106
71
  version: 59,
@@ -254,7 +219,11 @@ exports.config = {
254
219
  },
255
220
  {
256
221
  methods: ['showDeviceTutorial', 'authenticateDevice'],
257
- min: { T1B1: '0', T2T1: '0', T2B1: '2.6.1', T3B1: '2.8.1', T3T1: '2.8.0' },
222
+ min: {
223
+ T1B1: '0',
224
+ T2T1: '0',
225
+ T3T1: '2.8.0',
226
+ },
258
227
  },
259
228
  {
260
229
  methods: ['rebootToBootloader'],
@@ -266,11 +235,19 @@ exports.config = {
266
235
  },
267
236
  {
268
237
  methods: ['solanaGetPublicKey', 'solanaGetAddress', 'solanaSignTransaction'],
269
- min: { T1B1: '0', T2T1: '2.6.4', T2B1: '2.6.4', T3B1: '2.8.1', T3T1: '2.7.2' },
238
+ min: {
239
+ T1B1: '0',
240
+ T2T1: '2.6.4',
241
+ T2B1: '2.6.4',
242
+ },
270
243
  },
271
244
  {
272
245
  capabilities: ['chunkify'],
273
- min: { T1B1: '0', T2T1: '2.6.3', T2B1: '2.6.3', T3B1: '2.8.1', T3T1: '2.7.2' },
246
+ min: {
247
+ T1B1: '0',
248
+ T2T1: '2.6.3',
249
+ T2B1: '2.6.3',
250
+ },
274
251
  comment: [
275
252
  "Since firmware 2.6.3 there is a new protobuf field 'chunkify' in almost all getAddress and signTx methods",
276
253
  ],
@@ -281,8 +258,6 @@ exports.config = {
281
258
  T1B1: '0',
282
259
  T2T1: '2.7.0',
283
260
  T2B1: '2.7.0',
284
- T3B1: '2.8.1',
285
- T3T1: '2.7.2',
286
261
  },
287
262
  },
288
263
  ],
@@ -22,6 +22,7 @@ const initialSettings = {
22
22
  interactionTimeout: 600,
23
23
  sharedLogger: true,
24
24
  deeplinkUrl: `${version_1.DEFAULT_DOMAIN}deeplink/${version_1.DEEPLINK_VERSION}/`,
25
+ transportReconnect: true,
25
26
  };
26
27
  const parseManifest = (manifest) => {
27
28
  if (!manifest)
@@ -76,9 +77,6 @@ const parseConnectSettings = (input = {}) => {
76
77
  if (typeof input.transportReconnect === 'boolean') {
77
78
  settings.transportReconnect = input.transportReconnect;
78
79
  }
79
- if (typeof input.webusb === 'boolean') {
80
- settings.webusb = input.webusb;
81
- }
82
80
  if (Array.isArray(input.transports)) {
83
81
  settings.transports = input.transports;
84
82
  }
@@ -116,12 +114,15 @@ const parseConnectSettings = (input = {}) => {
116
114
  if (typeof input._extendWebextensionLifetime === 'boolean') {
117
115
  settings._extendWebextensionLifetime = input._extendWebextensionLifetime;
118
116
  }
119
- if (typeof input._sessionsBackgroundUrl === 'string') {
117
+ if (typeof input._sessionsBackgroundUrl === 'string' || input._sessionsBackgroundUrl === null) {
120
118
  settings._sessionsBackgroundUrl = input._sessionsBackgroundUrl;
121
119
  }
122
120
  if (typeof input.binFilesBaseUrl === 'string') {
123
121
  settings.binFilesBaseUrl = input.binFilesBaseUrl;
124
122
  }
123
+ if (typeof input.enableFirmwareHashCheck === 'boolean') {
124
+ settings.enableFirmwareHashCheck = Boolean(input.enableFirmwareHashCheck);
125
+ }
125
126
  return settings;
126
127
  };
127
128
  exports.parseConnectSettings = parseConnectSettings;
@@ -48,6 +48,12 @@ exports.deviceAuthenticityConfig = {
48
48
  '04c243743ba6326a443c34d503ea5d2d3036e1fbc8dbb072d4ae0f9b8016910db38e234641b87557fb44bcddee612722a67831bbac9758982a5843d9077be9434d',
49
49
  '04f1a32b84249a4b909974e32b33cc78aeef8144ef57744e792e6203fb8acce348f0d5d5535ed9a65ac741744a264de2073e49dbcd989819cddc90285b5e97a28a',
50
50
  '04894fa385d11809244da4f3d7de8ddd70c25abd5d4d3054b438d09016f2fd0a98729e15ea1483fbde83489fec6c64f8be014db8dc22227babcecdb5fd996ea671',
51
+ '0488c8f35649583d68c01c3b34223f11cc61389bcc71707960a6b1c30854ac1a0b5da916c47ee4cb1a78a9bac3d602aec67a5cd49b34732b6d1cc4fb2cb6b04361',
52
+ '04e4be5f15b528c594bfe732e4fcae4e65d63580051bb0235e6c1ca91c2663d54afa4b873dfeacbc4df98c57a923f7b308277f9d6bd064e81ed8e6890a1c582532',
53
+ '041c6ff76562b8042cf0e678d4bf977da09947d531e628450acbda0f0609c242c63db0be7fa1c601940af499b455e207c252706b37487c41fa9086621c3bd5c131',
54
+ '041b31c4fc213b27a34106e5ee8c7516941fdf8b15e3410987592ee488081c8dde5f42d397901c6d8b1d029d89bd2286b9183091a1edf12914be29aea40968d039',
55
+ '045de24c0d64b611bee13f34d74a3df7b24a658e6fea1bf1b9b3b530c23177759ba757e86494ff51c688bd63c1c85e93148bd81f39c5db80d3b5a0c05a6da4f380',
56
+ '049fb194cd0f7d79b3aae0b681d9f324c3dd086bb3f568067070bed195e1d7f0c722f86f7f9476da68b4c57e42536e5ab8c7fc74ee4726208814897849cac77b47',
51
57
  ],
52
58
  debug: {
53
59
  rootPubKeys: [
@@ -95,6 +101,9 @@ exports.deviceAuthenticityConfig = {
95
101
  '04b427eb0e1484b7127f82820edddbbb538c11d3c330b5f68acef96c8cf4601b30390311f2d48090f3f5c5e4bf56ca0396984797cd92ab0d12164600c9f43d2ba3',
96
102
  '0438e670e9eb3cd19f8579b3202caf9aa766c8d5735ab97bd3682155437499e062587bded86c732789345538581c83e9e42af0a15a4ad81bc42e1f28a7859ebce0',
97
103
  '04ac2a7e88ffc08186b3cb461966a96cacdb2c07b383018d708a6f0ce0b74f59dca97a6f31fc8d243a781c7fe5006dc6b8ef05347972082b32fb29c636c595ffbc',
104
+ '047c32e92dc23894b60b6c182f589a12e4e57f82e48176936f56646c14dd8f0d300fd4737e17501d71deb84127c272c5b797ccf30a7a4531846b9c79866f2892c6',
105
+ '046482d01c4dbdac60327352d150b5e6d5772cd68732616a0abc5649c49111bc3ba0eb28aa424100efa27cdb98675395df4b9097097e92adecc39f5587306a9fac',
106
+ '04f96a9fdecc4247c67e083a69037d1794230441270e4bda6d4151eb2e385d576d046d36734dd262e45c8cf3bbe24bdd11c1dc0e58437107d55cea3942f14b7d61',
98
107
  ],
99
108
  debug: {
100
109
  rootPubKeys: [
@@ -105,5 +114,13 @@ exports.deviceAuthenticityConfig = {
105
114
  ],
106
115
  },
107
116
  },
117
+ T3W1: {
118
+ rootPubKeys: ['you shall not pass'],
119
+ caPubKeys: ['you shall not pass'],
120
+ debug: {
121
+ rootPubKeys: ['you shall not pass'],
122
+ caPubKeys: ['you shall not pass'],
123
+ },
124
+ },
108
125
  };
109
126
  //# sourceMappingURL=deviceAuthenticityConfig.js.map
@@ -1,38 +1,47 @@
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("@trezor/schema-utils").TObject<{
4
- T2B1: import("@sinclair/typebox").TIntersect<[import("@trezor/schema-utils").TObject<{
5
- rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
6
- caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
3
+ export declare const DeviceAuthenticityConfig: import("@trezor/schema-utils").TIntersect<[import("@trezor/schema-utils").TIntersect<[import("@trezor/schema-utils").TObject<{
4
+ T2B1: import("@trezor/schema-utils").TIntersect<[import("@trezor/schema-utils").TObject<{
5
+ rootPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
6
+ caPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
7
7
  }>, import("@trezor/schema-utils").TObject<{
8
- debug: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils").TObject<{
9
- rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
10
- caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
8
+ debug: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
9
+ rootPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
10
+ caPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
11
11
  }>>;
12
12
  }>]>;
13
- T3B1: import("@sinclair/typebox").TIntersect<[import("@trezor/schema-utils").TObject<{
14
- rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
15
- caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
13
+ T3B1: import("@trezor/schema-utils").TIntersect<[import("@trezor/schema-utils").TObject<{
14
+ rootPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
15
+ caPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
16
16
  }>, import("@trezor/schema-utils").TObject<{
17
- debug: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils").TObject<{
18
- rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
19
- caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
17
+ debug: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
18
+ rootPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
19
+ caPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
20
20
  }>>;
21
21
  }>]>;
22
- T3T1: import("@sinclair/typebox").TIntersect<[import("@trezor/schema-utils").TObject<{
23
- rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
24
- caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
22
+ T3T1: import("@trezor/schema-utils").TIntersect<[import("@trezor/schema-utils").TObject<{
23
+ rootPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
24
+ caPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
25
25
  }>, import("@trezor/schema-utils").TObject<{
26
- debug: import("@sinclair/typebox").TOptional<import("@trezor/schema-utils").TObject<{
27
- rootPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
28
- caPubKeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
26
+ debug: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
27
+ rootPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
28
+ caPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
29
+ }>>;
30
+ }>]>;
31
+ T3W1: import("@trezor/schema-utils").TIntersect<[import("@trezor/schema-utils").TObject<{
32
+ rootPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
33
+ caPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
34
+ }>, import("@trezor/schema-utils").TObject<{
35
+ debug: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TObject<{
36
+ rootPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
37
+ caPubKeys: import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TString>;
29
38
  }>>;
30
39
  }>]>;
31
40
  }>, import("@trezor/schema-utils").TObject<{
32
- T1B1: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
33
- T2T1: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
41
+ T1B1: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TUndefined>;
42
+ T2T1: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TUndefined>;
34
43
  }>]>, import("@trezor/schema-utils").TObject<{
35
- version: import("@sinclair/typebox").TNumber;
36
- timestamp: import("@sinclair/typebox").TString;
44
+ version: import("@trezor/schema-utils").TNumber;
45
+ timestamp: import("@trezor/schema-utils").TString;
37
46
  }>]>;
38
47
  //# sourceMappingURL=deviceAuthenticityConfigTypes.d.ts.map
@@ -7,6 +7,6 @@ export interface GetInfoProps {
7
7
  releases: FirmwareRelease[];
8
8
  }
9
9
  export declare const getInfo: ({ features, releases }: GetInfoProps) => ReleaseInfo | null;
10
- export declare const getFirmwareStatus: (features: Features) => "valid" | "outdated" | "required" | "unknown" | "custom" | "none";
10
+ export declare const getFirmwareStatus: (features: Features) => "none" | "valid" | "outdated" | "required" | "unknown" | "custom";
11
11
  export declare const getRelease: (features: Features) => ReleaseInfo | null;
12
12
  //# sourceMappingURL=firmwareInfo.d.ts.map
@@ -36,5 +36,14 @@ export declare const models: {
36
36
  '4': string;
37
37
  };
38
38
  };
39
+ T3W1: {
40
+ name: string;
41
+ colors: {
42
+ '1': string;
43
+ '2': string;
44
+ '3': string;
45
+ '4': string;
46
+ };
47
+ };
39
48
  };
40
49
  //# sourceMappingURL=models.d.ts.map
@@ -31,5 +31,14 @@ exports.models = {
31
31
  '4': 'Bitcoin Orange',
32
32
  },
33
33
  },
34
+ T3W1: {
35
+ name: 'Trezor Safe 7',
36
+ colors: {
37
+ '1': 'Fantastic Ethereum',
38
+ '2': 'Lunatic Dogecoin',
39
+ '3': 'Galactic Litecoin',
40
+ '4': 'Majestic Bitcoin',
41
+ },
42
+ },
34
43
  };
35
44
  //# sourceMappingURL=models.js.map
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "9.4.3-beta.1";
1
+ export declare const VERSION = "9.4.3-beta.2";
2
2
  export declare const DEFAULT_DOMAIN: string;
3
3
  export declare const CONTENT_SCRIPT_VERSION = 1;
4
4
  export declare const DEEPLINK_VERSION = 1;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DEEPLINK_VERSION = exports.CONTENT_SCRIPT_VERSION = exports.DEFAULT_DOMAIN = exports.VERSION = void 0;
4
- exports.VERSION = '9.4.3-beta.1';
4
+ exports.VERSION = '9.4.3-beta.2';
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
- import { Deferred, TypedEmitter } from '@trezor/utils';
1
+ import { TypedEmitter } from '@trezor/utils';
2
2
  import { Session } from '@trezor/transport';
3
3
  import { TransportProtocol } from '@trezor/protocol';
4
+ import { type Transport, type Descriptor } from '@trezor/transport';
4
5
  import { DeviceCommands } from './DeviceCommands';
5
- import { PROTO, NETWORK } from '../constants';
6
+ import { PROTO } from '../constants';
6
7
  import { DEVICE, DeviceButtonRequestPayload, UiResponsePin, UiResponsePassphrase, UiResponseWord } from '../events';
7
- import { type Transport, type Descriptor } from '@trezor/transport';
8
- import { Device as DeviceTyped, DeviceFirmwareStatus, DeviceState, Features, ReleaseInfo, UnavailableCapabilities, FirmwareType, VersionArray, KnownDevice, FirmwareHashCheckResult } from '../types';
8
+ import { Device as DeviceTyped, DeviceFirmwareStatus, DeviceState, ReleaseInfo, UnavailableCapabilities, FirmwareType, VersionArray, FirmwareHashCheckResult, DeviceUniquePath } from '../types';
9
9
  import { IStateStorage } from './StateStorage';
10
10
  import type { PromptCallback } from './prompts';
11
11
  export type RunOptions = {
@@ -24,50 +24,155 @@ export interface DeviceEvents {
24
24
  [DEVICE.PASSPHRASE]: (device: Device, callback: PromptCallback<UiResponsePassphrase['payload']>) => void;
25
25
  [DEVICE.PASSPHRASE_ON_DEVICE]: () => void;
26
26
  [DEVICE.BUTTON]: (device: Device, payload: DeviceButtonRequestPayload) => void;
27
- [DEVICE.ACQUIRED]: () => void;
28
27
  }
29
- export declare class Device extends TypedEmitter<DeviceEvents> {
28
+ type DeviceLifecycle = typeof DEVICE.CONNECT | typeof DEVICE.CONNECT_UNACQUIRED | typeof DEVICE.DISCONNECT | typeof DEVICE.CHANGED;
29
+ type DeviceLifecycleListener = (lifecycle: DeviceLifecycle) => void;
30
+ type DeviceParams = {
31
+ id: DeviceUniquePath;
30
32
  transport: Transport;
31
- protocol: TransportProtocol;
32
- originalDescriptor: Descriptor;
33
- unreadableError?: string;
34
- firmwareStatus: DeviceFirmwareStatus;
35
- firmwareRelease?: ReleaseInfo | null;
36
- features: Features;
37
- featuresNeedsReload: boolean;
33
+ descriptor: Descriptor;
34
+ listener: DeviceLifecycleListener;
35
+ };
36
+ export declare class Device extends TypedEmitter<DeviceEvents> {
37
+ readonly transport: Transport;
38
+ readonly protocol: TransportProtocol;
39
+ private readonly transportPath;
40
+ private readonly transportSessionOwner;
41
+ private readonly transportDescriptorType;
42
+ private session;
43
+ private lastAcquiredHere;
44
+ private unreadableError?;
45
+ private _firmwareStatus;
46
+ get firmwareStatus(): DeviceFirmwareStatus;
47
+ private _firmwareRelease?;
48
+ get firmwareRelease(): ReleaseInfo | null | undefined;
49
+ private _features;
50
+ get features(): {
51
+ _passphrase_cached?: boolean | undefined;
52
+ busy?: boolean | undefined;
53
+ homescreen_format?: "Toif" | "Jpeg" | "ToiG" | undefined;
54
+ hide_passphrase_from_host?: boolean | undefined;
55
+ unit_color?: number | undefined;
56
+ unit_btconly?: boolean | undefined;
57
+ homescreen_width?: number | undefined;
58
+ homescreen_height?: number | undefined;
59
+ bootloader_locked?: boolean | undefined;
60
+ language_version_matches?: boolean | undefined;
61
+ unit_packaging?: number | undefined;
62
+ haptic_feedback?: boolean | undefined;
63
+ recovery_type?: "NormalRecovery" | "DryRun" | "UnlockRepeatedBackup" | undefined;
64
+ optiga_sec?: number | undefined;
65
+ vendor: string;
66
+ major_version: number;
67
+ minor_version: number;
68
+ patch_version: number;
69
+ bootloader_mode: boolean | null;
70
+ device_id: string | null;
71
+ pin_protection: boolean | null;
72
+ passphrase_protection: boolean | null;
73
+ language: string | null;
74
+ label: string | null;
75
+ initialized: boolean | null;
76
+ revision: string | null;
77
+ bootloader_hash: string | null;
78
+ imported: boolean | null;
79
+ unlocked: boolean | null;
80
+ firmware_present: boolean | null;
81
+ backup_availability: "NotAvailable" | "Required" | "Available" | null;
82
+ flags: number | null;
83
+ model: string;
84
+ fw_major: number | null;
85
+ fw_minor: number | null;
86
+ fw_patch: number | null;
87
+ fw_vendor: string | null;
88
+ unfinished_backup: boolean | null;
89
+ no_backup: boolean | null;
90
+ recovery_status: "Nothing" | "Recovery" | "Backup" | null;
91
+ capabilities: ("Capability_Bitcoin" | "Capability_Bitcoin_like" | "Capability_Binance" | "Capability_Cardano" | "Capability_Crypto" | "Capability_EOS" | "Capability_Ethereum" | "Capability_Lisk" | "Capability_Monero" | "Capability_NEM" | "Capability_Ripple" | "Capability_Stellar" | "Capability_Tezos" | "Capability_U2F" | "Capability_Shamir" | "Capability_ShamirGroups" | "Capability_PassphraseEntry" | "Capability_Solana" | "Capability_Translations" | "Capability_Brightness" | "Capability_Haptic")[];
92
+ backup_type: "Bip39" | "Slip39_Basic" | "Slip39_Advanced" | "Slip39_Single_Extendable" | "Slip39_Basic_Extendable" | "Slip39_Advanced_Extendable" | null;
93
+ sd_card_present: boolean | null;
94
+ sd_protection: boolean | null;
95
+ wipe_code_protection: boolean | null;
96
+ session_id: string | null;
97
+ passphrase_always_on_device: boolean | null;
98
+ safety_checks: "Strict" | "PromptAlways" | "PromptTemporarily" | null;
99
+ auto_lock_delay_ms: number | null;
100
+ display_rotation: number | null;
101
+ experimental_features: boolean | null;
102
+ internal_model: PROTO.DeviceModelInternal;
103
+ };
104
+ private _featuresNeedsReload;
38
105
  private acquirePromise?;
39
106
  private releasePromise?;
40
107
  private runPromise?;
41
- transportSession?: Session | null;
42
- keepTransportSession: boolean;
108
+ private keepTransportSession;
43
109
  commands?: DeviceCommands;
44
110
  private cancelableAction?;
45
- loaded: boolean;
46
- inconsistent: boolean;
47
- firstRunPromise: Deferred<boolean>;
48
- instance: number;
111
+ private loaded;
112
+ private inconsistent;
113
+ private firstRunPromise;
114
+ private instance;
49
115
  private state;
50
116
  private stateStorage?;
51
- unavailableCapabilities: UnavailableCapabilities;
52
- networkTypeState: NETWORK.NetworkType[];
53
- firmwareType?: FirmwareType;
54
- name: string;
55
- color?: string;
56
- availableTranslations: string[];
57
- authenticityChecks: NonNullable<KnownDevice['authenticityChecks']>;
58
- private useCardanoDerivation;
59
- constructor(transport: Transport, descriptor: Descriptor);
60
- static fromDescriptor(transport: Transport, originalDescriptor: Descriptor): Device;
61
- static createUnacquired(transport: Transport, descriptor: Descriptor, unreadableError?: string): Device;
62
- acquire(): Promise<void>;
63
- release(): Promise<void>;
117
+ private _unavailableCapabilities;
118
+ get unavailableCapabilities(): Readonly<UnavailableCapabilities>;
119
+ private _firmwareType?;
120
+ get firmwareType(): FirmwareType | undefined;
121
+ private name;
122
+ private color?;
123
+ private availableTranslations;
124
+ private authenticityChecks;
125
+ private readonly uniquePath;
126
+ private readonly emitLifecycle;
127
+ private sessionDfd?;
128
+ constructor({ id, transport, descriptor, listener }: DeviceParams);
129
+ private getSessionChangePromise;
130
+ private waitAndCompareSession;
131
+ acquire(): import("@trezor/transport/lib/types").AsyncResultWithTypedError<Session, "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" | "descriptor not found">;
132
+ release(): Promise<{
133
+ success: false;
134
+ error: "session not found";
135
+ } | {
136
+ success: false;
137
+ error: "Network request failed";
138
+ } | {
139
+ success: false;
140
+ error: "Wrong result type.";
141
+ } | {
142
+ success: false;
143
+ error: "device disconnected during action";
144
+ } | {
145
+ success: false;
146
+ error: "unexpected error";
147
+ } | {
148
+ success: false;
149
+ error: "Aborted by timeout";
150
+ } | {
151
+ success: false;
152
+ error: "Aborted by signal";
153
+ } | {
154
+ success: false;
155
+ error: "This transport can not be used in this environment";
156
+ } | {
157
+ success: false;
158
+ error: "device not found";
159
+ } | {
160
+ success: false;
161
+ error: "Unable to open device";
162
+ } | {
163
+ success: false;
164
+ error: "wrong previous session";
165
+ } | import("@trezor/transport/lib/types").Success<null> | undefined>;
166
+ releaseTransportSession(): void;
64
167
  cleanup(): Promise<void>;
168
+ handshake(delay?: number): Promise<void>;
169
+ updateDescriptor(descriptor: Descriptor): Promise<void>;
65
170
  run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
66
171
  override(error: Error): Promise<void>;
67
172
  setCancelableAction(callback: NonNullable<typeof this.cancelableAction>): void;
68
173
  clearCancelableAction(): void;
69
174
  interruptionFromUser(error: Error): Promise<void>;
70
- interruptionFromOutside(): void;
175
+ usedElsewhere(): void;
71
176
  _runInner<X>(fn: (() => Promise<X>) | undefined, options: RunOptions): Promise<void>;
72
177
  getCommands(): DeviceCommands;
73
178
  setInstance(instance?: number): void;
@@ -92,6 +197,7 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
92
197
  private _uploadTranslationData;
93
198
  private _updateFeatures;
94
199
  isUnacquired(): boolean;
200
+ isUnreadable(): boolean;
95
201
  disconnect(): Promise<void>;
96
202
  isBootloader(): boolean;
97
203
  isInitialized(): boolean;
@@ -105,10 +211,10 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
105
211
  isRunning(): boolean;
106
212
  isLoaded(): boolean;
107
213
  waitForFirstRun(): Promise<boolean>;
108
- getDevicePath(): import("@trezor/transport/lib/types").PathPublic;
214
+ getLocalSession(): Session | null;
215
+ getUniquePath(): DeviceUniquePath;
109
216
  isT1(): boolean;
110
217
  hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
111
- updateDescriptor(descriptor: Descriptor): void;
112
218
  dispose(): Promise<{
113
219
  success: false;
114
220
  error: "session not found";
@@ -142,8 +248,9 @@ export declare class Device extends TypedEmitter<DeviceEvents> {
142
248
  } | {
143
249
  success: false;
144
250
  error: "wrong previous session";
145
- } | import("@trezor/transport/lib/types").Success<void> | undefined>;
251
+ } | import("@trezor/transport/lib/types").Success<null> | undefined>;
146
252
  getMode(): "normal" | "bootloader" | "initialize" | "seedless";
147
253
  toMessageObject(): DeviceTyped;
148
254
  }
255
+ export {};
149
256
  //# sourceMappingURL=Device.d.ts.map