@metamask/snaps-execution-environments 5.0.0 → 5.0.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 (204) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/dist/browserify/iframe/bundle.js +5 -5
  3. package/dist/browserify/iframe/index.html +3 -0
  4. package/dist/browserify/node-process/bundle.js +6 -3
  5. package/dist/browserify/node-thread/bundle.js +6 -3
  6. package/dist/browserify/webview/bundle.js +4 -4
  7. package/dist/browserify/webview/index.html +3 -0
  8. package/dist/browserify/worker-executor/bundle.js +8 -5
  9. package/dist/browserify/worker-pool/bundle.js +4 -4
  10. package/dist/browserify/worker-pool/index.html +3 -0
  11. package/dist/chunk-2VA6RAEE.js +30 -0
  12. package/dist/{chunk-M2OYI2NS.js → chunk-3JCT4MWT.js} +1 -1
  13. package/dist/{chunk-IXYNAYMQ.js → chunk-3Y4ZRKNE.js} +5 -5
  14. package/dist/{chunk-QYFJ2LLW.js → chunk-44XYIN4N.js} +21 -21
  15. package/dist/{chunk-XGCWN6ZD.mjs → chunk-4CGJF3BT.mjs} +2 -2
  16. package/dist/{chunk-BE4YFFMX.js → chunk-4XRZLEKU.js} +1 -1
  17. package/dist/{chunk-FQBU72MW.mjs → chunk-53ZULHPK.mjs} +1 -1
  18. package/dist/{chunk-VL3VNUT4.mjs → chunk-5DEV3QQU.mjs} +1 -1
  19. package/dist/{chunk-G3NCGVCC.mjs → chunk-5FG5IBYT.mjs} +3 -3
  20. package/dist/{chunk-HSZIPZHO.js → chunk-5STN3QCA.js} +3 -3
  21. package/dist/{chunk-KWFB2KH2.mjs → chunk-7AJWXSDQ.mjs} +1 -1
  22. package/dist/{chunk-26EFJQDW.mjs → chunk-ACK2JBSO.mjs} +1 -1
  23. package/dist/{chunk-XMCETCVM.js → chunk-B3JZNNZD.js} +3 -3
  24. package/dist/{chunk-Z7FBBBME.mjs → chunk-BCBKEUCG.mjs} +3 -3
  25. package/dist/{chunk-FNRATYYY.mjs → chunk-BTEAZZKP.mjs} +1 -1
  26. package/dist/{chunk-RWBJNNGH.js → chunk-CV5LC4PP.js} +1 -1
  27. package/dist/{chunk-YC3HWHJV.mjs → chunk-CWCVTRNZ.mjs} +1 -1
  28. package/dist/{chunk-ZMDJRC2Z.js → chunk-CWIFVPLR.js} +13 -13
  29. package/dist/{chunk-SWINKAMI.js → chunk-DFPM46ZF.js} +1 -1
  30. package/dist/{chunk-L5U2LMZR.js → chunk-DLLLH5HN.js} +1 -1
  31. package/dist/{chunk-L4G6IIWG.js → chunk-DTF6YTIS.js} +31 -31
  32. package/dist/{chunk-ETXAWW65.mjs → chunk-ERB7OLAB.mjs} +11 -11
  33. package/dist/{chunk-5RKYO2Y5.js → chunk-F37LPBJS.js} +5 -5
  34. package/dist/{chunk-LX5LQXYU.js → chunk-FOEAIF5U.js} +1 -1
  35. package/dist/{chunk-LGC7HQR4.js → chunk-HGLRZZ56.js} +5 -5
  36. package/dist/{chunk-AZCRNZ5W.js → chunk-HKHW6TTX.js} +3 -3
  37. package/dist/{chunk-RCPCISJD.mjs → chunk-HWS4QSOC.mjs} +1 -1
  38. package/dist/{chunk-N7URTBJV.js → chunk-I5G4YFHM.js} +1 -1
  39. package/dist/{chunk-Y7IEFWZU.mjs → chunk-IX5S3V47.mjs} +1 -1
  40. package/dist/{chunk-OWG545LQ.js → chunk-JW3JHJ7S.js} +5 -5
  41. package/dist/{chunk-RO347OMD.js → chunk-LO5ORVRC.js} +1 -1
  42. package/dist/chunk-MCXWFCGV.js +1 -0
  43. package/dist/{chunk-VZS2LXDP.mjs → chunk-MIWGLICQ.mjs} +1 -1
  44. package/dist/{chunk-TVV27HGP.mjs → chunk-MM6ZSW4E.mjs} +2 -2
  45. package/dist/{chunk-IU54VPNO.js → chunk-MOXNHXPG.js} +6 -6
  46. package/dist/{chunk-S7LRB72P.js → chunk-MS2LQQYH.js} +6 -6
  47. package/dist/{chunk-XYRWHY3K.mjs → chunk-MXNMMTJW.mjs} +1 -1
  48. package/dist/{chunk-EBECHU6M.js → chunk-OBT45IWW.js} +6 -6
  49. package/dist/{chunk-4NOF6TN6.js → chunk-OCNPLHS2.js} +1 -1
  50. package/dist/{chunk-AJFPA6MI.js → chunk-OLASO3O4.js} +9 -9
  51. package/dist/{chunk-GH6FPDY5.mjs → chunk-PTCQ2I47.mjs} +2 -2
  52. package/dist/{chunk-A7NJQLUA.mjs → chunk-Q42NNJFY.mjs} +2 -2
  53. package/dist/{chunk-XBKAIK2K.mjs → chunk-QJB4J7WL.mjs} +3 -3
  54. package/dist/{chunk-OW4IXJ5J.mjs → chunk-QVIHE3WB.mjs} +8 -8
  55. package/dist/{chunk-IY3CYGH7.js → chunk-QZC2X6NG.js} +6 -6
  56. package/dist/{chunk-WA7K3P4D.js → chunk-RZNKZRAD.js} +5 -5
  57. package/dist/{chunk-TWF4RAXL.mjs → chunk-S7257EN3.mjs} +1 -1
  58. package/dist/chunk-TSEAPB7L.mjs +1 -0
  59. package/dist/{chunk-6GHFAQ54.mjs → chunk-UOPIRTJX.mjs} +2 -2
  60. package/dist/{chunk-XL5BQOEI.mjs → chunk-USHNZDGV.mjs} +3 -3
  61. package/dist/{chunk-CINBMYIQ.mjs → chunk-V76DI2XM.mjs} +1 -1
  62. package/dist/{chunk-KQNKD7G5.mjs → chunk-VKFZ4EB5.mjs} +3 -3
  63. package/dist/{chunk-MOWPAP2K.mjs → chunk-W7EDURT5.mjs} +2 -2
  64. package/dist/{chunk-RDFGQYG6.mjs → chunk-WV3CXIKN.mjs} +1 -1
  65. package/dist/{chunk-B3ASGNVQ.mjs → chunk-Y7MVNOPY.mjs} +3 -3
  66. package/dist/{chunk-CCBKFCGG.js → chunk-Z4WSS7YZ.js} +5 -5
  67. package/dist/{chunk-XKY46YTJ.js → chunk-Z7BOREC4.js} +1 -1
  68. package/dist/{chunk-BOCIYCLE.mjs → chunk-ZNTCZK7J.mjs} +2 -2
  69. package/dist/common/BaseSnapExecutor.js +20 -20
  70. package/dist/common/BaseSnapExecutor.mjs +19 -19
  71. package/dist/common/commands.js +3 -3
  72. package/dist/common/commands.mjs +2 -2
  73. package/dist/common/endowments/commonEndowmentFactory.js +14 -14
  74. package/dist/common/endowments/commonEndowmentFactory.mjs +13 -13
  75. package/dist/common/endowments/console.js +3 -3
  76. package/dist/common/endowments/console.mjs +2 -2
  77. package/dist/common/endowments/crypto.js +3 -3
  78. package/dist/common/endowments/crypto.mjs +2 -2
  79. package/dist/common/endowments/date.js +3 -3
  80. package/dist/common/endowments/date.mjs +2 -2
  81. package/dist/common/endowments/index.js +15 -15
  82. package/dist/common/endowments/index.mjs +14 -14
  83. package/dist/common/endowments/interval.js +2 -2
  84. package/dist/common/endowments/interval.mjs +1 -1
  85. package/dist/common/endowments/math.js +4 -4
  86. package/dist/common/endowments/math.mjs +3 -3
  87. package/dist/common/endowments/network.js +4 -4
  88. package/dist/common/endowments/network.mjs +3 -3
  89. package/dist/common/endowments/textDecoder.js +2 -2
  90. package/dist/common/endowments/textDecoder.mjs +1 -1
  91. package/dist/common/endowments/textEncoder.js +2 -2
  92. package/dist/common/endowments/textEncoder.mjs +1 -1
  93. package/dist/common/endowments/timeout.js +2 -2
  94. package/dist/common/endowments/timeout.mjs +1 -1
  95. package/dist/common/globalEvents.js +3 -3
  96. package/dist/common/globalEvents.mjs +2 -2
  97. package/dist/common/globalObject.js +2 -2
  98. package/dist/common/globalObject.mjs +1 -1
  99. package/dist/common/lockdown/lockdown-events.js +2 -2
  100. package/dist/common/lockdown/lockdown-events.mjs +1 -1
  101. package/dist/common/lockdown/lockdown-more.js +2 -2
  102. package/dist/common/lockdown/lockdown-more.mjs +1 -1
  103. package/dist/common/sortParams.js +2 -2
  104. package/dist/common/sortParams.mjs +1 -1
  105. package/dist/common/utils.js +3 -3
  106. package/dist/common/utils.mjs +2 -2
  107. package/dist/common/validation.js +2 -2
  108. package/dist/common/validation.mjs +1 -1
  109. package/dist/iframe/IFrameSnapExecutor.js +21 -21
  110. package/dist/iframe/IFrameSnapExecutor.mjs +20 -20
  111. package/dist/iframe/index.js +25 -25
  112. package/dist/iframe/index.mjs +22 -22
  113. package/dist/index.js +3 -3
  114. package/dist/index.mjs +2 -2
  115. package/dist/logging.js +2 -2
  116. package/dist/logging.mjs +1 -1
  117. package/dist/node-process/ChildProcessSnapExecutor.js +21 -21
  118. package/dist/node-process/ChildProcessSnapExecutor.mjs +20 -20
  119. package/dist/node-process/index.js +23 -23
  120. package/dist/node-process/index.mjs +21 -21
  121. package/dist/node-thread/ThreadSnapExecutor.js +21 -21
  122. package/dist/node-thread/ThreadSnapExecutor.mjs +20 -20
  123. package/dist/node-thread/index.js +23 -23
  124. package/dist/node-thread/index.mjs +21 -21
  125. package/dist/proxy/ProxySnapExecutor.js +2 -2
  126. package/dist/proxy/ProxySnapExecutor.mjs +1 -1
  127. package/dist/proxy/index.js +3 -3
  128. package/dist/proxy/index.mjs +2 -2
  129. package/dist/tsconfig.build.tsbuildinfo +1 -1
  130. package/dist/types/common/validation.d.ts +8 -0
  131. package/dist/webview/WebViewExecutorStream.js +2 -2
  132. package/dist/webview/WebViewExecutorStream.mjs +1 -1
  133. package/dist/webview/index.js +8 -8
  134. package/dist/webview/index.mjs +4 -4
  135. package/dist/webworker/executor/WebWorkerSnapExecutor.js +21 -21
  136. package/dist/webworker/executor/WebWorkerSnapExecutor.mjs +20 -20
  137. package/dist/webworker/executor/index.js +25 -25
  138. package/dist/webworker/executor/index.mjs +22 -22
  139. package/dist/webworker/pool/WebWorkerPool.js +2 -2
  140. package/dist/webworker/pool/WebWorkerPool.mjs +1 -1
  141. package/dist/webworker/pool/index.js +6 -6
  142. package/dist/webworker/pool/index.mjs +3 -3
  143. package/package.json +7 -7
  144. package/dist/chunk-5DIRYAYO.js +0 -30
  145. package/dist/chunk-AQNACKO6.js +0 -1
  146. package/dist/chunk-YMAK7TUO.mjs +0 -1
  147. /package/dist/{chunk-5DIRYAYO.js.map → chunk-2VA6RAEE.js.map} +0 -0
  148. /package/dist/{chunk-M2OYI2NS.js.map → chunk-3JCT4MWT.js.map} +0 -0
  149. /package/dist/{chunk-IXYNAYMQ.js.map → chunk-3Y4ZRKNE.js.map} +0 -0
  150. /package/dist/{chunk-QYFJ2LLW.js.map → chunk-44XYIN4N.js.map} +0 -0
  151. /package/dist/{chunk-XGCWN6ZD.mjs.map → chunk-4CGJF3BT.mjs.map} +0 -0
  152. /package/dist/{chunk-BE4YFFMX.js.map → chunk-4XRZLEKU.js.map} +0 -0
  153. /package/dist/{chunk-FQBU72MW.mjs.map → chunk-53ZULHPK.mjs.map} +0 -0
  154. /package/dist/{chunk-VL3VNUT4.mjs.map → chunk-5DEV3QQU.mjs.map} +0 -0
  155. /package/dist/{chunk-G3NCGVCC.mjs.map → chunk-5FG5IBYT.mjs.map} +0 -0
  156. /package/dist/{chunk-HSZIPZHO.js.map → chunk-5STN3QCA.js.map} +0 -0
  157. /package/dist/{chunk-KWFB2KH2.mjs.map → chunk-7AJWXSDQ.mjs.map} +0 -0
  158. /package/dist/{chunk-26EFJQDW.mjs.map → chunk-ACK2JBSO.mjs.map} +0 -0
  159. /package/dist/{chunk-XMCETCVM.js.map → chunk-B3JZNNZD.js.map} +0 -0
  160. /package/dist/{chunk-Z7FBBBME.mjs.map → chunk-BCBKEUCG.mjs.map} +0 -0
  161. /package/dist/{chunk-FNRATYYY.mjs.map → chunk-BTEAZZKP.mjs.map} +0 -0
  162. /package/dist/{chunk-RWBJNNGH.js.map → chunk-CV5LC4PP.js.map} +0 -0
  163. /package/dist/{chunk-YC3HWHJV.mjs.map → chunk-CWCVTRNZ.mjs.map} +0 -0
  164. /package/dist/{chunk-ZMDJRC2Z.js.map → chunk-CWIFVPLR.js.map} +0 -0
  165. /package/dist/{chunk-SWINKAMI.js.map → chunk-DFPM46ZF.js.map} +0 -0
  166. /package/dist/{chunk-L5U2LMZR.js.map → chunk-DLLLH5HN.js.map} +0 -0
  167. /package/dist/{chunk-L4G6IIWG.js.map → chunk-DTF6YTIS.js.map} +0 -0
  168. /package/dist/{chunk-ETXAWW65.mjs.map → chunk-ERB7OLAB.mjs.map} +0 -0
  169. /package/dist/{chunk-5RKYO2Y5.js.map → chunk-F37LPBJS.js.map} +0 -0
  170. /package/dist/{chunk-LX5LQXYU.js.map → chunk-FOEAIF5U.js.map} +0 -0
  171. /package/dist/{chunk-LGC7HQR4.js.map → chunk-HGLRZZ56.js.map} +0 -0
  172. /package/dist/{chunk-AZCRNZ5W.js.map → chunk-HKHW6TTX.js.map} +0 -0
  173. /package/dist/{chunk-RCPCISJD.mjs.map → chunk-HWS4QSOC.mjs.map} +0 -0
  174. /package/dist/{chunk-N7URTBJV.js.map → chunk-I5G4YFHM.js.map} +0 -0
  175. /package/dist/{chunk-Y7IEFWZU.mjs.map → chunk-IX5S3V47.mjs.map} +0 -0
  176. /package/dist/{chunk-OWG545LQ.js.map → chunk-JW3JHJ7S.js.map} +0 -0
  177. /package/dist/{chunk-RO347OMD.js.map → chunk-LO5ORVRC.js.map} +0 -0
  178. /package/dist/{chunk-AQNACKO6.js.map → chunk-MCXWFCGV.js.map} +0 -0
  179. /package/dist/{chunk-VZS2LXDP.mjs.map → chunk-MIWGLICQ.mjs.map} +0 -0
  180. /package/dist/{chunk-TVV27HGP.mjs.map → chunk-MM6ZSW4E.mjs.map} +0 -0
  181. /package/dist/{chunk-IU54VPNO.js.map → chunk-MOXNHXPG.js.map} +0 -0
  182. /package/dist/{chunk-S7LRB72P.js.map → chunk-MS2LQQYH.js.map} +0 -0
  183. /package/dist/{chunk-XYRWHY3K.mjs.map → chunk-MXNMMTJW.mjs.map} +0 -0
  184. /package/dist/{chunk-EBECHU6M.js.map → chunk-OBT45IWW.js.map} +0 -0
  185. /package/dist/{chunk-4NOF6TN6.js.map → chunk-OCNPLHS2.js.map} +0 -0
  186. /package/dist/{chunk-AJFPA6MI.js.map → chunk-OLASO3O4.js.map} +0 -0
  187. /package/dist/{chunk-GH6FPDY5.mjs.map → chunk-PTCQ2I47.mjs.map} +0 -0
  188. /package/dist/{chunk-A7NJQLUA.mjs.map → chunk-Q42NNJFY.mjs.map} +0 -0
  189. /package/dist/{chunk-XBKAIK2K.mjs.map → chunk-QJB4J7WL.mjs.map} +0 -0
  190. /package/dist/{chunk-OW4IXJ5J.mjs.map → chunk-QVIHE3WB.mjs.map} +0 -0
  191. /package/dist/{chunk-IY3CYGH7.js.map → chunk-QZC2X6NG.js.map} +0 -0
  192. /package/dist/{chunk-WA7K3P4D.js.map → chunk-RZNKZRAD.js.map} +0 -0
  193. /package/dist/{chunk-TWF4RAXL.mjs.map → chunk-S7257EN3.mjs.map} +0 -0
  194. /package/dist/{chunk-YMAK7TUO.mjs.map → chunk-TSEAPB7L.mjs.map} +0 -0
  195. /package/dist/{chunk-6GHFAQ54.mjs.map → chunk-UOPIRTJX.mjs.map} +0 -0
  196. /package/dist/{chunk-XL5BQOEI.mjs.map → chunk-USHNZDGV.mjs.map} +0 -0
  197. /package/dist/{chunk-CINBMYIQ.mjs.map → chunk-V76DI2XM.mjs.map} +0 -0
  198. /package/dist/{chunk-KQNKD7G5.mjs.map → chunk-VKFZ4EB5.mjs.map} +0 -0
  199. /package/dist/{chunk-MOWPAP2K.mjs.map → chunk-W7EDURT5.mjs.map} +0 -0
  200. /package/dist/{chunk-RDFGQYG6.mjs.map → chunk-WV3CXIKN.mjs.map} +0 -0
  201. /package/dist/{chunk-B3ASGNVQ.mjs.map → chunk-Y7MVNOPY.mjs.map} +0 -0
  202. /package/dist/{chunk-CCBKFCGG.js.map → chunk-Z4WSS7YZ.js.map} +0 -0
  203. /package/dist/{chunk-XKY46YTJ.js.map → chunk-Z7BOREC4.js.map} +0 -0
  204. /package/dist/{chunk-BOCIYCLE.mjs.map → chunk-ZNTCZK7J.mjs.map} +0 -0
