@metamask/snaps-controllers 0.32.2 → 0.33.1-flask.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 (47) hide show
  1. package/CHANGELOG.md +575 -0
  2. package/dist/services/{offscreen/OffscreenPostMessageStream.d.ts → ProxyPostMessageStream.d.ts} +9 -9
  3. package/dist/services/ProxyPostMessageStream.js +62 -0
  4. package/dist/services/ProxyPostMessageStream.js.map +1 -0
  5. package/dist/services/browser.d.ts +2 -0
  6. package/dist/services/browser.js +4 -0
  7. package/dist/services/browser.js.map +1 -1
  8. package/dist/services/index.d.ts +2 -0
  9. package/dist/services/index.js +4 -0
  10. package/dist/services/index.js.map +1 -1
  11. package/dist/services/offscreen/OffscreenExecutionService.d.ts +2 -2
  12. package/dist/services/offscreen/OffscreenExecutionService.js +8 -3
  13. package/dist/services/offscreen/OffscreenExecutionService.js.map +1 -1
  14. package/dist/services/offscreen/index.d.ts +0 -1
  15. package/dist/services/offscreen/index.js +0 -1
  16. package/dist/services/offscreen/index.js.map +1 -1
  17. package/dist/services/webworker/WebWorkerExecutionService.d.ts +44 -0
  18. package/dist/services/webworker/WebWorkerExecutionService.js +100 -0
  19. package/dist/services/webworker/WebWorkerExecutionService.js.map +1 -0
  20. package/dist/services/webworker/index.d.ts +1 -0
  21. package/dist/services/webworker/index.js +18 -0
  22. package/dist/services/webworker/index.js.map +1 -0
  23. package/dist/snaps/SnapController.d.ts +13 -3
  24. package/dist/snaps/SnapController.js +35 -23
  25. package/dist/snaps/SnapController.js.map +1 -1
  26. package/dist/snaps/endowments/cronjob.js +1 -0
  27. package/dist/snaps/endowments/cronjob.js.map +1 -1
  28. package/dist/snaps/endowments/ethereum-provider.js +1 -0
  29. package/dist/snaps/endowments/ethereum-provider.js.map +1 -1
  30. package/dist/snaps/endowments/index.d.ts +2 -0
  31. package/dist/snaps/endowments/keyring.d.ts +2 -1
  32. package/dist/snaps/endowments/keyring.js +1 -0
  33. package/dist/snaps/endowments/keyring.js.map +1 -1
  34. package/dist/snaps/endowments/long-running.js +1 -0
  35. package/dist/snaps/endowments/long-running.js.map +1 -1
  36. package/dist/snaps/endowments/network-access.js +1 -0
  37. package/dist/snaps/endowments/network-access.js.map +1 -1
  38. package/dist/snaps/endowments/rpc.d.ts +2 -1
  39. package/dist/snaps/endowments/rpc.js +1 -0
  40. package/dist/snaps/endowments/rpc.js.map +1 -1
  41. package/dist/snaps/endowments/transaction-insight.js +1 -0
  42. package/dist/snaps/endowments/transaction-insight.js.map +1 -1
  43. package/dist/snaps/endowments/web-assembly.js +1 -0
  44. package/dist/snaps/endowments/web-assembly.js.map +1 -1
  45. package/package.json +23 -23
  46. package/dist/services/offscreen/OffscreenPostMessageStream.js +0 -66
  47. package/dist/services/offscreen/OffscreenPostMessageStream.js.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,575 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.33.1-flask.1]
