@metamask/snaps-execution-environments 6.7.1 → 6.8.0

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 (30) hide show
  1. package/CHANGELOG.md +110 -1
  2. package/dist/browserify/iframe/bundle.js +9 -0
  3. package/dist/browserify/iframe/index.html +13394 -0
  4. package/dist/browserify/node-process/bundle.js +13390 -0
  5. package/dist/browserify/node-thread/bundle.js +13390 -0
  6. package/dist/browserify/webview/index.html +13402 -0
  7. package/dist/browserify/worker-executor/bundle.js +13392 -0
  8. package/dist/browserify/worker-pool/bundle.js +9 -0
  9. package/dist/browserify/worker-pool/index.html +13394 -0
  10. package/dist/common/BaseSnapExecutor.cjs +58 -58
  11. package/dist/common/BaseSnapExecutor.cjs.map +1 -1
  12. package/dist/common/BaseSnapExecutor.mjs +58 -58
  13. package/dist/common/BaseSnapExecutor.mjs.map +1 -1
  14. package/dist/common/endowments/network.cjs +39 -52
  15. package/dist/common/endowments/network.cjs.map +1 -1
  16. package/dist/common/endowments/network.mjs +39 -52
  17. package/dist/common/endowments/network.mjs.map +1 -1
  18. package/dist/proxy/ProxySnapExecutor.cjs +72 -69
  19. package/dist/proxy/ProxySnapExecutor.cjs.map +1 -1
  20. package/dist/proxy/ProxySnapExecutor.mjs +71 -68
  21. package/dist/proxy/ProxySnapExecutor.mjs.map +1 -1
  22. package/dist/webview/WebViewExecutorStream.cjs +9 -22
  23. package/dist/webview/WebViewExecutorStream.cjs.map +1 -1
  24. package/dist/webview/WebViewExecutorStream.mjs +9 -22
  25. package/dist/webview/WebViewExecutorStream.mjs.map +1 -1
  26. package/dist/webworker/pool/WebWorkerPool.cjs +133 -130
  27. package/dist/webworker/pool/WebWorkerPool.cjs.map +1 -1
  28. package/dist/webworker/pool/WebWorkerPool.mjs +132 -129
  29. package/dist/webworker/pool/WebWorkerPool.mjs.map +1 -1
  30. package/package.json +37 -26
package/CHANGELOG.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
@@ -6,15 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
7
 
7
8
  ## [Unreleased]
8
9
 