@@ -11811,6 +11811,9 @@ function observeImports(map, importName, importIndex) {
11811
11811
  stackFiltering: 'verbose',
11812
11812
  // prevents most common override mistake cases from tripping up users
11813
11813
  overrideTaming: 'severe',
11814
+ // preserves JS locale methods, to avoid confusing users
11815
+ // prevents aliasing: toLocaleString() to toString(), etc
11816
+ localeTaming: 'unsafe',
11814
11817
  }
11815
11818
 
11816
11819
  lockdown(lockdownOptions)
@@ -0,0 +1,30 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkDLLLH5HNjs = require('./chunk-DLLLH5HN.js');
4
+
5
+ // src/common/globalEvents.ts
6
+ var _rpcerrors = require('@metamask/rpc-errors');
7
+ function addEventListener(event, listener) {
8
+ if ("addEventListener" in _chunkDLLLH5HNjs.rootRealmGlobal && typeof _chunkDLLLH5HNjs.rootRealmGlobal.addEventListener === "function") {
9
+ return _chunkDLLLH5HNjs.rootRealmGlobal.addEventListener(event.toLowerCase(), listener);
10
+ }
11
+ if (_chunkDLLLH5HNjs.rootRealmGlobal.process && "on" in _chunkDLLLH5HNjs.rootRealmGlobal.process && typeof _chunkDLLLH5HNjs.rootRealmGlobal.process.on === "function") {
12
+ return _chunkDLLLH5HNjs.rootRealmGlobal.process.on(event, listener);
13
+ }
14
+ throw _rpcerrors.rpcErrors.internal("Platform agnostic addEventListener failed.");
15
+ }
16
+ function removeEventListener(event, listener) {
17
+ if ("removeEventListener" in _chunkDLLLH5HNjs.rootRealmGlobal && typeof _chunkDLLLH5HNjs.rootRealmGlobal.removeEventListener === "function") {
18
+ return _chunkDLLLH5HNjs.rootRealmGlobal.removeEventListener(event.toLowerCase(), listener);
19
+ }
20
+ if (_chunkDLLLH5HNjs.rootRealmGlobal.process && "removeListener" in _chunkDLLLH5HNjs.rootRealmGlobal.process && typeof _chunkDLLLH5HNjs.rootRealmGlobal.process.removeListener === "function") {
21
+ return _chunkDLLLH5HNjs.rootRealmGlobal.process.removeListener(event, listener);
22
+ }
23
+ throw new Error("Platform agnostic removeEventListener failed");
24
+ }
25
+
26
+
27
+
28
+
29
+ exports.addEventListener = addEventListener; exports.removeEventListener = removeEventListener;
30
+ //# sourceMappingURL=chunk-2VA6RAEE.js.map
@@ -105,4 +105,4 @@ var ProxySnapExecutor = _ProxySnapExecutor;
105
105
 