10
+ ### Fixed
11
+ - Skip subjects without the `wallet_snap` permission in `removeSnapFromSubject` ([#1388](https://github.com/MetaMask/snaps-monorepo/pull/1388))
12
+
13
+ ## [0.33.0-flask.1]
14
+ ### Changed
15
+ - Add subject type restrictions to snap-specific permissions ([#1366](https://github.com/MetaMask/snaps-monorepo/pull/1366))
16
+ - Add console endowment that prepends snap IDs to log output ([#1355](https://github.com/MetaMask/snaps-monorepo/pull/1355))
17
+ - Add `DisconnectOrigin` action ([#1329](https://github.com/MetaMask/snaps-monorepo/pull/1329))
18
+ - Add Web Worker support for snap execution ([#1320](https://github.com/MetaMask/snaps-monorepo/pull/1320))
19
+
20
+ ## [0.32.2]
21
+ ### Fixed
22
+ - Properly handle Promise in `JsonSnapsRegistry` signature verification ([#1317](https://github.com/MetaMask/snaps-monorepo/pull/1317))
23
+
24
+ ## [0.32.1]
25
+ ### Changed
26
+ - No changes this release.
27
+
28
+ ## [0.32.0]
29
+ ### Added
30
+ - Add verification of registry signature ([#1291](https://github.com/MetaMask/snaps-monorepo/pull/1291))
31
+ - Add types to result approvals ([#1288](https://github.com/MetaMask/snaps-monorepo/pull/1288))
32
+
33
+ ### Changed
34
+ - **BREAKING:** Convert registry to a caching controller ([#1305](https://github.com/MetaMask/snaps-monorepo/pull/1305))
35
+ - **BREAKING:** Require snaps to request at least one handler permission ([#1294](https://github.com/MetaMask/snaps-monorepo/pull/1294))
36
+ - Use side effects to install snaps via `wallet_snap` permission ([#1301](https://github.com/MetaMask/snaps-monorepo/pull/1301))
37
+
38
+ ### Fixed
39
+ - Fix a few issues with installation and updating ([#1308](https://github.com/MetaMask/snaps-monorepo/pull/1308))
40
+
41
+ ## [0.31.0]
42
+ ### Changed
43
+ - **BREAKING:** Target `ES2020` ([#1247](https://github.com/MetaMask/snaps-monorepo/pull/1247))
44
+ - **BREAKING:** Combine snap installation popups ([#1261](https://github.com/MetaMask/snaps-monorepo/pull/1261))
45
+ - Throw errors on failed `fetch` ([#1227](https://github.com/MetaMask/snaps-monorepo/pull/1227))
46
+ - Improve validation and sanitizing of snap IDs ([#1237](https://github.com/MetaMask/snaps-monorepo/pull/1237))
47
+
48
+ ### Fixed
49
+ - Fix smaller installation issues affecting local snaps ([#1248](https://github.com/MetaMask/snaps-monorepo/pull/1248))
50
+
51
+ ## [0.30.0]
52
+ ### Added
53
+ - Add WebAssembly permission ([#1185](https://github.com/MetaMask/snaps-monorepo/pull/1185))
54
+
55
+ ### Fixed
56
+ - Fix an issue with removing snaps ([#1194](https://github.com/MetaMask/snaps-monorepo/pull/1194))
57
+ - Previously, the `SnapController` was not requesting revocation of the `wallet_snap` permission from the `PermissionController` if an origin no longer had any permitted snaps, logic has been updated to account for this
58
+
59
+ ## [0.29.0]
60
+ ### Added
61
+ - Add method to get metadata from the Snaps registry ([#1173](https://github.com/MetaMask/snaps-monorepo/pull/1173))
62
+ - Set pre-fetch NPM tarball size limit ([#1169](https://github.com/MetaMask/snaps-monorepo/pull/1169))
63
+ - NPM packages now have a size limit of 250 MB
64
+
65
+ ### Changed
66
+ - **BREAKING:** Updated controllers to accomodate new `wallet_snap` permission ([#1182](https://github.com/MetaMask/snaps-monorepo/pull/1182))
67
+ - **BREAKING:** Change checksum calculation ([#1128](https://github.com/MetaMask/snaps-monorepo/pull/1128))
68
+ - The checksum has changed for all snaps, and needs to be updated
69
+
70
+ ## [0.28.0]
71
+ ### Added
72
+ - Add `endowment:long-running` deprecation warning ([#1126](https://github.com/MetaMask/snaps-monorepo/pull/1126))
73
+ - Add experimental offscreen execution environment ([#1082](https://github.com/MetaMask/snaps-monorepo/pull/1082))
74
+
75
+ ### Changed
76
+ - **BREAKING:** Add support for snap registries ([#1090](https://github.com/MetaMask/snaps-monorepo/pull/1090))
77
+ - This removes the `checkBlockList` constructor argument in favor of `registry`
78
+ - A registry implementation can be passed here, defaulting to a hosted JSON file
79
+ - Requiring a snap to be on the allowlist can be toggled with the feature flag `requireAllowlist`
80
+ - **BREAKING:** Disallow local snaps by default ([#1123](https://github.com/MetaMask/snaps-monorepo/pull/1123))
81
+ - They can be re-enabled by using the feature flag `allowLocalSnaps`
82
+ - Allow updating crashed snaps ([#1113](https://github.com/MetaMask/snaps-monorepo/pull/1113))
83
+ - Add safety measures for malicious tarballs ([#1116](https://github.com/MetaMask/snaps-monorepo/pull/1116))
84
+ - Make `installSnaps` throw on excluded permissions ([#1125](https://github.com/MetaMask/snaps-monorepo/pull/1125))
85
+
86
+ ### Removed
87
+ - **BREAKING:** Remove `WebSocket` endowment ([#1122](https://github.com/MetaMask/snaps-monorepo/pull/1122))
88
+
89
+ ## [0.27.1]
90
+ ### Changed
91
+ - No changes this release.
92
+
93
+ ## [0.27.0]
94
+ ### Changed
95
+ - **BREAKING:** Use SIP-6 algorithm for state encryption ([#1055](https://github.com/MetaMask/snaps-monorepo/pull/1055))
96
+ - This breaks all existing snaps that use `snap_manageState`
97
+
98
+ ## [0.26.2]
99
+ ### Changed
100
+ - No changes this release.
101
+
102
+ ## [0.26.1]
103
+ ### Fixed
104
+ - Fix some paths being wrongly normalized ([#1053](https://github.com/MetaMask/snaps-monorepo/pull/1053))
105
+ - Fix some issues with fetching snaps ([#1050](https://github.com/MetaMask/snaps-monorepo/pull/1050))
106
+
107
+ ## [0.26.0]
108
+ ### Changed
109
+ - **BREAKING:** Snap installation refactor ([#1023](https://github.com/MetaMask/snaps-monorepo/pull/1023))
110
+ - `wallet_requestSnaps` will now throw an error and roll back any changes made if installation of any snap fails
111
+
112
+ ### Fixed
113
+ - Fix an issue processing non-snap permissions ([#1044](https://github.com/MetaMask/snaps-monorepo/pull/1044))
114
+
115
+ ## [0.25.0]
116
+ ### Added
117
+ - **BREAKING:** Add JSON-RPC handler permission ([#905](https://github.com/MetaMask/snaps-monorepo/pull/905))
118
+ - Snaps are now required to request `endowment:rpc` to receive RPC requests.
119
+ - Add transaction origin caveat export ([#1010](https://github.com/MetaMask/snaps-monorepo/pull/1010))
120
+
121
+ ## [0.24.1]
122
+ ### Changed
123
+ - No changes this release.
124
+
125
+ ## [0.24.0]
126
+ ### Added
127
+ - Add transaction insight caveat for accessing transaction origin ([#902](https://github.com/MetaMask/snaps-monorepo/pull/902))
128
+
129
+ ### Changed
130
+ - **BREAKING:** Rename package to start with `snaps-` ([#937](https://github.com/MetaMask/snaps-monorepo/pull/937))
131
+ - **BREAKING:** Remove `wallet` global in favor of `snap` and `ethereum` ([#939](https://github.com/MetaMask/snaps-monorepo/pull/939))
132
+ - Add permission validation to `snap.manifest.json` ([#910](https://github.com/MetaMask/snaps-monorepo/pull/910))
133
+
134
+ ## [0.23.0]
135
+ ### Added
136
+ - Add snap cronjobs ([#651](https://github.com/MetaMask/snaps-monorepo/pull/651), [#890](https://github.com/MetaMask/snaps-monorepo/pull/890))
137
+
138
+ ### Changed
139
+ - **BREAKING:** Make `SnapController.add()` private ([#883](https://github.com/MetaMask/snaps-monorepo/pull/883))
140
+ - **BREAKING:** Stop including snap state in SnapController state ([#876](https://github.com/MetaMask/snaps-monorepo/pull/876))
141
+ - **BREAKING:** Stop including source code in SnapController state ([#861](https://github.com/MetaMask/snaps-monorepo/pull/861))
142
+ - Improve keyring endowment error messaging ([#884](https://github.com/MetaMask/snaps-monorepo/pull/884))
143
+ - Replace JSON schema validation with structs ([#862](https://github.com/MetaMask/snaps-monorepo/pull/862))
144
+
145
+ ## [0.22.3]
146
+ ### Changed
147
+ - No changes this release.
148
+
149
+ ## [0.22.2]
150
+ ### Fixed
151
+ - Fix an issue with installing snaps that request the `eth_accounts` permission ([#839](https://github.com/MetaMask/snaps-monorepo/pull/839))
152
+
153
+ ## [0.22.1]
154
+ ### Fixed
155
+ - Assert that multichain RPC methods are supported before usage ([#814](https://github.com/MetaMask/snaps-monorepo/pull/814))
156
+
157
+ ## [0.22.0]
158
+ ### Added
159
+ - Add Snap Keyring support ([#700](https://github.com/MetaMask/snaps-monorepo/pull/700), [#775](https://github.com/MetaMask/snaps-monorepo/pull/775), [#777](https://github.com/MetaMask/snaps-monorepo/pull/777), [#740](https://github.com/MetaMask/snaps-monorepo/pull/740))
160
+ - Add `endowment:keyring` permission
161
+ - Add `MultiChainController`
162
+
163
+ ### Changed
164
+ - **BREAKING:** Renamed `SnapController:getSnaps` to `SnapController:getPermittedSnaps` [#775](https://github.com/MetaMask/snaps-monorepo/pull/775)
165
+
166
+ ## [0.21.0]
167
+ ### Changed
168
+ - **BREAKING:** Add changes to support blocking snaps by shasum ([#767](https://github.com/MetaMask/snaps-monorepo/pull/767))
169
+ - **BREAKING:** Rework snap install logic ([#754](https://github.com/MetaMask/snaps-monorepo/pull/754))
170
+ - Stop including `installing` snaps in `wallet_getSnaps` ([#765](https://github.com/MetaMask/snaps-monorepo/pull/765))
171
+
172
+ ### Fixed
173
+ - Process snap permissions before snap update ([#753](https://github.com/MetaMask/snaps-monorepo/pull/753))
174
+ - Only pause running timers ([#725](https://github.com/MetaMask/snaps-monorepo/pull/725))
175
+
176
+ ## [0.20.0]
177
+ ### Added
178
+ - **BREAKING:** Add Transaction Insight API ([#642](https://github.com/MetaMask/snaps-monorepo/pull/642))
179
+ - This feature required changes to the RPC request handling functionality, hence the breaking change
180
+ - Register missing actions ([#659](https://github.com/MetaMask/snaps-monorepo/pull/659))
181
+ - All APIs accessed outside the SnapController are now registered as actions in the messaging system
182
+
183
+ ### Changed
184
+ - **BREAKING:** Simplify manifest format for permission caveats ([#705](https://github.com/MetaMask/snaps-monorepo/pull/705))
185
+ - Reduce TypeScript compilation target for `snap-controllers` ([#708](https://github.com/MetaMask/snaps-monorepo/pull/708))
186
+ - Move all internal types from `@metamask/snaps-types` to `@metamask/snaps-utils` ([#695](https://github.com/MetaMask/snaps-monorepo/pull/695))
187
+
188
+ ### Removed
189
+ - **BREAKING:** Removed ExternalResourceController ([#701](https://github.com/MetaMask/snaps-monorepo/pull/701))
190
+
191
+ ## [0.19.1]
192
+ ### Changed
193
+ - No changes this release.
194
+
195
+ ## [0.19.0]
196
+ ### Fixed
197
+ - Fixed update snap approval missing metadata ([#673](https://github.com/MetaMask/snaps-monorepo/pull/673))
198
+ - Fixed executors sending malformed JSON-RPC notifications ([#639](https://github.com/MetaMask/snaps-monorepo/pull/639))
199
+
200
+ ## [0.18.1]
201
+ ### Changed
202
+ - No changes this release.
203
+
204
+ ## [0.18.0]
205
+ ### Changed
206
+ - Reduce TypeScript compilation target to ES2017 ([#628](https://github.com/MetaMask/snaps-monorepo/pull/628))
207
+ - **BREAKING:** Add browser entrypoint for execution services ([#629](https://github.com/MetaMask/snaps-monorepo/pull/629))
208
+ - Node.js execution services are now omitted in browser environments
209
+
210
+ ## [0.17.0]
211
+ ### Added
212
+ - Add snap blocklist functionality ([#597](https://github.com/MetaMask/snaps-monorepo/pull/597))
213
+ - Add Node.js `worker_threads` execution environment ([#587](https://github.com/MetaMask/snaps-monorepo/pull/587))
214
+ - Add Node.js `child_process` execution environment ([#523](https://github.com/MetaMask/snaps-monorepo/pull/523))
215
+ - Added network endowment teardown ([#514](https://github.com/MetaMask/snaps-monorepo/pull/514))
216
+
217
+ ### Changed
218
+ - **BREAKING:** Bump minimum Node version to 16 ([#601](https://github.com/MetaMask/snaps-monorepo/pull/601))
219
+ - **BREAKING:** Remove ExecutionService actions from constructor arguments ([#486](https://github.com/MetaMask/snaps-monorepo/pull/486))
220
+ - **BREAKING:** Emit appropriate snap objects for SnapController events ([#608](https://github.com/MetaMask/snaps-monorepo/pull/608))
221
+ - **BREAKING:** Replace `getRpcMessageHandler` action with `handleRpcRequest` ([#497](https://github.com/MetaMask/snaps-monorepo/pull/497), [#557](https://github.com/MetaMask/snaps-monorepo/pull/557))
222
+ - Monitor outbound snap requests to pause request timeout ([#593](https://github.com/MetaMask/snaps-monorepo/pull/593))
223
+ - Change Update Snap `requestData` ([#614](https://github.com/MetaMask/snaps-monorepo/pull/614))
224
+
225
+ ### Removed
226
+ - Remove WebWorker implementation ([#591](https://github.com/MetaMask/snaps-monorepo/pull/591))
227
+
228
+ ## [0.16.0]
229
+ ### Added
230
+ - **BREAKING:** Encrypt Snap state by default ([#369](https://github.com/MetaMask/snaps-monorepo/pull/369))
231
+ - Breaks existing installed snaps that use `snap_manageState`. All such Snaps must be reinstalled.
232
+
233
+ ### Changed
234
+ - **BREAKING:** Snaps are now required to export `onRpcRequest` to receive RPC requests ([#481](https://github.com/MetaMask/snaps-monorepo/pull/481), [#533](https://github.com/MetaMask/snaps-monorepo/pull/533), [#538](https://github.com/MetaMask/snaps-monorepo/pull/538))
235
+ - The type of the function is available in `@metamask/snaps-types` as `OnRpcRequestHandler`.
236
+ - Snaps can no longer run timers outside of pending RPC requests ([#490](https://github.com/MetaMask/snaps-monorepo/pull/490))
237
+
238
+ ### Fixed
239
+ - Allow version matching with prerelease versions ([#508](https://github.com/MetaMask/snaps-monorepo/pull/508))
240
+ - Fix issue with iframe error reporting ([#501](https://github.com/MetaMask/snaps-monorepo/pull/501))
241
+ - Fix an issue with file paths with leading `./` in npm snap manifests ([#537](https://github.com/MetaMask/snaps-monorepo/pull/537))
242
+
243
+ ## [0.15.0]
244
+ ### Fixed
245
+ - Fix an issue with detecting iframe execution environment load ([#464](https://github.com/MetaMask/snaps-monorepo/pull/464))
246
+
247
+ ## [0.14.0]
248
+ ### Changed
249
+ - **BREAKING:** Increase TypeScript compilation target to ES2020 ([#449](https://github.com/MetaMask/snaps-monorepo/pull/449))
250
+ - This should not be breaking for consumers on any non-deprecated browser or Node.js version.
251
+
252
+ ## [0.13.0]
253
+ ### Added
254
+ - Add long-running endowment permission ([#386](https://github.com/MetaMask/snaps-monorepo/pull/386))
255
+ - Add `network-access` endowment from `controllers` ([#439](https://github.com/MetaMask/snaps-monorepo/pull/439))
256
+
257
+ ### Changed
258
+ - **BREAKING:** Rename SnapController constructor argument ([#435](https://github.com/MetaMask/snaps-monorepo/pull/435))
259
+
260
+ ## [0.12.0]
261
+ ### Added
262
+ - Add support for endowment teardown ([#407](https://github.com/MetaMask/snaps-monorepo/pull/407))
263
+ - Emit `snapTerminated` event ([#406](https://github.com/MetaMask/snaps-monorepo/pull/406))
264
+ - Add `IframeExecutionService` previously published via `@metamask/iframe-execution-environment-service` ([#415](https://github.com/MetaMask/snaps-monorepo/pull/415))
265
+
266
+ ### Removed
267
+ - Remove `_createWindowTimeout` ([#404](https://github.com/MetaMask/snaps-monorepo/pull/404))
268
+ - Remove unresponsive timeout ([#395](https://github.com/MetaMask/snaps-monorepo/pull/395))
269
+
270
+ ### Fixed
271
+ - Correctly categorize ungracefully terminated snaps as crashed ([#427](https://github.com/MetaMask/snaps-monorepo/pull/427))
272
+
273
+ ## [0.11.1]
274
+ ### Changed
275
+ - Always bind `fetch` by default ([#402](https://github.com/MetaMask/snaps-monorepo/pull/402))
276
+
277
+ ## [0.11.0]
278
+ ### Added
279
+ - Add clearSnapState ([#346](https://github.com/MetaMask/snaps-monorepo/pull/346))
280
+
281
+ ### Changed
282
+ - Robustify snap startup procedure and iframe error handling ([#379](https://github.com/MetaMask/snaps-monorepo/pull/379))
283
+ - Added ability to update snaps when installing them ([#322](https://github.com/MetaMask/snaps-monorepo/pull/322))
284
+ - **BREAKING:** Use PermissionController:revokePermissionForAllSubjects ([#351](https://github.com/MetaMask/snaps-monorepo/pull/351))
285
+ - Changed console.logs to console.info ([#361](https://github.com/MetaMask/snaps-monorepo/pull/361))
286
+ - Upgraded TypeScript version to minimum 4.4 ([#360](https://github.com/MetaMask/snaps-monorepo/pull/360))
287
+ - Remove cross-fetch ([#349](https://github.com/MetaMask/snaps-monorepo/pull/349))
288
+
289
+ ### Fixed
290
+ - Fix idle timeout implementation ([#385](https://github.com/MetaMask/snaps-monorepo/pull/385))
291
+
292
+ ## [0.10.7]
293
+ ### Added
294
+ - Add version history information ([#317](https://github.com/MetaMask/snaps-monorepo/pull/317))
295
+ - Add setInterval and clearInterval as default endowments ([#326](https://github.com/MetaMask/snaps-monorepo/pull/326))
296
+ - Add queue for RPC requests to starting snaps ([#288](https://github.com/MetaMask/snaps-monorepo/pull/288))
297
+ - This improves the experience of invoking a starting snap, waiting for the snap to be ready instead of throwing an error.
298
+
299
+ ### Changed
300
+ - **BREAKING:** Bump minimum Node version from 12 to 14 ([#331](https://github.com/MetaMask/snaps-monorepo/pull/331))
301
+
302
+ ## [0.10.6]
303
+ ### Fixed
304
+ - Fix ID validation during Snap installation ([#308](https://github.com/MetaMask/snaps-monorepo/pull/308))
305
+
306
+ ## [0.10.5]
307
+ ### Added
308
+ - Add updateSnap function to SnapController ([#259](https://github.com/MetaMask/snaps-monorepo/pull/259))
309
+
310
+ ### Fixed
311
+ - Fix issue where installation errors were repeatedly thrown ([#301](https://github.com/MetaMask/snaps-monorepo/pull/301))
312
+ - Fix snap crash handling ([#298](https://github.com/MetaMask/snaps-monorepo/pull/298))
313
+
314
+ ## [0.10.3]
315
+ ### Changed
316
+ - Always reinstall local snaps ([#289](https://github.com/MetaMask/snaps-monorepo/pull/289))
317
+
318
+ ## [0.10.2]
319
+ ### Fixed
320
+ - Installation failure ([#279](https://github.com/MetaMask/snaps-monorepo/pull/279))
321
+ - A faulty installation script in a dependency caused the installation of this package to fail.
322
+
323
+ ## [0.10.1]
324
+ ### Changed
325
+ - Populate `jsonrpc` field in Snap RPC requests ([#273](https://github.com/MetaMask/snaps-monorepo/pull/273))
326
+
327
+ ### Fixed
328
+ - Various bugs ([#275](https://github.com/MetaMask/snaps-monorepo/pull/275))
329
+ - Snap fetching during installation.
330
+ - Snap removal when cancelling a Snap installation request.
331
+
332
+ ## [0.10.0]
333
+ ### Added
334
+ - Allow specifying a version range when installing snap ([#250](https://github.com/MetaMask/snaps-monorepo/pull/250))
335
+ - Add more safe default endowments to snaps ([#252](https://github.com/MetaMask/snaps-monorepo/pull/252))
336
+
337
+ ### Changed
338
+ - **BREAKING:** Specify all endowments in the `SnapController` ([#252](https://github.com/MetaMask/snaps-monorepo/pull/252)), ([#266](https://github.com/MetaMask/snaps-monorepo/pull/266))
339
+ - Previously, default endowments were specified in the execution environment. Now, default endowments are specified in the `SnapController`, and the execution environment will only add endowments specified by the execution command, except for the `wallet` API object.
340
+ - Disable caching when fetching local snaps ([#227](https://github.com/MetaMask/snaps-monorepo/pull/227))
341
+ - This ensures that the `SnapController` will always fetch the latest snap manifest and source code during local development.
342
+
343
+ ### Removed
344
+ - **BREAKING:** Remove the `PermissionController` and `SubjectMetadataController` ([#261](https://github.com/MetaMask/snaps-monorepo/pull/261))
345
+ - They are part of the [`@metamask/controllers`](https://npmjs.com/package/@metamask/controllers) as of version [26.0.0](https://github.com/MetaMask/controllers/releases/tag/v26.0.0) of that package.
346
+
347
+ ### Fixed
348
+ - Prevent useless errors from being thrown when a snap is removed ([#215](https://github.com/MetaMask/snaps-monorepo/pull/215))
349
+
350
+ ## [0.9.0]
351
+ ### Added
352
+ - Make `SnapController` npm registry configurable ([#200](https://github.com/MetaMask/snaps-monorepo/pull/200))
353
+
354
+ ### Changed
355
+ - **BREAKING:** Return `null` from `SnapController.getSnapState` if the snap has no state ([#203](https://github.com/MetaMask/snaps-monorepo/pull/203))
356
+ - Previously it would return `undefined` in this case.
357
+ - `@metamask/controllers@^25.1.0` ([#207](https://github.com/MetaMask/snaps-monorepo/pull/207))
358
+
359
+ ## [0.8.1]
360
+ ### Added
361
+ - A variety of `SnapController` actions ([#199](https://github.com/MetaMask/snaps-monorepo/pull/199))
362
+
363
+ ## [0.8.0]
364
+ ### Added
365
+ - Expose more `PermissionController` functionality via actions ([#194](https://github.com/MetaMask/snaps-monorepo/pull/194))
366
+
367
+ ### Changed
368
+ - **BREAKING:** Replace `PermissionController` functions with actions in `SnapController` ([#194](https://github.com/MetaMask/snaps-monorepo/pull/194))
369
+
370
+ ## [0.7.0]
371
+ ### Changed
372
+ - **BREAKING:** Rename execution environment service class and events ([#188](https://github.com/MetaMask/snaps-monorepo/pull/188))
373
+ - `ServiceMessenger` events are now named `ExecutionService`.
374
+ - `WebWorkerExecutionEnvironmentService` is now named `WebWorkerExecutionService`.
375
+
376
+ ## [0.6.3]
377
+ ### Fixed
378
+ - Prevent `disableSnap` from throwing if the specified Snap is stopped ([#175](https://github.com/MetaMask/snaps-monorepo/pull/175))
379
+
380
+ ## [0.6.2]
381
+ ### Changed
382
+ - **BREAKING:** Rename endowment permission builder exports ([#171](https://github.com/MetaMask/snaps-monorepo/pull/171))
383
+
384
+ ### Removed
385
+ - **BREAKING:** Remove the `svgIcon` property from Snap state ([#172](https://github.com/MetaMask/snaps-monorepo/pull/172))
386
+ - The SVG icon content string is instead emitted with the `SnapController:snapAdded` event.
387
+
388
+ ## [0.6.1]
389
+ ### Changed
390
+ - No changes this release.
391
+
392
+ ## [0.6.0]
393
+ ### Added
394
+ - "Endowment" permissions ([#152](https://github.com/MetaMask/snaps-monorepo/pull/152))
395
+ - `SnapController` endowment permissions support ([#155](https://github.com/MetaMask/snaps-monorepo/pull/155))
396
+ - Network access endowment permission ([#154](https://github.com/MetaMask/snaps-monorepo/pull/154))
397
+ - Snap installation events ([#162](https://github.com/MetaMask/snaps-monorepo/pull/162))
398
+
399
+ ### Changed
400
+ - **BREAKING:** Refactor `SnapController` to support the new Snaps publishing specification ([#140](https://github.com/MetaMask/snaps-monorepo/pull/140), [#157](https://github.com/MetaMask/snaps-monorepo/pull/157), [#163](https://github.com/MetaMask/snaps-monorepo/pull/163))
401
+ - This introduces several breaking changes to how Snaps are developed, hosted, and represented at runtime. See [the specification](https://github.com/MetaMask/specifications/blob/d4a5bf5d6990bb5b02a98bd3f95a24ffb28c701c/snaps/publishing.md) and the referenced pull requests for details.
402
+ - **BREAKING:** Rename Snap `name` property to `id` ([#147](https://github.com/MetaMask/snaps-monorepo/pull/147))
403
+ - **BREAKING:** Introduce the required `permissionType` field to `PermissionController` permission specifications ([#152](https://github.com/MetaMask/snaps-monorepo/pull/152))
404
+ - Make `SubjectMetadataController` subject metadata `name` optional ([#151](https://github.com/MetaMask/snaps-monorepo/pull/151))
405
+
406
+ ### Removed
407
+ - **BREAKING:** Inline snap functionality ([#148](https://github.com/MetaMask/snaps-monorepo/pull/148))
408
+
409
+ ## [0.5.0]
410
+ ### Changed
411
+ - **BREAKING:** Update restricted RPC methods per new `PermissionController` ([#143](https://github.com/MetaMask/snaps-monorepo/pull/143))
412
+ - **BREAKING:** Convert all TypeScript `interface` declarations to `type` equivalents ([#143](https://github.com/MetaMask/snaps-monorepo/pull/143))
413
+ - Bump `@metamask/obs-store` to `7.0.0` ([#144](https://github.com/MetaMask/snaps-monorepo/pull/144))
414
+
415
+ ## [0.4.0]
416
+ ### Added
417
+ - `SubjectMetadataController` ([#61](https://github.com/MetaMask/snaps-monorepo/pull/61))
418
+ - `PermissionController` ([#132](https://github.com/MetaMask/snaps-monorepo/pull/132), [#141](https://github.com/MetaMask/snaps-monorepo/pull/141))
419
+ - **BREAKING:** `SnapController`: Add max request processing time ([#128](https://github.com/MetaMask/snaps-monorepo/pull/128))
420
+
421
+ ### Fixed
422
+ - `SnapController`: Clean up timeouts after stopping a Snap ([#139](https://github.com/MetaMask/snaps-monorepo/pull/139))
423
+ - `WebWorkerExecutionEnvironmentService`: Clean up post-termination timeouts ([#128](https://github.com/MetaMask/snaps-monorepo/pull/128))
424
+
425
+ ## [0.3.1]
426
+ ### Changed
427
+ - **BREAKING:** Update Snap initial states ([#126](https://github.com/MetaMask/snaps-monorepo/pull/126))
428
+ - The `idle` status is now named `installing`, and rehydrated snaps will have the status `stopped`.
429
+
430
+ ### Fixed
431
+ - Fix Snap execution and installation bugs ([#125](https://github.com/MetaMask/snaps-monorepo/pull/125))
432
+ - Prevent Snaps from being started before installation is finished ([#124](https://github.com/MetaMask/snaps-monorepo/pull/124))
433
+ - Correctly identify breaking changes in [0.3.0] release ([#123](https://github.com/MetaMask/snaps-monorepo/pull/123))
434
+
435
+ ## [0.3.0]
436
+ ### Added
437
+ - Allow disabling and enabling Snaps ([#116](https://github.com/MetaMask/snaps-monorepo/pull/116))
438
+ - Only enabled Snaps can be started.
439
+ - Start stopped Snaps that receive an RPC message ([#114](https://github.com/MetaMask/snaps-monorepo/pull/114))
440
+ - Add Snap max idle time ([#105](https://github.com/MetaMask/snaps-monorepo/pull/105))
441
+ - A Snap that is idle for more than the max idle time will be stopped.
442
+ - Poll Snaps for their status ([#104](https://github.com/MetaMask/snaps-monorepo/pull/104))
443
+ - If a Snap stops responding, it will be forced to stop.
444
+
445
+ ### Changed
446
+ - **BREAKING:** Enforce consistent naming for Snaps-related functionality ([#119](https://github.com/MetaMask/snaps-monorepo/pull/119))
447
+ - **BREAKING:** Use the `ControllerMessenger` to communicate between the `SnapController` and its execution environment service ([#100](https://github.com/MetaMask/snaps-monorepo/pull/100))
448
+
449
+ ## [0.2.2]
450
+ ### Added
451
+ - Add Snap error state ([#96](https://github.com/MetaMask/snaps-monorepo/pull/96))
452
+
453
+ ### Fixed
454
+ - Package script issues ([#97](https://github.com/MetaMask/snaps-monorepo/pull/97), [#98](https://github.com/MetaMask/snaps-monorepo/pull/98))
455
+
456
+ ## [0.2.0]
457
+ ### Changed
458
+ - Update publish scripts ([#92](https://github.com/MetaMask/snaps-monorepo/pull/92))
459
+
460
+ ## [0.1.2]
461
+ ### Changed
462
+ - Restore name of `handshake` method to `ping` ([#90](https://github.com/MetaMask/snaps-monorepo/pull/90))
463
+
464
+ ## [0.1.1]
465
+ ### Added
466
+ - Out of band error support ([#88](https://github.com/MetaMask/snaps-monorepo/pull/88))
467
+
468
+ ### Changed
469
+ - @metamask/controllers@17.0.0 ([#87](https://github.com/MetaMask/snaps-monorepo/pull/87))
470
+
471
+ ## [0.1.0]
472
+ ### Added
473
+ - Readme file ([#71](https://github.com/MetaMask/snaps-monorepo/pull/71))
474
+
475
+ ### Changed
476
+ - **BREAKING:** Rename package to `@metamask/snaps-controllers` ([#73](https://github.com/MetaMask/snaps-monorepo/pull/73))
477
+
478
+ ## [0.0.9]
479
+ ### Added
480
+ - `PluginController`: Always persist plugin `isRunning` state as `false` ([#64](https://github.com/MetaMask/snaps-monorepo/pull/64))
481
+ - Plugins are not automatically running on boot, and we should never persist this state as `true`.
482
+
483
+ ### Changed
484
+ - **BREAKING:** `@metamask/controllers@15.0.0` ([#66](https://github.com/MetaMask/snaps-monorepo/pull/66))
485
+ - This may cause incompatibilities with other versions of the `@metamask/controllers` package.
486
+
487
+ ## [0.0.7]
488
+ ### Fixed
489
+ - Store plugin states in the correct place ([#48](https://github.com/MetaMask/snaps-monorepo/pull/48))
490
+ - Previously, plugin states would be set as top-level keys of the `PluginController`'s state. This broke retrieving plugin states. They are now correctly stored under `state.pluginStates`.
491
+
492
+ ## [0.0.6]
493
+ ### Added
494
+ - iframe execution environment ([#33](https://github.com/MetaMask/snaps-monorepo/pull/33))
495
+ - Execution environment OpenRPC spec ([#23](https://github.com/MetaMask/snaps-monorepo/pull/23))
496
+
497
+ ### Changed
498
+ - **BREAKING:** Migrate `CommandEngine` message format to JSON-RPC ([#11](https://github.com/MetaMask/snaps-monorepo/pull/11))
499
+ - **BREAKING:** Refactor `PluginController` to use `BaseControllerV2` ([#13](https://github.com/MetaMask/snaps-monorepo/pull/13))
500
+ - **BREAKING:** Use generic execution environment interface ([#19](https://github.com/MetaMask/snaps-monorepo/pull/19))
501
+ - **BREAKING:** Restore origin parameter to `setupWorkerConnection`, rename to `setupPluginProvider` ([#20](https://github.com/MetaMask/snaps-monorepo/pull/20))
502
+ - **BREAKING:** Rename some execution environment methods ([#23](https://github.com/MetaMask/snaps-monorepo/pull/23))
503
+
504
+ ### Fixed
505
+ - Ensure that the plugin `isRunning` check always runs when a plugin is started ([#21](https://github.com/MetaMask/snaps-monorepo/pull/21))
506
+
507
+ ## [0.0.5]
508
+ ### Added
509
+ - First semi-stable release.
510
+
511
+ [Unreleased]: https://github.com/MetaMask/snaps-monorepo/compare/v0.33.1-flask.1...HEAD
512
+ [0.33.1-flask.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.33.0-flask.1...v0.33.1-flask.1
513
+ [0.33.0-flask.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.32.2...v0.33.0-flask.1
514
+ [0.32.2]: https://github.com/MetaMask/snaps-monorepo/compare/v0.32.1...v0.32.2
515
+ [0.32.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.32.0...v0.32.1
516
+ [0.32.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.31.0...v0.32.0
517
+ [0.31.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.30.0...v0.31.0
518
+ [0.30.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.29.0...v0.30.0
519
+ [0.29.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.28.0...v0.29.0
520
+ [0.28.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.27.1...v0.28.0
521
+ [0.27.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.27.0...v0.27.1
522
+ [0.27.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.26.2...v0.27.0
523
+ [0.26.2]: https://github.com/MetaMask/snaps-monorepo/compare/v0.26.1...v0.26.2
524
+ [0.26.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.26.0...v0.26.1
525
+ [0.26.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.25.0...v0.26.0
526
+ [0.25.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.24.1...v0.25.0
527
+ [0.24.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.24.0...v0.24.1
528
+ [0.24.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.23.0...v0.24.0
529
+ [0.23.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.22.3...v0.23.0
530
+ [0.22.3]: https://github.com/MetaMask/snaps-monorepo/compare/v0.22.2...v0.22.3
531
+ [0.22.2]: https://github.com/MetaMask/snaps-monorepo/compare/v0.22.1...v0.22.2
532
+ [0.22.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.22.0...v0.22.1
533
+ [0.22.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.21.0...v0.22.0
534
+ [0.21.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.20.0...v0.21.0
535
+ [0.20.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.19.1...v0.20.0
536
+ [0.19.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.19.0...v0.19.1
537
+ [0.19.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.18.1...v0.19.0
538
+ [0.18.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.18.0...v0.18.1
539
+ [0.18.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.17.0...v0.18.0
540
+ [0.17.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.16.0...v0.17.0
541
+ [0.16.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.15.0...v0.16.0
542
+ [0.15.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.14.0...v0.15.0
543
+ [0.14.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.13.0...v0.14.0
544
+ [0.13.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.12.0...v0.13.0
545
+ [0.12.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.11.1...v0.12.0
546
+ [0.11.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.11.0...v0.11.1
547
+ [0.11.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.10.7...v0.11.0
548
+ [0.10.7]: https://github.com/MetaMask/snaps-monorepo/compare/v0.10.6...v0.10.7
549
+ [0.10.6]: https://github.com/MetaMask/snaps-monorepo/compare/v0.10.5...v0.10.6
550
+ [0.10.5]: https://github.com/MetaMask/snaps-monorepo/compare/v0.10.3...v0.10.5
551
+ [0.10.3]: https://github.com/MetaMask/snaps-monorepo/compare/v0.10.2...v0.10.3
552
+ [0.10.2]: https://github.com/MetaMask/snaps-monorepo/compare/v0.10.1...v0.10.2
553
+ [0.10.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.10.0...v0.10.1
554
+ [0.10.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.9.0...v0.10.0
555
+ [0.9.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.8.1...v0.9.0
556
+ [0.8.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.8.0...v0.8.1
557
+ [0.8.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.7.0...v0.8.0
558
+ [0.7.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.6.3...v0.7.0
559
+ [0.6.3]: https://github.com/MetaMask/snaps-monorepo/compare/v0.6.2...v0.6.3
560
+ [0.6.2]: https://github.com/MetaMask/snaps-monorepo/compare/v0.6.1...v0.6.2
561
+ [0.6.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.6.0...v0.6.1
562
+ [0.6.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.5.0...v0.6.0
563
+ [0.5.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.4.0...v0.5.0
564
+ [0.4.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.3.1...v0.4.0
565
+ [0.3.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.3.0...v0.3.1
566
+ [0.3.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.2.2...v0.3.0
567
+ [0.2.2]: https://github.com/MetaMask/snaps-monorepo/compare/v0.2.0...v0.2.2
568
+ [0.2.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.1.2...v0.2.0
569
+ [0.1.2]: https://github.com/MetaMask/snaps-monorepo/compare/v0.1.1...v0.1.2
570
+ [0.1.1]: https://github.com/MetaMask/snaps-monorepo/compare/v0.1.0...v0.1.1
571
+ [0.1.0]: https://github.com/MetaMask/snaps-monorepo/compare/v0.0.9...v0.1.0
572
+ [0.0.9]: https://github.com/MetaMask/snaps-monorepo/compare/v0.0.7...v0.0.9
573
+ [0.0.7]: https://github.com/MetaMask/snaps-monorepo/compare/v0.0.6...v0.0.7
574
+ [0.0.6]: https://github.com/MetaMask/snaps-monorepo/compare/v0.0.5...v0.0.6
575
+ [0.0.5]: https://github.com/MetaMask/snaps-monorepo/releases/tag/v0.0.5
@@ -1,35 +1,35 @@
1
1
  import { BasePostMessageStream } from '@metamask/post-message-stream';
2
2
  import { JsonRpcRequest } from '@metamask/utils';
3
- export declare type OffscreenPostMessageStreamArgs = {
3
+ export declare type ProxyPostMessageStreamArgs = {
4
4
  stream: BasePostMessageStream;
5
5
  jobId: string;
6
- frameUrl: string;
6
+ extra?: Record<string, unknown>;
7
7
  };
8
- export declare type OffscreenPostMessage = {
8
+ export declare type ProxyPostMessage = {
9
9
  jobId: string;
10
10
  data: JsonRpcRequest;
11
+ extra?: Record<string, unknown>;
11
12
  };
12
13
  /**
13
14
  * A post message stream that wraps messages in a job ID, before sending them
14
15
  * over the underlying stream.
15
16
  */
16
- export declare class OffscreenPostMessageStream extends BasePostMessageStream {
17
+ export declare class ProxyPostMessageStream extends BasePostMessageStream {
17
18
  #private;
18
19
  /**
19
- * Initializes a new `OffscreenPostMessageStream` instance.
20
+ * Initializes a new `ProxyPostMessageStream` instance.
20
21
  *
21
22
  * @param args - The constructor arguments.
22
23
  * @param args.stream - The underlying stream to use for communication.
23
24
  * @param args.jobId - The ID of the job this stream is associated with.
24
- * @param args.frameUrl - The URL of the frame to load inside the offscreen
25
- * document.
25
+ * @param args.extra - Extra data to include in the post message.
26
26
  */
27
- constructor({ stream, jobId, frameUrl }: OffscreenPostMessageStreamArgs);
27
+ constructor({ stream, jobId, extra }: ProxyPostMessageStreamArgs);
28
28
  /**
29
29
  * Write data to the underlying stream. This wraps the data in an object with
30
30
  * the job ID.
31
31
  *
32
32
  * @param data - The data to write.
33
33
  */
34
- _postMessage(data: OffscreenPostMessage): void;
34
+ _postMessage(data: ProxyPostMessage): void;
35
35
  }