10
+ ## [6.8.0]
11
+
12
+ ### Added
13
+
14
+ - Add support for `metamask:` schemed URLs ([#2719](https://github.com/MetaMask/snaps/pull/2719))
15
+
16
+ ## [6.7.2]
17
+
18
+ ### Fixed
19
+
20
+ - Fix missing execution environment bundles ([#2734](https://github.com/MetaMask/snaps/pull/2734))
21
+
9
22
  ## [6.7.1]
23
+
10
24
  ### Fixed
25
+
11
26
  - Fix invalid types in type declaration in some cases ([#2714](https://github.com/MetaMask/snaps/pull/2714))
12
27
 
13
28
  ## [6.7.0]
29
+
14
30
  ### Changed
31
+
15
32
  - Unblock `wallet_requestSnaps` ([#2661](https://github.com/MetaMask/snaps/pull/2661))
16
33
 
17
34
  ### Fixed
35
+
18
36
  - Fix ESM version of the package ([#2682](https://github.com/MetaMask/snaps/pull/2682))
19
37
  - This fixes the ESM version of the package to be fully compliant with the ESM
20
38
  standard.
@@ -22,110 +40,152 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
22
40
  - Bump other MetaMask dependencies ([#2703](https://github.com/MetaMask/snaps/pull/2703))
23
41
 
24
42
  ## [6.6.2]
43
+
25
44
  ### Changed
45
+
26
46
  - Bump `@metamask/json-rpc-engine` from `^9.0.0` to `^9.0.2` ([#2593](https://github.com/metamask/snaps/pull/2593))
27
47
  - Bump `@metamask/snaps-utils` from `^7.8.0` to `^7.8.1` ([#2595](https://github.com/MetaMask/snaps/pull/2595))
28
48
 
29
49
  ## [6.6.1]
50
+
30
51
  ### Changed
52
+
31
53
  - Bump `@metamask/rpc-errors` from `^6.2.1` to `^6.3.1` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
32
54
  - Bump `@metamask/utils` from `^8.3.0` to `^9.1.0` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
33
55
 
34
56
  ### Fixed
57
+
35
58
  - Replace `superstruct` with ESM-compatible `@metamask/superstruct` `^3.1.0` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
36
59
  - This fixes the issue of this package being unusable by any TypeScript project that uses `Node16` or `NodeNext` as its `moduleResolution` option.
37
60
  - Set `@metamask/providers` from `^17.0.0` to `17.0.0` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
38
61
  - `17.1.0` and `17.1.1` introduce regressions.
39
62
 
40
63
  ## [6.6.0]
64
+
41
65
  ### Changed
66
+
42
67
  - Inline LavaMoat in WebView bundle ([#2528](https://github.com/MetaMask/snaps/pull/2528), [#2564](https://github.com/MetaMask/snaps/pull/2564))
43
68
 
44
69
  ## [6.5.0]
70
+
45
71
  ### Added
72
+
46
73
  - Add `Checkbox` component ([#2501](https://github.com/MetaMask/snaps/pull/2501))
47
74
  - Add `FileInput` component ([#2469](https://github.com/MetaMask/snaps/pull/2469), [#2504](https://github.com/MetaMask/snaps/pull/2504))
48
75
 
49
76
  ### Fixed
77
+
50
78
  - Support parameters in `setTimeout` and `setInterval` ([#2513](https://github.com/MetaMask/snaps/pull/2513))
51
79
 
52
80
  ## [6.4.0]
81
+
53
82
  ### Changed
83
+
54
84
  - Update `onNameLookup` response to include `domainName` ([#2484](https://github.com/MetaMask/snaps/pull/2484))
55
85
  - Bump MetaMask dependencies ([#2460](https://github.com/MetaMask/snaps/pull/2460))
56
86
 
57
87
  ## [6.3.0]
88
+
58
89
  ### Added
90
+
59
91
  - Add origin to lifecycle hooks ([#2441](https://github.com/MetaMask/snaps/pull/2441))
60
92
  - Lifecycle hooks can now use the `origin` parameter to determine the origin
61
93
  of the installation or update.
62
94
 
63
95
  ### Changed
96
+
64
97
  - Bump `@metamask/providers` from `16.1.0` to `17.0.0` ([#2442](https://github.com/MetaMask/snaps/pull/2442))
65
98
 
66
99
  ## [6.2.0]
100
+
67
101
  ### Added
102
+
68
103
  - Add `context` field to `snap_createInterface` ([#2413](https://github.com/MetaMask/snaps/pull/2413))
69
104
 
70
105
  ## [6.1.0]
106
+
71
107
  ### Changed
108
+
72
109
  - Unblock `eth_sendRawTransaction` ([#2362](https://github.com/MetaMask/snaps/pull/2362))
73
110
  - Bump `@metamask/providers` from `16.0.0` to `16.1.0` ([#2386](https://github.com/MetaMask/snaps/pull/2386))
74
111
 
75
112
  ### Fixed
113
+
76
114
  - Make `onUserInput` export optional ([#2373](https://github.com/MetaMask/snaps/pull/2373))
77
115
  - Snaps will no longer crash when interacting with a user interface when the
78
116
  Snap does not export `onUserInput`.
79
117
 
80
118
  ## [6.0.2]
119
+
81
120
  ### Fixed
121
+
82
122
  - Throw an error if starting Snap has no exports ([#2357](https://github.com/MetaMask/snaps/pull/2357))
83
123
 
84
124
  ## [6.0.1]
125
+
85
126
  ### Fixed
127
+
86
128
  - Allow `null` in `FormSubmitEventStruct` form state ([#2333](https://github.com/MetaMask/snaps/pull/2333))
87
129
 
88
130
  ## [6.0.0]
131
+
89
132
  ### Removed
133
+
90
134
  - **BREAKING:** Remove broken `ethereum` properties ([#2296](https://github.com/MetaMask/snaps/pull/2296))
91
135
  - Snaps can no longer access `on` and `removeListener` on `ethereum`.
92
136
  - This feature was already non-functional.
93
137
 
94
138
  ## [5.0.4]
139
+
95
140
  ### Changed
141
+
96
142
  - Bump MetaMask dependencies ([#2270](https://github.com/MetaMask/snaps/pull/2270))
97
143
 
98
144
  ## [5.0.3]
145
+
99
146
  ### Changed
147
+
100
148
  - Bump `@metamask/providers` to `^15.0.0` ([#2231](https://github.com/MetaMask/snaps/pull/2231))
101
149
  - Bump `@metamask/json-rpc-engine` to `^7.3.3` ([#2247](https://github.com/MetaMask/snaps/pull/2247))
102
150
 
103
151
  ## [5.0.2]
152
+
104
153
  ### Changed
154
+
105
155
  - Bump LavaMoat packages ([#2234](https://github.com/MetaMask/snaps/pull/2234))
106
156
 
107
157
  ## [5.0.1]
158
+
108
159
  ### Fixed
160
+
109
161
  - Fix minor build configuration problems ([#2220](https://github.com/MetaMask/snaps/pull/2220))
110
162
 
111
163
  ## [5.0.0]
164
+
112
165
  ### Changed
166
+
113
167
  - **BREAKING:** Update ESM build to be fully compliant with the ESM standard ([#2210](https://github.com/MetaMask/snaps/pull/2210))
114
168
  - Bump `@metamask/rpc-errors` to `^6.2.1` ([#2209](https://github.com/MetaMask/snaps/pull/2209))
115
169
 
116
170
  ### Fixed
171
+
117
172
  - Enforce JSON-RPC response size limits ([#2201](https://github.com/MetaMask/snaps/pull/2201))
118
173
 
119
174
  ## [4.0.1]
175
+
120
176
  ### Changed
177
+
121
178
  - Update several LavaMoat packages ([#2173](https://github.com/MetaMask/snaps/pull/2173))
122
179
 
123
180
  ## [4.0.0]
181
+
124
182
  ### Added
183
+
125
184
  - Add WebView execution environment ([#2005](https://github.com/MetaMask/snaps/pull/2005))
126
185
  - Add support for dynamic user interfaces ([#1465](https://github.com/MetaMask/snaps/pull/1465))
127
186
 
128
187
  ### Changed
188
+
129
189
  - **BREAKING:** Stop bundling offscreen execution environment ([#2154](https://github.com/MetaMask/snaps/pull/2154))
130
190
  - **BREAKING:** Deploy multiple bundles to AWS ([#2150](https://github.com/MetaMask/snaps/pull/2150))
131
191
  - From now on the bundles will be served at `https://execution.metamask.io/%BUILD_TYPE%/%VERSION%/index.html`.
@@ -134,36 +194,50 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
134
194
  - Bump MetaMask dependencies ([#2129](https://github.com/MetaMask/snaps/pull/2129), [#2132](https://github.com/MetaMask/snaps/pull/2132))
135
195
 
136
196
  ## [3.5.0]
197
+
137
198
  ### Added
199
+
138
200
  - Add support for signature insights ([#2074](https://github.com/MetaMask/snaps/pull/2074))
139
201
 
140
202
  ### Changed
203
+
141
204
  - Bump SES and LavaMoat ([#2105](https://github.com/MetaMask/snaps/pull/2105))
142
205
  - Bump several MetaMask dependencies ([#2054](https://github.com/MetaMask/snaps/pull/2054), [#2100](https://github.com/MetaMask/snaps/pull/2100))
143
206
 
144
207
  ## [3.4.3]
208
+
145
209
  ### Changed
210
+
146
211
  - Move iframe bundle to HTML body ([#2045](https://github.com/MetaMask/snaps/pull/2045))
147
212
  - Bump `@metamask/json-rpc-engine` from `7.3.0` to `7.3.1` ([#2065](https://github.com/MetaMask/snaps/pull/2065))
148
213
 
149
214
  ## [3.4.2]
215
+
150
216
  ### Changed
217
+
151
218
  - Bump `@metamask/providers` from `14.0.1` to `14.0.2` ([#1992](https://github.com/MetaMask/snaps/pull/1992))
152
219
 
153
220
  ## [3.4.1]
221
+
154
222
  ### Changed
223
+
155
224
  - Block `wallet_revokePermissions` ([#1978](https://github.com/MetaMask/snaps/pull/1978))
156
225
  - Bump several MetaMask dependencies ([#1964](https://github.com/MetaMask/snaps/pull/1964))
157
226
 
158
227
  ### Fixed
228
+
159
229
  - Fix a few issues with passing non-JSON-serializable values ([#1974](https://github.com/MetaMask/snaps/pull/1974))
160
230
 
161
231
  ## [3.4.0]
232
+
162
233
  ### Changed
234
+
163
235
  - Pause request timer when `fetch` is called ([#1756](https://github.com/MetaMask/snaps/pull/1756))
164
236
 
165
237
  ## [3.3.0]
238
+
166
239
  ### Changed
240
+
167
241
  - Use `@metamask/snaps-sdk` package ([#1930](https://github.com/MetaMask/snaps/pull/1930),
168
242
  [#1946](https://github.com/MetaMask/snaps/pull/1946), [#1949](https://github.com/MetaMask/snaps/pull/1949),
169
243
  [#1954](https://github.com/MetaMask/snaps/pull/1954))
@@ -171,91 +245,126 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
171
245
  - `@metamask/snaps-ui` packages.
172
246
 
173
247
  ## [3.2.0]
248
+
174
249
  ### Added
250
+
175
251
  - Add `OnHomePage` export ([#1896](https://github.com/MetaMask/snaps/pull/1896))
176
252
 
177
253
  ### Fixed
254
+
178
255
  - Await stream message delivery ([#1928](https://github.com/MetaMask/snaps/pull/1928))
179
256
 
180
257
  ## [3.1.0]
258
+
181
259
  ### Changed
260
+
182
261
  - Improve error handling ([#1841](https://github.com/MetaMask/snaps/pull/1841))
183
262
  - Snaps can now throw a `SnapError`, without causing the Snap to crash.
184
263
  - Standardise all errors thrown in execution environments ([#1830](https://github.com/MetaMask/snaps/pull/1830))
185
264
 
186
265
  ## [3.0.0]
266
+
187
267
  ### Added
268
+
188
269
  - Add keyring export and endowment ([#1787](https://github.com/MetaMask/snaps/pull/1787))
189
270
 
190
271
  ### Changed
272
+
191
273
  - **BREAKING:** Bump minimum Node.js version to `^18.16.0` ([#1741](https://github.com/MetaMask/snaps/pull/1741))
192
274
 
193
275
  ## [2.0.1]
276
+
194
277
  ### Changed
278
+
195
279
  - Remove unmaintained OpenRPC doc for execution environment ([#1782](https://github.com/MetaMask/snaps/pull/1782))
196
280
  - Update LavaMoat ([#1754](https://github.com/MetaMask/snaps/pull/1754))
197
281
 
198
282
  ### Fixed
283
+
199
284
  - Allow passing `undefined` parameters to `request()` ([#1776](https://github.com/MetaMask/snaps/pull/1776))
200
285
  - Fix an issue where errors would not correctly be returned ([#1772](https://github.com/MetaMask/snaps/pull/1772))
201
286
 
202
287
  ## [2.0.0]
288
+
203
289
  ### Changed
290
+
204
291
  - Initial stable release from main branch ([#1757](https://github.com/MetaMask/snaps/pull/1757))
205
292
 
206
293
  ## [0.39.0-flask.1]
294
+
207
295
  ### Added
296
+
208
297
  - Add `onNameLookup` export ([#1394](https://github.com/MetaMask/snaps/pull/1394))
209
298
 
210
299
  ### Changed
300
+
211
301
  - Remove `pump` ([#1730](https://github.com/MetaMask/snaps/pull/1730))
212
302
  - Bump `metamask/utils` and `metamask/snaps-registry` ([#1738](https://github.com/MetaMask/snaps/pull/1738))
213
303
 
214
304
  ### Fixed
305
+
215
306
  - Sanitize JSON before checking for blocked methods ([#1762](https://github.com/MetaMask/snaps/pull/1762))
216
307
 
217
308
  ## [0.38.3-flask.1]
309
+
218
310
  ### Changed
311
+
219
312
  - Bump `@metamask/post-message-stream` from 6.1.2 to 7.0.0 ([#1707](https://github.com/MetaMask/snaps/pull/1707), [#1724](https://github.com/MetaMask/snaps/pull/1724))
220
313
  - Bump `@metamask/utils` and `@metamask/snaps-registry` ([#1694](https://github.com/MetaMask/snaps/pull/1694))
221
314
 
222
315
  ### Fixed
316
+
223
317
  - Add hardening for `Request`, `Headers`, and `Response` endowments ([#1695](https://github.com/MetaMask/snaps/pull/1695))
224
318
 
225
319
  ## [0.38.2-flask.1]
320
+
226
321
  ### Changed
322
+
227
323
  - Bump `ses` to `0.18.7` ([#1666](https://github.com/MetaMask/snaps/pull/1666))
228
324
 
229
325
  ### Fixed
326
+
230
327
  - Remove unused dependencies ([#1680](https://github.com/MetaMask/snaps/pull/1680))
231
328
 
232
329
  ## [0.38.1-flask.1]
330
+
233
331
  ### Changed
332
+
234
333
  - Update LavaMoat packages to latest versions ([#1657](https://github.com/MetaMask/snaps/pull/1657))
235
334
 
236
335
  ### Removed
336
+
237
337
  - Remove direct dependency on SES ([#1660](https://github.com/MetaMask/snaps/pull/1660))
238
338
  - It's now a dev dependency, as it's only used in development.
239
339
 
240
340
  ### Fixed
341
+
241
342
  - Pass correct scuttle args ([#1654](https://github.com/MetaMask/snaps/pull/1654))
242
343
 
243
344
  ## [0.38.0-flask.1]
345
+
244
346
  ### Added
347
+
245
348
  - Add `onInstall` and `onUpdate` lifecycle hooks ([#1643](https://github.com/MetaMask/snaps/pull/1643))
246
349
  - Unblock `personal_sign` JSON-RPC method ([#1601](https://github.com/MetaMask/snaps/pull/1601))
247
350
 
248
351
  ## [0.37.3-flask.1]
352
+
249
353
  ### Fixed
354
+
250
355
  - Fix deployment of the iframe execution environment ([#1627](https://github.com/MetaMask/snaps/pull/1627))
251
356
 
252
357
  ## [0.37.2-flask.1]
358
+
253
359
  ### Changed
360
+
254
361
  - Release package independently ([#1600](https://github.com/MetaMask/snaps/pull/1600))
255
362
  - The version of the package no longer needs to match the version of all other
256
363
  MetaMask Snaps packages.
257
364
 
258
- [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-execution-environments@6.7.1...HEAD
365
+ [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-execution-environments@6.8.0...HEAD
366
+ [6.8.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-execution-environments@6.7.2...@metamask/snaps-execution-environments@6.8.0
367
+ [6.7.2]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-execution-environments@6.7.1...@metamask/snaps-execution-environments@6.7.2
259
368
  [6.7.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-execution-environments@6.7.0...@metamask/snaps-execution-environments@6.7.1
260
369
  [6.7.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-execution-environments@6.6.2...@metamask/snaps-execution-environments@6.7.0
261
370
  [6.6.2]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-execution-environments@6.6.1...@metamask/snaps-execution-environments@6.6.2