106
106
 
107
107
  exports.ProxySnapExecutor = ProxySnapExecutor;
108
- //# sourceMappingURL=chunk-M2OYI2NS.js.map
108
+ //# sourceMappingURL=chunk-3JCT4MWT.js.map
@@ -1,18 +1,18 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunkL4G6IIWGjs = require('./chunk-L4G6IIWG.js');
3
+ var _chunkDTF6YTISjs = require('./chunk-DTF6YTIS.js');
4
4
 
5
5
 
6
- var _chunkXKY46YTJjs = require('./chunk-XKY46YTJ.js');
6
+ var _chunkZ7BOREC4js = require('./chunk-Z7BOREC4.js');
7
7
 
8
8
  // src/node-thread/ThreadSnapExecutor.ts
9
9
  var _objectmultiplex = require('@metamask/object-multiplex'); var _objectmultiplex2 = _interopRequireDefault(_objectmultiplex);
10
10
  var _postmessagestream = require('@metamask/post-message-stream');
11
11
  var _snapsutils = require('@metamask/snaps-utils');
12
12
  var _readablestream = require('readable-stream');
13
- var ThreadSnapExecutor = class _ThreadSnapExecutor extends _chunkL4G6IIWGjs.BaseSnapExecutor {
13
+ var ThreadSnapExecutor = class _ThreadSnapExecutor extends _chunkDTF6YTISjs.BaseSnapExecutor {
14
14
  static initialize() {
15
- _chunkXKY46YTJjs.log.call(void 0, "Worker: Connecting to parent.");
15
+ _chunkZ7BOREC4js.log.call(void 0, "Worker: Connecting to parent.");
16
16
  const parentStream = new (0, _postmessagestream.ThreadMessageStream)();
17
17
  const mux = new (0, _objectmultiplex2.default)();
18
18
  _readablestream.pipeline.call(void 0, parentStream, mux, parentStream, (error) => {
@@ -30,4 +30,4 @@ var ThreadSnapExecutor = class _ThreadSnapExecutor extends _chunkL4G6IIWGjs.Base
30
30
 
31
31
 
32
32
  exports.ThreadSnapExecutor = ThreadSnapExecutor;
33
- //# sourceMappingURL=chunk-IXYNAYMQ.js.map
33
+ //# sourceMappingURL=chunk-3Y4ZRKNE.js.map
@@ -1,33 +1,33 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkAZCRNZ5Wjs = require('./chunk-AZCRNZ5W.js');
3
+ var _chunkHKHW6TTXjs = require('./chunk-HKHW6TTX.js');
4
4
 
5
5
 
6
- var _chunkS7LRB72Pjs = require('./chunk-S7LRB72P.js');
6
+ var _chunkMS2LQQYHjs = require('./chunk-MS2LQQYH.js');
7
7
 
8
8
 
9
- var _chunkZMDJRC2Zjs = require('./chunk-ZMDJRC2Z.js');
9
+ var _chunkCWIFVPLRjs = require('./chunk-CWIFVPLR.js');
10
10
 
11
11
 
12
- var _chunkLX5LQXYUjs = require('./chunk-LX5LQXYU.js');
12
+ var _chunkFOEAIF5Ujs = require('./chunk-FOEAIF5U.js');
13
13
 
14
14
 
15
- var _chunkRO347OMDjs = require('./chunk-RO347OMD.js');
15
+ var _chunkLO5ORVRCjs = require('./chunk-LO5ORVRC.js');
16
16
 
17
17
 
18
- var _chunkXMCETCVMjs = require('./chunk-XMCETCVM.js');
18
+ var _chunkB3JZNNZDjs = require('./chunk-B3JZNNZD.js');
19
19
 
20
20
 
21
- var _chunkEBECHU6Mjs = require('./chunk-EBECHU6M.js');
21
+ var _chunkOBT45IWWjs = require('./chunk-OBT45IWW.js');
22
22
 
23
23
 
24
- var _chunkLGC7HQR4js = require('./chunk-LGC7HQR4.js');
24
+ var _chunkHGLRZZ56js = require('./chunk-HGLRZZ56.js');
25
25
 
26
26
 
27
- var _chunkIY3CYGH7js = require('./chunk-IY3CYGH7.js');
27
+ var _chunkQZC2X6NGjs = require('./chunk-QZC2X6NG.js');
28
28
 
29
29
 
30
- var _chunkL5U2LMZRjs = require('./chunk-L5U2LMZR.js');
30
+ var _chunkDLLLH5HNjs = require('./chunk-DLLLH5HN.js');
31
31
 
32
32
  // src/common/endowments/commonEndowmentFactory.ts
33
33
  var commonEndowments = [
@@ -54,21 +54,21 @@ var commonEndowments = [
54
54
  ];
55
55
  var buildCommonEndowments = () => {
56
56
  const endowmentFactories = [
57
- _chunkLGC7HQR4js.crypto_default,
58
- _chunkAZCRNZ5Wjs.interval_default,
59
- _chunkS7LRB72Pjs.math_default,
60
- _chunkZMDJRC2Zjs.network_default,
61
- _chunkXMCETCVMjs.timeout_default,
62
- _chunkLX5LQXYUjs.textDecoder_default,
63
- _chunkRO347OMDjs.textEncoder_default,
64
- _chunkIY3CYGH7js.date_default,
65
- _chunkEBECHU6Mjs.console_default
57
+ _chunkHGLRZZ56js.crypto_default,
58
+ _chunkHKHW6TTXjs.interval_default,
59
+ _chunkMS2LQQYHjs.math_default,
60
+ _chunkCWIFVPLRjs.network_default,
61
+ _chunkB3JZNNZDjs.timeout_default,
62
+ _chunkFOEAIF5Ujs.textDecoder_default,
63
+ _chunkLO5ORVRCjs.textEncoder_default,
64
+ _chunkQZC2X6NGjs.date_default,
65
+ _chunkOBT45IWWjs.console_default
66
66
  ];
67
67
  commonEndowments.forEach((endowmentSpecification) => {
68
68
  const endowment = {
69
69
  names: [endowmentSpecification.name],
70
70
  factory: () => {
71
- const boundEndowment = typeof endowmentSpecification.endowment === "function" && endowmentSpecification.bind ? endowmentSpecification.endowment.bind(_chunkL5U2LMZRjs.rootRealmGlobal) : endowmentSpecification.endowment;
71
+ const boundEndowment = typeof endowmentSpecification.endowment === "function" && endowmentSpecification.bind ? endowmentSpecification.endowment.bind(_chunkDLLLH5HNjs.rootRealmGlobal) : endowmentSpecification.endowment;
72
72
  return {
73
73
  [endowmentSpecification.name]: harden(boundEndowment)
74
74
  };
@@ -83,4 +83,4 @@ var commonEndowmentFactory_default = buildCommonEndowments;
83
83
 
84
84
 
85
85
  exports.commonEndowmentFactory_default = commonEndowmentFactory_default;
86
- //# sourceMappingURL=chunk-QYFJ2LLW.js.map
86
+ //# sourceMappingURL=chunk-44XYIN4N.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withTeardown
3
- } from "./chunk-GH6FPDY5.mjs";
3
+ } from "./chunk-PTCQ2I47.mjs";
4
4
  import {
5
5
  __privateAdd,
6
6
  __privateGet,
@@ -259,4 +259,4 @@ var network_default = endowmentModule;
259
259
  export {
260
260
  network_default
261
261
  };
262
- //# sourceMappingURL=chunk-XGCWN6ZD.mjs.map
262
+ //# sourceMappingURL=chunk-4CGJF3BT.mjs.map
@@ -46,4 +46,4 @@ function executeLockdownEvents() {
46
46
 
47
47
 
48
48
  exports.executeLockdownEvents = executeLockdownEvents;
49
- //# sourceMappingURL=chunk-BE4YFFMX.js.map
49
+ //# sourceMappingURL=chunk-4XRZLEKU.js.map
@@ -13,4 +13,4 @@ var textDecoder_default = endowmentModule;
13
13
  export {
14
14
  textDecoder_default
15
15
  };
16
- //# sourceMappingURL=chunk-FQBU72MW.mjs.map
16
+ //# sourceMappingURL=chunk-53ZULHPK.mjs.map
@@ -9,4 +9,4 @@ var log = createModuleLogger(
9
9
  export {
10
10
  log
11
11
  };
12
- //# sourceMappingURL=chunk-VL3VNUT4.mjs.map
12
+ //# sourceMappingURL=chunk-5DEV3QQU.mjs.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  BaseSnapExecutor
3
- } from "./chunk-OW4IXJ5J.mjs";
3
+ } from "./chunk-QVIHE3WB.mjs";
4
4
  import {
5
5
  log
6
- } from "./chunk-VL3VNUT4.mjs";
6
+ } from "./chunk-5DEV3QQU.mjs";
7
7
 
8
8
  // src/node-thread/ThreadSnapExecutor.ts
9
9
  import ObjectMultiplex from "@metamask/object-multiplex";
@@ -30,4 +30,4 @@ var ThreadSnapExecutor = class _ThreadSnapExecutor extends BaseSnapExecutor {
30
30
  export {
31
31
  ThreadSnapExecutor
32
32
  };
33
- //# sourceMappingURL=chunk-G3NCGVCC.mjs.map
33
+ //# sourceMappingURL=chunk-5FG5IBYT.mjs.map
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
4
 
@@ -105,7 +105,7 @@ onData_fn = function(data) {
105
105
  name: "command",
106
106
  data: {
107
107
  jsonrpc: "2.0",
108
- id: _nullishCoalesce(request.id, () => ( null)),
108
+ id: request.id ?? null,
109
109
  error: {
110
110
  code: -32e3,
111
111
  message: "Internal error"
@@ -180,4 +180,4 @@ var WebWorkerPool = _WebWorkerPool;
180
180
 
181
181
 
182
182
  exports.WebWorkerPool = WebWorkerPool;
183
- //# sourceMappingURL=chunk-HSZIPZHO.js.map
183
+ //# sourceMappingURL=chunk-5STN3QCA.js.map
@@ -70,4 +70,4 @@ _targetWindow = new WeakMap();
70
70
  export {
71
71
  WebViewExecutorStream
72
72
  };
73
- //# sourceMappingURL=chunk-KWFB2KH2.mjs.map
73
+ //# sourceMappingURL=chunk-7AJWXSDQ.mjs.map
@@ -46,4 +46,4 @@ var interval_default = endowmentModule;
46
46
  export {
47
47
  interval_default
48
48
  };
49
- //# sourceMappingURL=chunk-26EFJQDW.mjs.map
49
+ //# sourceMappingURL=chunk-ACK2JBSO.mjs.map
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/common/endowments/timeout.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/common/endowments/timeout.ts
2
2
  var _rpcerrors = require('@metamask/rpc-errors');
3
3
  var MINIMUM_TIMEOUT = 10;
4
4
  var createTimeout = () => {
@@ -14,7 +14,7 @@ var createTimeout = () => {
14
14
  const platformHandle = setTimeout(() => {
15
15
  registeredHandles.delete(handle);
16
16
  handler();
17
- }, Math.max(MINIMUM_TIMEOUT, _nullishCoalesce(timeout, () => ( 0))));
17
+ }, Math.max(MINIMUM_TIMEOUT, timeout ?? 0));
18
18
  registeredHandles.set(handle, platformHandle);
19
19
  return handle;
20
20
  };
@@ -45,4 +45,4 @@ var timeout_default = endowmentModule;
45
45
 
46
46
 
47
47
  exports.timeout_default = timeout_default;
48
- //# sourceMappingURL=chunk-XMCETCVM.js.map
48
+ //# sourceMappingURL=chunk-B3JZNNZD.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createCrypto
3
- } from "./chunk-A7NJQLUA.mjs";
3
+ } from "./chunk-Q42NNJFY.mjs";
4
4
  import {
5
5
  rootRealmGlobal
6
- } from "./chunk-Y7IEFWZU.mjs";
6
+ } from "./chunk-IX5S3V47.mjs";
7
7
 
8
8
  // src/common/endowments/math.ts
9
9
  function createMath() {
@@ -35,4 +35,4 @@ var math_default = endowmentModule;
35
35
  export {
36
36
  math_default
37
37
  };
38
- //# sourceMappingURL=chunk-Z7FBBBME.mjs.map
38
+ //# sourceMappingURL=chunk-BCBKEUCG.mjs.map
@@ -21,4 +21,4 @@ var sortParamKeys = (methodParams, params) => {
21
21
  export {
22
22
  sortParamKeys
23
23
  };
24
- //# sourceMappingURL=chunk-FNRATYYY.mjs.map
24
+ //# sourceMappingURL=chunk-BTEAZZKP.mjs.map
@@ -21,4 +21,4 @@ var sortParamKeys = (methodParams, params) => {
21
21
 
22
22
 
23
23
  exports.sortParamKeys = sortParamKeys;
24
- //# sourceMappingURL=chunk-RWBJNNGH.js.map
24
+ //# sourceMappingURL=chunk-CV5LC4PP.js.map
@@ -45,4 +45,4 @@ var timeout_default = endowmentModule;
45
45
  export {
46
46
  timeout_default
47
47
  };
48
- //# sourceMappingURL=chunk-YC3HWHJV.mjs.map
48
+ //# sourceMappingURL=chunk-CWCVTRNZ.mjs.map
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkCCBKFCGGjs = require('./chunk-CCBKFCGG.js');
3
+ var _chunkZ4WSS7YZjs = require('./chunk-Z4WSS7YZ.js');
4
4
 
5
5
 
6
6
 
@@ -49,7 +49,7 @@ var _ResponseWrapper = class _ResponseWrapper {
49
49
  return _chunkEXN2TFDJjs.__privateGet.call(void 0, this, _ogResponse).url;
50
50
  }
51
51
  async text() {
52
- return await _chunkCCBKFCGGjs.withTeardown.call(void 0,
52
+ return await _chunkZ4WSS7YZjs.withTeardown.call(void 0,
53
53
  (async () => {
54
54
  await _chunkEXN2TFDJjs.__privateGet.call(void 0, this, _onStart).call(this);
55
55
  try {
@@ -62,7 +62,7 @@ var _ResponseWrapper = class _ResponseWrapper {
62
62
  );
63
63
  }
64
64
  async arrayBuffer() {
65
- return await _chunkCCBKFCGGjs.withTeardown.call(void 0,
65
+ return await _chunkZ4WSS7YZjs.withTeardown.call(void 0,
66
66
  (async () => {
67
67
  await _chunkEXN2TFDJjs.__privateGet.call(void 0, this, _onStart).call(this);
68
68
  try {
@@ -75,7 +75,7 @@ var _ResponseWrapper = class _ResponseWrapper {
75
75
  );
76
76
  }
77
77
  async blob() {
78
- return await _chunkCCBKFCGGjs.withTeardown.call(void 0,
78
+ return await _chunkZ4WSS7YZjs.withTeardown.call(void 0,
79
79
  (async () => {
80
80
  await _chunkEXN2TFDJjs.__privateGet.call(void 0, this, _onStart).call(this);
81
81
  try {
@@ -97,7 +97,7 @@ var _ResponseWrapper = class _ResponseWrapper {
97
97
  );
98
98
  }
99
99
  async formData() {
100
- return await _chunkCCBKFCGGjs.withTeardown.call(void 0,
100
+ return await _chunkZ4WSS7YZjs.withTeardown.call(void 0,
101
101
  (async () => {
102
102
  await _chunkEXN2TFDJjs.__privateGet.call(void 0, this, _onStart).call(this);
103
103
  try {
@@ -110,7 +110,7 @@ var _ResponseWrapper = class _ResponseWrapper {
110
110
  );
111
111
  }
112
112
  async json() {
113
- return await _chunkCCBKFCGGjs.withTeardown.call(void 0,
113
+ return await _chunkZ4WSS7YZjs.withTeardown.call(void 0,
114
114
  (async () => {
115
115
  await _chunkEXN2TFDJjs.__privateGet.call(void 0, this, _onStart).call(this);
116
116
  try {
@@ -138,7 +138,7 @@ var createNetwork = ({ notify } = {}) => {
138
138
  );
139
139
  const _fetch = async (input, init) => {
140
140
  const abortController = new AbortController();
141
- if (_optionalChain([init, 'optionalAccess', _ => _.signal]) !== null && _optionalChain([init, 'optionalAccess', _2 => _2.signal]) !== void 0) {
141
+ if (init?.signal !== null && init?.signal !== void 0) {
142
142
  const originalSignal = init.signal;
143
143
  originalSignal.addEventListener(
144
144
  "abort",
@@ -170,7 +170,7 @@ var createNetwork = ({ notify } = {}) => {
170
170
  };
171
171
  let res;
172
172
  let openFetchConnection;
173
- return await _chunkCCBKFCGGjs.withTeardown.call(void 0,
173
+ return await _chunkZ4WSS7YZjs.withTeardown.call(void 0,
174
174
  (async () => {
175
175
  try {
176
176
  await notify({
@@ -186,7 +186,7 @@ var createNetwork = ({ notify } = {}) => {
186
186
  abortController.abort();
187
187
  try {
188
188
  await fetchPromise;
189
- } catch (e) {
189
+ } catch {
190
190
  }
191
191
  }
192
192
  };
@@ -213,8 +213,8 @@ var createNetwork = ({ notify } = {}) => {
213
213
  /* istanbul ignore next: see it.todo('can be torn down during body read') test */
214
214
  async () => {
215
215
  try {
216
- await _optionalChain([body, 'access', _3 => _3.deref, 'call', _4 => _4(), 'optionalAccess', _5 => _5.cancel, 'call', _6 => _6()]);
217
- } catch (e2) {
216
+ await body.deref()?.cancel();
217
+ } catch {
218
218
  }
219
219
  }
220
220
  )
@@ -259,4 +259,4 @@ var network_default = endowmentModule;
259
259
 
260
260
 
261
261
  exports.network_default = network_default;
262
- //# sourceMappingURL=chunk-ZMDJRC2Z.js.map
262
+ //# sourceMappingURL=chunk-CWIFVPLR.js.map
@@ -144,4 +144,4 @@ var OkResponseStruct = _superstruct.object.call(void 0, {
144
144
 
145
145
 
146
146
  exports.JsonRpcRequestWithoutIdStruct = JsonRpcRequestWithoutIdStruct; exports.EndowmentStruct = EndowmentStruct; exports.isEndowment = isEndowment; exports.isEndowmentsArray = isEndowmentsArray; exports.PingRequestArgumentsStruct = PingRequestArgumentsStruct; exports.TerminateRequestArgumentsStruct = TerminateRequestArgumentsStruct; exports.ExecuteSnapRequestArgumentsStruct = ExecuteSnapRequestArgumentsStruct; exports.SnapRpcRequestArgumentsStruct = SnapRpcRequestArgumentsStruct; exports.OnTransactionRequestArgumentsStruct = OnTransactionRequestArgumentsStruct; exports.assertIsOnTransactionRequestArguments = assertIsOnTransactionRequestArguments; exports.OnSignatureRequestArgumentsStruct = OnSignatureRequestArgumentsStruct; exports.assertIsOnSignatureRequestArguments = assertIsOnSignatureRequestArguments; exports.OnNameLookupRequestArgumentsStruct = OnNameLookupRequestArgumentsStruct; exports.assertIsOnNameLookupRequestArguments = assertIsOnNameLookupRequestArguments; exports.OnUserInputArgumentsStruct = OnUserInputArgumentsStruct; exports.assertIsOnUserInputRequestArguments = assertIsOnUserInputRequestArguments;
147
- //# sourceMappingURL=chunk-SWINKAMI.js.map
147
+ //# sourceMappingURL=chunk-DFPM46ZF.js.map
@@ -23,4 +23,4 @@ var rootRealmGlobalName = _rootRealmGlobalName;
23
23
 
24
24
 
25
25
  exports.rootRealmGlobal = rootRealmGlobal; exports.rootRealmGlobalName = rootRealmGlobalName;
26
- //# sourceMappingURL=chunk-L5U2LMZR.js.map
26
+ //# sourceMappingURL=chunk-DLLLH5HN.js.map
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkIU54VPNOjs = require('./chunk-IU54VPNO.js');
3
+ var _chunkMOXNHXPGjs = require('./chunk-MOXNHXPG.js');
4
4
 
5
5
 
6
6
 
@@ -8,26 +8,26 @@ var _chunkIU54VPNOjs = require('./chunk-IU54VPNO.js');
8
8
 
9
9
 
10
10
 
11
- var _chunkCCBKFCGGjs = require('./chunk-CCBKFCGG.js');
11
+ var _chunkZ4WSS7YZjs = require('./chunk-Z4WSS7YZ.js');
12
12
 
13
13
 
14
- var _chunkXKY46YTJjs = require('./chunk-XKY46YTJ.js');
14
+ var _chunkZ7BOREC4js = require('./chunk-Z7BOREC4.js');
15
15
 
16
16
 
17
- var _chunkAJFPA6MIjs = require('./chunk-AJFPA6MI.js');
17
+ var _chunkOLASO3O4js = require('./chunk-OLASO3O4.js');
18
18
 
19
19
 
20
20
 
21
21
 
22
22
 
23
- var _chunkSWINKAMIjs = require('./chunk-SWINKAMI.js');
23
+ var _chunkDFPM46ZFjs = require('./chunk-DFPM46ZF.js');
24
24
 
25
25
 
26
26
 
27
- var _chunk5DIRYAYOjs = require('./chunk-5DIRYAYO.js');
27
+ var _chunk2VA6RAEEjs = require('./chunk-2VA6RAEE.js');
28
28
 
29
29
 
30
- var _chunkRWBJNNGHjs = require('./chunk-RWBJNNGH.js');
30
+ var _chunkCV5LC4PPjs = require('./chunk-CV5LC4PP.js');
31
31
 
32
32
 
33
33
 
@@ -63,19 +63,19 @@ var unhandledError = _rpcerrors.rpcErrors.internal({
63
63
  }).serialize();
64
64
  var EXECUTION_ENVIRONMENT_METHODS = {
65
65
  ping: {
66
- struct: _chunkSWINKAMIjs.PingRequestArgumentsStruct,
66
+ struct: _chunkDFPM46ZFjs.PingRequestArgumentsStruct,
67
67
  params: []
68
68
  },
69
69
  executeSnap: {
70
- struct: _chunkSWINKAMIjs.ExecuteSnapRequestArgumentsStruct,
70
+ struct: _chunkDFPM46ZFjs.ExecuteSnapRequestArgumentsStruct,
71
71
  params: ["snapId", "sourceCode", "endowments"]
72
72
  },
73
73
  terminate: {
74
- struct: _chunkSWINKAMIjs.TerminateRequestArgumentsStruct,
74
+ struct: _chunkDFPM46ZFjs.TerminateRequestArgumentsStruct,
75
75
  params: []
76
76
  },
77
77
  snapRpc: {
78
- struct: _chunkSWINKAMIjs.SnapRpcRequestArgumentsStruct,
78
+ struct: _chunkDFPM46ZFjs.SnapRpcRequestArgumentsStruct,
79
79
  params: ["target", "handler", "origin", "request"]
80
80
  }
81
81
  };
@@ -97,11 +97,11 @@ var BaseSnapExecutor = class {
97
97
  });
98
98
  });
99
99
  this.rpcStream = rpcStream;
100
- this.methods = _chunkAJFPA6MIjs.getCommandMethodImplementations.call(void 0,
100
+ this.methods = _chunkOLASO3O4js.getCommandMethodImplementations.call(void 0,
101
101
  this.startSnap.bind(this),
102
102
  async (target, handlerType, args) => {
103
103
  const data = this.snapData.get(target);
104
- const handler = _optionalChain([data, 'optionalAccess', _2 => _2.exports, 'access', _3 => _3[handlerType]]);
104
+ const handler = data?.exports[handlerType];
105
105
  const { required } = _snapsutils.SNAP_EXPORTS[handlerType];
106
106
  _utils.assert.call(void 0,
107
107
  !required || handler !== void 0,
@@ -187,7 +187,7 @@ var BaseSnapExecutor = class {
187
187
  return;
188
188
  }
189
189
  const methodObject = EXECUTION_ENVIRONMENT_METHODS[method];
190
- const paramsAsArray = _chunkRWBJNNGHjs.sortParamKeys.call(void 0, methodObject.params, params);
190
+ const paramsAsArray = _chunkCV5LC4PPjs.sortParamKeys.call(void 0, methodObject.params, params);
191
191
  const [error] = _superstruct.validate.call(void 0, paramsAsArray, methodObject.struct);
192
192
  if (error) {
193
193
  await _chunkEXN2TFDJjs.__privateMethod.call(void 0, this, _respond, respond_fn).call(this, id, {
@@ -221,12 +221,12 @@ var BaseSnapExecutor = class {
221
221
  * @param _endowments - An array of the names of the endowments.
222
222
  */
223
223
  async startSnap(snapId, sourceCode, _endowments) {
224
- _chunkXKY46YTJjs.log.call(void 0, `Starting snap '${snapId}' in worker.`);
224
+ _chunkZ7BOREC4js.log.call(void 0, `Starting snap '${snapId}' in worker.`);
225
225
  if (this.snapPromiseErrorHandler) {
226
- _chunk5DIRYAYOjs.removeEventListener.call(void 0, "unhandledrejection", this.snapPromiseErrorHandler);
226
+ _chunk2VA6RAEEjs.removeEventListener.call(void 0, "unhandledrejection", this.snapPromiseErrorHandler);
227
227
  }
228
228
  if (this.snapErrorHandler) {
229
- _chunk5DIRYAYOjs.removeEventListener.call(void 0, "error", this.snapErrorHandler);
229
+ _chunk2VA6RAEEjs.removeEventListener.call(void 0, "error", this.snapErrorHandler);
230
230
  }
231
231
  this.snapErrorHandler = (error) => {
232
232
  this.errorHandler(error.error, { snapId });
@@ -245,7 +245,7 @@ var BaseSnapExecutor = class {
245
245
  const ethereum = this.createEIP1193Provider(provider);
246
246
  const snapModule = { exports: {} };
247
247
  try {
248
- const { endowments, teardown: endowmentTeardown } = _chunkIU54VPNOjs.createEndowments.call(void 0, {
248
+ const { endowments, teardown: endowmentTeardown } = _chunkMOXNHXPGjs.createEndowments.call(void 0, {
249
249
  snap,
250
250
  ethereum,
251
251
  snapId,
@@ -257,8 +257,8 @@ var BaseSnapExecutor = class {
257
257
  runningEvaluations: /* @__PURE__ */ new Set(),
258
258
  exports: {}
259
259
  });
260
- _chunk5DIRYAYOjs.addEventListener.call(void 0, "unhandledRejection", this.snapPromiseErrorHandler);
261
- _chunk5DIRYAYOjs.addEventListener.call(void 0, "error", this.snapErrorHandler);
260
+ _chunk2VA6RAEEjs.addEventListener.call(void 0, "unhandledRejection", this.snapPromiseErrorHandler);
261
+ _chunk2VA6RAEEjs.addEventListener.call(void 0, "error", this.snapErrorHandler);
262
262
  const compartment = new Compartment({
263
263
  ...endowments,
264
264
  module: snapModule,
@@ -315,9 +315,9 @@ var BaseSnapExecutor = class {
315
315
  createSnapGlobal(provider) {
316
316
  const originalRequest = provider.request.bind(provider);
317
317
  const request = async (args) => {
318
- const sanitizedArgs = _chunkCCBKFCGGjs.sanitizeRequestArguments.call(void 0, args);
319
- _chunkCCBKFCGGjs.assertSnapOutboundRequest.call(void 0, sanitizedArgs);
320
- return await _chunkCCBKFCGGjs.withTeardown.call(void 0,
318
+ const sanitizedArgs = _chunkZ4WSS7YZjs.sanitizeRequestArguments.call(void 0, args);
319
+ _chunkZ4WSS7YZjs.assertSnapOutboundRequest.call(void 0, sanitizedArgs);
320
+ return await _chunkZ4WSS7YZjs.withTeardown.call(void 0,
321
321
  (async () => {
322
322
  await _chunkEXN2TFDJjs.__privateMethod.call(void 0, this, _notify, notify_fn).call(this, {
323
323
  method: "OutboundRequest",
@@ -360,9 +360,9 @@ var BaseSnapExecutor = class {
360
360
  createEIP1193Provider(provider) {
361
361
  const originalRequest = provider.request.bind(provider);
362
362
  const request = async (args) => {
363
- const sanitizedArgs = _chunkCCBKFCGGjs.sanitizeRequestArguments.call(void 0, args);
364
- _chunkCCBKFCGGjs.assertEthereumOutboundRequest.call(void 0, sanitizedArgs);
365
- return await _chunkCCBKFCGGjs.withTeardown.call(void 0,
363
+ const sanitizedArgs = _chunkZ4WSS7YZjs.sanitizeRequestArguments.call(void 0, args);
364
+ _chunkZ4WSS7YZjs.assertEthereumOutboundRequest.call(void 0, sanitizedArgs);
365
+ return await _chunkZ4WSS7YZjs.withTeardown.call(void 0,
366
366
  (async () => {
367
367
  await _chunkEXN2TFDJjs.__privateMethod.call(void 0, this, _notify, notify_fn).call(this, {
368
368
  method: "OutboundRequest",
@@ -380,7 +380,7 @@ var BaseSnapExecutor = class {
380
380
  this
381
381
  );
382
382
  };
383
- const streamProviderProxy = _chunkCCBKFCGGjs.proxyStreamProvider.call(void 0, provider, request);
383
+ const streamProviderProxy = _chunkZ4WSS7YZjs.proxyStreamProvider.call(void 0, provider, request);
384
384
  return harden(streamProviderProxy);
385
385
  }
386
386
  /**
@@ -447,7 +447,7 @@ write_fn = async function(chunk) {
447
447
  };
448
448
  _notify = new WeakSet();
449
449
  notify_fn = async function(notification) {
450
- if (!_chunkCCBKFCGGjs.isValidResponse.call(void 0, notification)) {
450
+ if (!_chunkZ4WSS7YZjs.isValidResponse.call(void 0, notification)) {
451
451
  throw _rpcerrors.rpcErrors.internal(
452
452
  "JSON-RPC notifications must be JSON serializable objects smaller than 64 MB."
453
453
  );
@@ -459,7 +459,7 @@ notify_fn = async function(notification) {
459
459
  };
460
460
  _respond = new WeakSet();
461
461
  respond_fn = async function(id, response) {
462
- if (!_chunkCCBKFCGGjs.isValidResponse.call(void 0, response)) {
462
+ if (!_chunkZ4WSS7YZjs.isValidResponse.call(void 0, response)) {
463
463
  await _chunkEXN2TFDJjs.__privateMethod.call(void 0, this, _write, write_fn).call(this, {
464
464
  error: _rpcerrors.serializeError.call(void 0,
465
465
  _rpcerrors.rpcErrors.internal(
@@ -481,4 +481,4 @@ respond_fn = async function(id, response) {
481
481
 
482
482
 
483
483
  exports.BaseSnapExecutor = BaseSnapExecutor;
484
- //# sourceMappingURL=chunk-L4G6IIWG.js.map
484
+ //# sourceMappingURL=chunk-DTF6YTIS.js.map