@metamask/snaps-utils 7.0.0 → 7.0.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 (281) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/dist/array.js +2 -2
  3. package/dist/array.mjs +2 -2
  4. package/dist/auxiliary-files.js +6 -6
  5. package/dist/auxiliary-files.mjs +6 -6
  6. package/dist/base64.js +5 -5
  7. package/dist/base64.mjs +5 -5
  8. package/dist/bytes.js +4 -4
  9. package/dist/bytes.mjs +4 -4
  10. package/dist/caveats.js +2 -2
  11. package/dist/caveats.mjs +2 -2
  12. package/dist/checksum.js +5 -5
  13. package/dist/checksum.mjs +5 -5
  14. package/dist/{chunk-Y3F7VUZB.mjs → chunk-224DMTNJ.mjs} +10 -10
  15. package/dist/{chunk-FJH6DDEL.mjs → chunk-2IWSQJKQ.mjs} +3 -3
  16. package/dist/{chunk-2QS3W66J.js → chunk-2LBN5T56.js} +4 -4
  17. package/dist/{chunk-3TH3NLQL.js → chunk-2PCPD5XY.js} +6 -6
  18. package/dist/{chunk-KWQKGJSV.js → chunk-3SOYDY4W.js} +1 -1
  19. package/dist/{chunk-ZXCNX3ZB.mjs → chunk-44GPX66J.mjs} +1 -1
  20. package/dist/{chunk-WDGBH5CP.js → chunk-44VFHYJO.js} +9 -9
  21. package/dist/chunk-44VFHYJO.js.map +1 -0
  22. package/dist/{chunk-R4BBIGBN.js → chunk-473MIETW.js} +3 -3
  23. package/dist/{chunk-KEXZDQAN.js → chunk-4BDR6KRH.js} +2 -2
  24. package/dist/chunk-4CMD46B2.js +1 -0
  25. package/dist/{chunk-TUAHXE75.mjs → chunk-5R7UF7KM.mjs} +1 -1
  26. package/dist/{chunk-P5V6S2PA.mjs → chunk-63OXILAY.mjs} +2 -2
  27. package/dist/{chunk-QWEXXUTO.mjs → chunk-6CHO3LOX.mjs} +1 -1
  28. package/dist/{chunk-B3YQVRPE.js → chunk-6LOYTBS3.js} +4 -4
  29. package/dist/{chunk-VGWELVCX.mjs → chunk-6YRUDGNL.mjs} +2 -2
  30. package/dist/{chunk-7H5TGXZ5.js → chunk-772OPTGX.js} +3 -3
  31. package/dist/{chunk-XC5E26VE.mjs → chunk-7LG4D4XA.mjs} +1 -1
  32. package/dist/chunk-7LOABHVW.js +1 -0
  33. package/dist/chunk-7MTAHOWC.mjs +1 -0
  34. package/dist/{chunk-F33RMB76.js → chunk-7P62OIGX.js} +7 -7
  35. package/dist/{chunk-32B4YQM7.mjs → chunk-7Y3WSN44.mjs} +3 -3
  36. package/dist/chunk-A3RRMELT.mjs +1 -0
  37. package/dist/{chunk-GMC2A3D7.js → chunk-A6E325SZ.js} +3 -3
  38. package/dist/{chunk-RS5HE55U.js → chunk-AFQY2CNY.js} +3 -3
  39. package/dist/{chunk-I3BUOULW.js → chunk-AOGVLPQZ.js} +1 -1
  40. package/dist/{chunk-QF3LHIJ5.mjs → chunk-AS5P6JRP.mjs} +1 -1
  41. package/dist/{chunk-MJABESWH.js → chunk-ASZWZ7JT.js} +1 -1
  42. package/dist/{chunk-3ZSMMNQB.mjs → chunk-BGSO2GQC.mjs} +1 -1
  43. package/dist/{chunk-4UMDRHDR.js → chunk-CMOSYNZR.js} +2 -2
  44. package/dist/{chunk-GK4IJQVW.js → chunk-CNNMLOQ6.js} +43 -43
  45. package/dist/{chunk-ZRVOIW3H.js → chunk-CQRPSEH3.js} +3 -3
  46. package/dist/{chunk-DKSB4FMW.mjs → chunk-DKDGMZFU.mjs} +1 -1
  47. package/dist/{chunk-IWENO6LT.js → chunk-E3BDBG6T.js} +1 -1
  48. package/dist/{chunk-YLT6CNSL.mjs → chunk-EA2FOAEG.mjs} +1 -1
  49. package/dist/chunk-EFRPCO3C.js +1 -0
  50. package/dist/{chunk-OQSLMZJN.js → chunk-ENKAY3PI.js} +18 -18
  51. package/dist/{chunk-7T3N2ZGQ.mjs → chunk-EXUEHPZ4.mjs} +1 -1
  52. package/dist/{chunk-JGMGNLZW.mjs → chunk-FOWIC2SO.mjs} +2 -2
  53. package/dist/{chunk-2IVFF3AA.mjs → chunk-GTAYOKI4.mjs} +2 -2
  54. package/dist/{chunk-6H32HLTZ.js → chunk-HF7HUZ5Z.js} +1 -1
  55. package/dist/{chunk-LHIPBIPS.mjs → chunk-HJRCBSNA.mjs} +2 -2
  56. package/dist/chunk-HJYRGKCX.js +50 -0
  57. package/dist/chunk-HYF7Q6VY.mjs +1 -0
  58. package/dist/{chunk-Z4J4GUGG.mjs → chunk-I77AVJKV.mjs} +1 -1
  59. package/dist/{chunk-HOTDTMNP.mjs → chunk-IGMAXVPP.mjs} +2 -2
  60. package/dist/{chunk-7KKLGQNE.js → chunk-IHQPAJ2B.js} +3 -3
  61. package/dist/{chunk-6WBLB5BX.js → chunk-IJX3CXOY.js} +1 -1
  62. package/dist/{chunk-WJOAEPZ7.js → chunk-IPOE62V4.js} +1 -1
  63. package/dist/{chunk-7XA5VYYV.mjs → chunk-IV3FSWZ7.mjs} +1 -1
  64. package/dist/{chunk-7PNGOFLU.js → chunk-IXBJNVHK.js} +3 -3
  65. package/dist/chunk-JI5NQ2C3.mjs +1 -0
  66. package/dist/{chunk-4GBOSMF7.mjs → chunk-JMDSN227.mjs} +2 -10
  67. package/dist/{chunk-XRGYWWT7.js → chunk-K6BCBPXF.js} +1 -1
  68. package/dist/{chunk-2G4HD42C.mjs → chunk-KMLVVVK3.mjs} +2 -2
  69. package/dist/{chunk-ZLFA4R5X.js → chunk-LBRWAC27.js} +3 -3
  70. package/dist/{chunk-HWFLO7W5.mjs → chunk-LCWDLIK5.mjs} +8 -8
  71. package/dist/{chunk-XEY3KVEH.js → chunk-LEKZPKS2.js} +1 -1
  72. package/dist/{chunk-TURGGK5F.mjs → chunk-LSPOXPJJ.mjs} +9 -5
  73. package/dist/chunk-LSPOXPJJ.mjs.map +1 -0
  74. package/dist/{chunk-UGQQ5DJ4.mjs → chunk-MCEKOGEG.mjs} +1 -1
  75. package/dist/{chunk-224S5XKL.js → chunk-MLOQHUOY.js} +5 -5
  76. package/dist/{chunk-QYFDFOWT.js → chunk-N722KRZW.js} +1 -1
  77. package/dist/{chunk-Q7FGULTV.js → chunk-NUCLSR2G.js} +1 -1
  78. package/dist/{chunk-XKXHM3PC.mjs → chunk-P252LKUT.mjs} +1 -1
  79. package/dist/{chunk-IUNNN6HN.mjs → chunk-PJMEJVOB.mjs} +1 -1
  80. package/dist/{chunk-RRPU7M4Y.js → chunk-PLBSSUVY.js} +1 -1
  81. package/dist/chunk-Q7RCL5IE.js +30 -0
  82. package/dist/{chunk-R7UAMO2U.js → chunk-QSCKTRRU.js} +3 -3
  83. package/dist/{chunk-H34N3OWO.mjs → chunk-QX6MAFJU.mjs} +2 -2
  84. package/dist/{chunk-O3XKEEJV.mjs → chunk-QYPLUMB7.mjs} +2 -2
  85. package/dist/chunk-QYPLUMB7.mjs.map +1 -0
  86. package/dist/chunk-RAZ7XG4Z.mjs +1 -0
  87. package/dist/chunk-RAZ7XG4Z.mjs.map +1 -0
  88. package/dist/{chunk-6CTV7VW5.mjs → chunk-SRMDDOVO.mjs} +1 -1
  89. package/dist/chunk-T3VM5YXY.js +1 -0
  90. package/dist/{chunk-FTY3BOF7.js → chunk-T3YY4JIJ.js} +1 -1
  91. package/dist/{chunk-ZVXX2CTH.mjs → chunk-T6FWIDA6.mjs} +1 -1
  92. package/dist/chunk-TFP64TMV.js +1 -0
  93. package/dist/{chunk-H636DAOG.js → chunk-TG4BDSYJ.js} +12 -12
  94. package/dist/{chunk-43EBXDVP.mjs → chunk-UMZNVWEM.mjs} +1 -1
  95. package/dist/{chunk-3SARO5TJ.mjs → chunk-UW74NLTC.mjs} +1 -1
  96. package/dist/{chunk-GW5NQXN4.mjs → chunk-VWGXNUMD.mjs} +2 -2
  97. package/dist/{chunk-N52KMB25.mjs → chunk-WEOCOYES.mjs} +2 -2
  98. package/dist/{chunk-4IKNNAVC.mjs → chunk-WF56W2AR.mjs} +5 -5
  99. package/dist/{chunk-VMUXXXJC.js → chunk-X44Z53IG.js} +5 -5
  100. package/dist/{chunk-B2DMAQNK.mjs → chunk-Z2JQNSVL.mjs} +1 -1
  101. package/dist/{chunk-LOW2T4MV.mjs → chunk-ZJRWU4AJ.mjs} +2 -2
  102. package/dist/{chunk-MSUZTHYT.js → chunk-ZT3KKTS2.js} +1 -1
  103. package/dist/cronjob.js +2 -2
  104. package/dist/cronjob.mjs +2 -2
  105. package/dist/deep-clone.js +2 -2
  106. package/dist/deep-clone.mjs +2 -2
  107. package/dist/default-endowments.js +2 -2
  108. package/dist/default-endowments.mjs +2 -2
  109. package/dist/derivation-paths.js +3 -3
  110. package/dist/derivation-paths.mjs +3 -3
  111. package/dist/entropy.js +2 -2
  112. package/dist/entropy.mjs +2 -2
  113. package/dist/errors.js +2 -2
  114. package/dist/errors.mjs +2 -2
  115. package/dist/eval-worker.js +5 -5
  116. package/dist/eval-worker.mjs +4 -4
  117. package/dist/eval.js +9 -9
  118. package/dist/eval.mjs +9 -9
  119. package/dist/fs.js +8 -8
  120. package/dist/fs.mjs +8 -8
  121. package/dist/handler-types.js +2 -2
  122. package/dist/handler-types.mjs +2 -2
  123. package/dist/handlers.js +3 -3
  124. package/dist/handlers.mjs +3 -3
  125. package/dist/icon.js +2 -2
  126. package/dist/icon.mjs +2 -2
  127. package/dist/iframe.js +2 -2
  128. package/dist/iframe.mjs +2 -2
  129. package/dist/index.executionenv.js +8 -8
  130. package/dist/index.executionenv.mjs +8 -8
  131. package/dist/index.js +35 -35
  132. package/dist/index.mjs +35 -35
  133. package/dist/json-rpc.js +2 -2
  134. package/dist/json-rpc.mjs +2 -2
  135. package/dist/json.js +2 -2
  136. package/dist/json.mjs +2 -2
  137. package/dist/localization.js +3 -3
  138. package/dist/localization.mjs +3 -3
  139. package/dist/logging.js +2 -2
  140. package/dist/logging.mjs +2 -2
  141. package/dist/manifest/index.js +15 -15
  142. package/dist/manifest/index.mjs +15 -15
  143. package/dist/manifest/manifest.js +22 -22
  144. package/dist/manifest/manifest.mjs +22 -22
  145. package/dist/manifest/node.js +24 -24
  146. package/dist/manifest/node.mjs +24 -24
  147. package/dist/manifest/validation.js +14 -14
  148. package/dist/manifest/validation.mjs +14 -14
  149. package/dist/mock.js +3 -3
  150. package/dist/mock.mjs +3 -3
  151. package/dist/namespace.js +2 -2
  152. package/dist/namespace.mjs +2 -2
  153. package/dist/node.js +43 -43
  154. package/dist/node.mjs +43 -43
  155. package/dist/npm.js +22 -22
  156. package/dist/npm.mjs +22 -22
  157. package/dist/path.js +2 -2
  158. package/dist/path.mjs +2 -2
  159. package/dist/post-process.js +2 -2
  160. package/dist/post-process.mjs +2 -2
  161. package/dist/snaps.js +8 -8
  162. package/dist/snaps.mjs +8 -8
  163. package/dist/strings.js +2 -2
  164. package/dist/strings.mjs +2 -2
  165. package/dist/structs.js +3 -3
  166. package/dist/structs.mjs +3 -3
  167. package/dist/tsconfig.build.tsbuildinfo +1 -1
  168. package/dist/types.js +2 -2
  169. package/dist/types.mjs +2 -2
  170. package/dist/ui.js +2 -2
  171. package/dist/ui.mjs +2 -2
  172. package/dist/validation.js +18 -18
  173. package/dist/validation.mjs +18 -18
  174. package/dist/versions.js +2 -2
  175. package/dist/versions.mjs +2 -2
  176. package/dist/virtual-file/VirtualFile.js +3 -3
  177. package/dist/virtual-file/VirtualFile.mjs +3 -3
  178. package/dist/virtual-file/index.js +4 -4
  179. package/dist/virtual-file/index.mjs +4 -4
  180. package/dist/virtual-file/node.js +6 -6
  181. package/dist/virtual-file/node.mjs +6 -6
  182. package/dist/virtual-file/toVirtualFile.js +4 -4
  183. package/dist/virtual-file/toVirtualFile.mjs +4 -4
  184. package/package.json +2 -2
  185. package/dist/chunk-2XF32FCF.js +0 -1
  186. package/dist/chunk-4GBOSMF7.mjs.map +0 -1
  187. package/dist/chunk-DK3IYVMP.mjs +0 -1
  188. package/dist/chunk-IIDK6BRC.mjs +0 -1
  189. package/dist/chunk-JV7OA3FD.js +0 -1
  190. package/dist/chunk-LEFOMYX3.mjs +0 -1
  191. package/dist/chunk-MYSBDK36.mjs +0 -1
  192. package/dist/chunk-O3XKEEJV.mjs.map +0 -1
  193. package/dist/chunk-O4PW77JW.mjs +0 -1
  194. package/dist/chunk-Q5T57UNN.js +0 -1
  195. package/dist/chunk-QJTAFTW7.js +0 -30
  196. package/dist/chunk-TURGGK5F.mjs.map +0 -1
  197. package/dist/chunk-WDGBH5CP.js.map +0 -1
  198. package/dist/chunk-XDEHYKW2.js +0 -1
  199. package/dist/chunk-XWFKTDB3.js +0 -50
  200. package/dist/chunk-YF4PGFCO.js +0 -1
  201. /package/dist/{chunk-Y3F7VUZB.mjs.map → chunk-224DMTNJ.mjs.map} +0 -0
  202. /package/dist/{chunk-FJH6DDEL.mjs.map → chunk-2IWSQJKQ.mjs.map} +0 -0
  203. /package/dist/{chunk-2QS3W66J.js.map → chunk-2LBN5T56.js.map} +0 -0
  204. /package/dist/{chunk-3TH3NLQL.js.map → chunk-2PCPD5XY.js.map} +0 -0
  205. /package/dist/{chunk-KWQKGJSV.js.map → chunk-3SOYDY4W.js.map} +0 -0
  206. /package/dist/{chunk-ZXCNX3ZB.mjs.map → chunk-44GPX66J.mjs.map} +0 -0
  207. /package/dist/{chunk-R4BBIGBN.js.map → chunk-473MIETW.js.map} +0 -0
  208. /package/dist/{chunk-KEXZDQAN.js.map → chunk-4BDR6KRH.js.map} +0 -0
  209. /package/dist/{chunk-2XF32FCF.js.map → chunk-4CMD46B2.js.map} +0 -0
  210. /package/dist/{chunk-TUAHXE75.mjs.map → chunk-5R7UF7KM.mjs.map} +0 -0
  211. /package/dist/{chunk-P5V6S2PA.mjs.map → chunk-63OXILAY.mjs.map} +0 -0
  212. /package/dist/{chunk-QWEXXUTO.mjs.map → chunk-6CHO3LOX.mjs.map} +0 -0
  213. /package/dist/{chunk-B3YQVRPE.js.map → chunk-6LOYTBS3.js.map} +0 -0
  214. /package/dist/{chunk-VGWELVCX.mjs.map → chunk-6YRUDGNL.mjs.map} +0 -0
  215. /package/dist/{chunk-7H5TGXZ5.js.map → chunk-772OPTGX.js.map} +0 -0
  216. /package/dist/{chunk-XC5E26VE.mjs.map → chunk-7LG4D4XA.mjs.map} +0 -0
  217. /package/dist/{chunk-JV7OA3FD.js.map → chunk-7LOABHVW.js.map} +0 -0
  218. /package/dist/{chunk-DK3IYVMP.mjs.map → chunk-7MTAHOWC.mjs.map} +0 -0
  219. /package/dist/{chunk-F33RMB76.js.map → chunk-7P62OIGX.js.map} +0 -0
  220. /package/dist/{chunk-32B4YQM7.mjs.map → chunk-7Y3WSN44.mjs.map} +0 -0
  221. /package/dist/{chunk-IIDK6BRC.mjs.map → chunk-A3RRMELT.mjs.map} +0 -0
  222. /package/dist/{chunk-GMC2A3D7.js.map → chunk-A6E325SZ.js.map} +0 -0
  223. /package/dist/{chunk-RS5HE55U.js.map → chunk-AFQY2CNY.js.map} +0 -0
  224. /package/dist/{chunk-I3BUOULW.js.map → chunk-AOGVLPQZ.js.map} +0 -0
  225. /package/dist/{chunk-QF3LHIJ5.mjs.map → chunk-AS5P6JRP.mjs.map} +0 -0
  226. /package/dist/{chunk-MJABESWH.js.map → chunk-ASZWZ7JT.js.map} +0 -0
  227. /package/dist/{chunk-3ZSMMNQB.mjs.map → chunk-BGSO2GQC.mjs.map} +0 -0
  228. /package/dist/{chunk-4UMDRHDR.js.map → chunk-CMOSYNZR.js.map} +0 -0
  229. /package/dist/{chunk-GK4IJQVW.js.map → chunk-CNNMLOQ6.js.map} +0 -0
  230. /package/dist/{chunk-ZRVOIW3H.js.map → chunk-CQRPSEH3.js.map} +0 -0
  231. /package/dist/{chunk-DKSB4FMW.mjs.map → chunk-DKDGMZFU.mjs.map} +0 -0
  232. /package/dist/{chunk-IWENO6LT.js.map → chunk-E3BDBG6T.js.map} +0 -0
  233. /package/dist/{chunk-YLT6CNSL.mjs.map → chunk-EA2FOAEG.mjs.map} +0 -0
  234. /package/dist/{chunk-Q5T57UNN.js.map → chunk-EFRPCO3C.js.map} +0 -0
  235. /package/dist/{chunk-OQSLMZJN.js.map → chunk-ENKAY3PI.js.map} +0 -0
  236. /package/dist/{chunk-7T3N2ZGQ.mjs.map → chunk-EXUEHPZ4.mjs.map} +0 -0
  237. /package/dist/{chunk-JGMGNLZW.mjs.map → chunk-FOWIC2SO.mjs.map} +0 -0
  238. /package/dist/{chunk-2IVFF3AA.mjs.map → chunk-GTAYOKI4.mjs.map} +0 -0
  239. /package/dist/{chunk-6H32HLTZ.js.map → chunk-HF7HUZ5Z.js.map} +0 -0
  240. /package/dist/{chunk-LHIPBIPS.mjs.map → chunk-HJRCBSNA.mjs.map} +0 -0
  241. /package/dist/{chunk-XWFKTDB3.js.map → chunk-HJYRGKCX.js.map} +0 -0
  242. /package/dist/{chunk-LEFOMYX3.mjs.map → chunk-HYF7Q6VY.mjs.map} +0 -0
  243. /package/dist/{chunk-Z4J4GUGG.mjs.map → chunk-I77AVJKV.mjs.map} +0 -0
  244. /package/dist/{chunk-HOTDTMNP.mjs.map → chunk-IGMAXVPP.mjs.map} +0 -0
  245. /package/dist/{chunk-7KKLGQNE.js.map → chunk-IHQPAJ2B.js.map} +0 -0
  246. /package/dist/{chunk-6WBLB5BX.js.map → chunk-IJX3CXOY.js.map} +0 -0
  247. /package/dist/{chunk-WJOAEPZ7.js.map → chunk-IPOE62V4.js.map} +0 -0
  248. /package/dist/{chunk-7XA5VYYV.mjs.map → chunk-IV3FSWZ7.mjs.map} +0 -0
  249. /package/dist/{chunk-7PNGOFLU.js.map → chunk-IXBJNVHK.js.map} +0 -0
  250. /package/dist/{chunk-MYSBDK36.mjs.map → chunk-JI5NQ2C3.mjs.map} +0 -0
  251. /package/dist/{chunk-O4PW77JW.mjs.map → chunk-JMDSN227.mjs.map} +0 -0
  252. /package/dist/{chunk-XRGYWWT7.js.map → chunk-K6BCBPXF.js.map} +0 -0
  253. /package/dist/{chunk-2G4HD42C.mjs.map → chunk-KMLVVVK3.mjs.map} +0 -0
  254. /package/dist/{chunk-ZLFA4R5X.js.map → chunk-LBRWAC27.js.map} +0 -0
  255. /package/dist/{chunk-HWFLO7W5.mjs.map → chunk-LCWDLIK5.mjs.map} +0 -0
  256. /package/dist/{chunk-XEY3KVEH.js.map → chunk-LEKZPKS2.js.map} +0 -0
  257. /package/dist/{chunk-UGQQ5DJ4.mjs.map → chunk-MCEKOGEG.mjs.map} +0 -0
  258. /package/dist/{chunk-224S5XKL.js.map → chunk-MLOQHUOY.js.map} +0 -0
  259. /package/dist/{chunk-QYFDFOWT.js.map → chunk-N722KRZW.js.map} +0 -0
  260. /package/dist/{chunk-Q7FGULTV.js.map → chunk-NUCLSR2G.js.map} +0 -0
  261. /package/dist/{chunk-XKXHM3PC.mjs.map → chunk-P252LKUT.mjs.map} +0 -0
  262. /package/dist/{chunk-IUNNN6HN.mjs.map → chunk-PJMEJVOB.mjs.map} +0 -0
  263. /package/dist/{chunk-RRPU7M4Y.js.map → chunk-PLBSSUVY.js.map} +0 -0
  264. /package/dist/{chunk-QJTAFTW7.js.map → chunk-Q7RCL5IE.js.map} +0 -0
  265. /package/dist/{chunk-R7UAMO2U.js.map → chunk-QSCKTRRU.js.map} +0 -0
  266. /package/dist/{chunk-H34N3OWO.mjs.map → chunk-QX6MAFJU.mjs.map} +0 -0
  267. /package/dist/{chunk-6CTV7VW5.mjs.map → chunk-SRMDDOVO.mjs.map} +0 -0
  268. /package/dist/{chunk-XDEHYKW2.js.map → chunk-T3VM5YXY.js.map} +0 -0
  269. /package/dist/{chunk-FTY3BOF7.js.map → chunk-T3YY4JIJ.js.map} +0 -0
  270. /package/dist/{chunk-ZVXX2CTH.mjs.map → chunk-T6FWIDA6.mjs.map} +0 -0
  271. /package/dist/{chunk-YF4PGFCO.js.map → chunk-TFP64TMV.js.map} +0 -0
  272. /package/dist/{chunk-H636DAOG.js.map → chunk-TG4BDSYJ.js.map} +0 -0
  273. /package/dist/{chunk-43EBXDVP.mjs.map → chunk-UMZNVWEM.mjs.map} +0 -0
  274. /package/dist/{chunk-3SARO5TJ.mjs.map → chunk-UW74NLTC.mjs.map} +0 -0
  275. /package/dist/{chunk-GW5NQXN4.mjs.map → chunk-VWGXNUMD.mjs.map} +0 -0
  276. /package/dist/{chunk-N52KMB25.mjs.map → chunk-WEOCOYES.mjs.map} +0 -0
  277. /package/dist/{chunk-4IKNNAVC.mjs.map → chunk-WF56W2AR.mjs.map} +0 -0
  278. /package/dist/{chunk-VMUXXXJC.js.map → chunk-X44Z53IG.js.map} +0 -0
  279. /package/dist/{chunk-B2DMAQNK.mjs.map → chunk-Z2JQNSVL.mjs.map} +0 -0
  280. /package/dist/{chunk-LOW2T4MV.mjs.map → chunk-ZJRWU4AJ.mjs.map} +0 -0
  281. /package/dist/{chunk-MSUZTHYT.js.map → chunk-ZT3KKTS2.js.map} +0 -0
@@ -7,4 +7,4 @@ function parseJson(json) {
7
7
 
8
8
 
9
9
  exports.parseJson = parseJson;
10
- //# sourceMappingURL=chunk-6H32HLTZ.js.map
10
+ //# sourceMappingURL=chunk-HF7HUZ5Z.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getBytes
3
- } from "./chunk-VGWELVCX.mjs";
3
+ } from "./chunk-6YRUDGNL.mjs";
4
4
 
5
5
  // src/checksum.ts
6
6
  import { assert, concatBytes } from "@metamask/utils";
@@ -29,4 +29,4 @@ export {
29
29
  checksum,
30
30
  checksumFiles
31
31
  };
32
- //# sourceMappingURL=chunk-LHIPBIPS.mjs.map
32
+ //# sourceMappingURL=chunk-HJRCBSNA.mjs.map
@@ -0,0 +1,50 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkNUCLSR2Gjs = require('./chunk-NUCLSR2G.js');
4
+
5
+ // src/virtual-file/VirtualFile.ts
6
+ var _utils = require('@metamask/utils');
7
+ var _base = require('@scure/base');
8
+ var VirtualFile = class _VirtualFile {
9
+ constructor(value) {
10
+ let options;
11
+ if (typeof value === "string" || value instanceof Uint8Array) {
12
+ options = { value };
13
+ } else {
14
+ options = value;
15
+ }
16
+ this.value = options?.value ?? "";
17
+ this.result = options?.result ?? void 0;
18
+ this.data = options?.data ?? {};
19
+ this.path = options?.path ?? "/";
20
+ }
21
+ toString(encoding) {
22
+ if (typeof this.value === "string") {
23
+ _utils.assert.call(void 0, encoding === void 0, "Tried to encode string.");
24
+ return this.value;
25
+ } else if (this.value instanceof Uint8Array && encoding === "hex") {
26
+ return _utils.bytesToHex.call(void 0, this.value);
27
+ } else if (this.value instanceof Uint8Array && encoding === "base64") {
28
+ return _base.base64.encode(this.value);
29
+ }
30
+ const decoder = new TextDecoder(encoding);
31
+ return decoder.decode(this.value);
32
+ }
33
+ clone() {
34
+ const vfile = new _VirtualFile();
35
+ if (typeof this.value === "string") {
36
+ vfile.value = this.value;
37
+ } else {
38
+ vfile.value = this.value.slice(0);
39
+ }
40
+ vfile.result = _chunkNUCLSR2Gjs.deepClone.call(void 0, this.result);
41
+ vfile.data = _chunkNUCLSR2Gjs.deepClone.call(void 0, this.data);
42
+ vfile.path = this.path;
43
+ return vfile;
44
+ }
45
+ };
46
+
47
+
48
+
49
+ exports.VirtualFile = VirtualFile;
50
+ //# sourceMappingURL=chunk-HJYRGKCX.js.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-HYF7Q6VY.mjs.map
@@ -149,4 +149,4 @@ export {
149
149
  DomainResolutionResponseStruct,
150
150
  OnNameLookupResponseStruct
151
151
  };
152
- //# sourceMappingURL=chunk-Z4J4GUGG.mjs.map
152
+ //# sourceMappingURL=chunk-I77AVJKV.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VirtualFile
3
- } from "./chunk-LOW2T4MV.mjs";
3
+ } from "./chunk-ZJRWU4AJ.mjs";
4
4
 
5
5
  // src/virtual-file/toVirtualFile.ts
6
6
  import { promises as fsPromises } from "fs";
@@ -18,4 +18,4 @@ export {
18
18
  readVirtualFile,
19
19
  writeVirtualFile
20
20
  };
21
- //# sourceMappingURL=chunk-HOTDTMNP.mjs.map
21
+ //# sourceMappingURL=chunk-IGMAXVPP.mjs.map
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkR4BBIGBNjs = require('./chunk-R4BBIGBN.js');
3
+ var _chunk473MIETWjs = require('./chunk-473MIETW.js');
4
4
 
5
5
  // src/base64.ts
6
6
  var _utils = require('@metamask/utils');
7
7
  async function encodeBase64(input) {
8
- const bytes = _chunkR4BBIGBNjs.getBytes.call(void 0, input);
8
+ const bytes = _chunk473MIETWjs.getBytes.call(void 0, input);
9
9
  if ("FileReader" in globalThis) {
10
10
  return await new Promise((resolve, reject) => {
11
11
  const reader = Object.assign(new FileReader(), {
@@ -35,4 +35,4 @@ async function decodeBase64(base64) {
35
35
 
36
36
 
37
37
  exports.encodeBase64 = encodeBase64; exports.decodeBase64 = decodeBase64;
38
- //# sourceMappingURL=chunk-7KKLGQNE.js.map
38
+ //# sourceMappingURL=chunk-IHQPAJ2B.js.map
@@ -6,4 +6,4 @@ function indent(message, spaces = 2) {
6
6
 
7
7
 
8
8
  exports.indent = indent;
9
- //# sourceMappingURL=chunk-6WBLB5BX.js.map
9
+ //# sourceMappingURL=chunk-IJX3CXOY.js.map
@@ -27,4 +27,4 @@ function resolveVersionRange(version) {
27
27
 
28
28
 
29
29
  exports.DEFAULT_REQUESTED_SNAP_VERSION = DEFAULT_REQUESTED_SNAP_VERSION; exports.getTargetVersion = getTargetVersion; exports.resolveVersionRange = resolveVersionRange;
30
- //# sourceMappingURL=chunk-WJOAEPZ7.js.map
30
+ //# sourceMappingURL=chunk-IPOE62V4.js.map
@@ -6,4 +6,4 @@ function indent(message, spaces = 2) {
6
6
  export {
7
7
  indent
8
8
  };
9
- //# sourceMappingURL=chunk-7XA5VYYV.mjs.map
9
+ //# sourceMappingURL=chunk-IV3FSWZ7.mjs.map
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk7KKLGQNEjs = require('./chunk-7KKLGQNE.js');
3
+ var _chunkIHQPAJ2Bjs = require('./chunk-IHQPAJ2B.js');
4
4
 
5
5
  // src/auxiliary-files.ts
6
6
  var _snapssdk = require('@metamask/snaps-sdk');
@@ -9,7 +9,7 @@ async function encodeAuxiliaryFile(value, encoding) {
9
9
  if (encoding === _snapssdk.AuxiliaryFileEncoding.Base64) {
10
10
  return value;
11
11
  }
12
- const decoded = await _chunk7KKLGQNEjs.decodeBase64.call(void 0, value);
12
+ const decoded = await _chunkIHQPAJ2Bjs.decodeBase64.call(void 0, value);
13
13
  if (encoding === _snapssdk.AuxiliaryFileEncoding.Utf8) {
14
14
  return _utils.bytesToString.call(void 0, decoded);
15
15
  }
@@ -19,4 +19,4 @@ async function encodeAuxiliaryFile(value, encoding) {
19
19
 
20
20
 
21
21
  exports.encodeAuxiliaryFile = encodeAuxiliaryFile;
22
- //# sourceMappingURL=chunk-7PNGOFLU.js.map
22
+ //# sourceMappingURL=chunk-IXBJNVHK.js.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-JI5NQ2C3.mjs.map
@@ -17,17 +17,9 @@ var __privateSet = (obj, member, value, setter) => {
17
17
  return value;
18
18
  };
19
19
 
20
- // ../../node_modules/tsup/assets/esm_shims.js
21
- import { fileURLToPath } from "url";
22
- import path from "path";
23
- var getFilename = () => fileURLToPath(import.meta.url);
24
- var getDirname = () => path.dirname(getFilename());
25
- var __dirname = /* @__PURE__ */ getDirname();
26
-
27
20
  export {
28
21
  __privateGet,
29
22
  __privateAdd,
30
- __privateSet,
31
- __dirname
23
+ __privateSet
32
24
  };
33
- //# sourceMappingURL=chunk-4GBOSMF7.mjs.map
25
+ //# sourceMappingURL=chunk-JMDSN227.mjs.map
@@ -148,4 +148,4 @@ function unwrapError(error) {
148
148
 
149
149
 
150
150
  exports.SNAP_ERROR_WRAPPER_CODE = SNAP_ERROR_WRAPPER_CODE; exports.SNAP_ERROR_WRAPPER_MESSAGE = SNAP_ERROR_WRAPPER_MESSAGE; exports.WrappedSnapError = WrappedSnapError; exports.isSnapError = isSnapError; exports.isSerializedSnapError = isSerializedSnapError; exports.isWrappedSnapError = isWrappedSnapError; exports.unwrapError = unwrapError;
151
- //# sourceMappingURL=chunk-XRGYWWT7.js.map
151
+ //# sourceMappingURL=chunk-K6BCBPXF.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  decodeBase64
3
- } from "./chunk-JGMGNLZW.mjs";
3
+ } from "./chunk-FOWIC2SO.mjs";
4
4
 
5
5
  // src/auxiliary-files.ts
6
6
  import { AuxiliaryFileEncoding } from "@metamask/snaps-sdk";
@@ -19,4 +19,4 @@ async function encodeAuxiliaryFile(value, encoding) {
19
19
  export {
20
20
  encodeAuxiliaryFile
21
21
  };
22
- //# sourceMappingURL=chunk-2G4HD42C.mjs.map
22
+ //# sourceMappingURL=chunk-KMLVVVK3.mjs.map
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkVMUXXXJCjs = require('./chunk-VMUXXXJC.js');
3
+ var _chunkX44Z53IGjs = require('./chunk-X44Z53IG.js');
4
4
 
5
5
  // src/eval.ts
6
6
  var _utils = require('@metamask/utils');
@@ -14,7 +14,7 @@ var SnapEvalError = class extends Error {
14
14
  }
15
15
  };
16
16
  async function evalBundle(bundlePath) {
17
- await _chunkVMUXXXJCjs.validateFilePath.call(void 0, bundlePath);
17
+ await _chunkX44Z53IGjs.validateFilePath.call(void 0, bundlePath);
18
18
  return new Promise((resolve, reject) => {
19
19
  const worker = _child_process.fork.call(void 0, _path.join.call(void 0, __dirname, "eval-worker.js"), [bundlePath], {
20
20
  // To avoid printing the output of the worker to the console, we set
@@ -53,4 +53,4 @@ async function evalBundle(bundlePath) {
53
53
 
54
54
 
55
55
  exports.SnapEvalError = SnapEvalError; exports.evalBundle = evalBundle;
56
- //# sourceMappingURL=chunk-ZLFA4R5X.js.map
56
+ //# sourceMappingURL=chunk-LBRWAC27.js.map
@@ -1,27 +1,27 @@
1
1
  import {
2
2
  SnapIdStruct
3
- } from "./chunk-FJH6DDEL.mjs";
3
+ } from "./chunk-2IWSQJKQ.mjs";
4
4
  import {
5
5
  ChainIdStruct
6
- } from "./chunk-7T3N2ZGQ.mjs";
6
+ } from "./chunk-EXUEHPZ4.mjs";
7
7
  import {
8
8
  NameStruct,
9
9
  uri
10
- } from "./chunk-ZVXX2CTH.mjs";
10
+ } from "./chunk-T6FWIDA6.mjs";
11
11
  import {
12
12
  KeyringOriginsStruct,
13
13
  RpcOriginsStruct
14
- } from "./chunk-DKSB4FMW.mjs";
14
+ } from "./chunk-DKDGMZFU.mjs";
15
15
  import {
16
16
  SIP_6_MAGIC_VALUE,
17
17
  STATE_ENCRYPTION_MAGIC_VALUE
18
- } from "./chunk-QF3LHIJ5.mjs";
18
+ } from "./chunk-AS5P6JRP.mjs";
19
19
  import {
20
20
  isEqual
21
- } from "./chunk-XKXHM3PC.mjs";
21
+ } from "./chunk-P252LKUT.mjs";
22
22
  import {
23
23
  CronjobSpecificationArrayStruct
24
- } from "./chunk-YLT6CNSL.mjs";
24
+ } from "./chunk-EA2FOAEG.mjs";
25
25
 
26
26
  // src/manifest/validation.ts
27
27
  import { isValidBIP32PathSegment } from "@metamask/key-tree";
@@ -278,4 +278,4 @@ export {
278
278
  assertIsSnapManifest,
279
279
  createSnapManifest
280
280
  };
281
- //# sourceMappingURL=chunk-HWFLO7W5.mjs.map
281
+ //# sourceMappingURL=chunk-LCWDLIK5.mjs.map
@@ -18,4 +18,4 @@ var SNAP_EXPORT_NAMES = Object.values(HandlerType);
18
18
 
19
19
 
20
20
  exports.HandlerType = HandlerType; exports.SNAP_EXPORT_NAMES = SNAP_EXPORT_NAMES;
21
- //# sourceMappingURL=chunk-XEY3KVEH.js.map
21
+ //# sourceMappingURL=chunk-LEKZPKS2.js.map
@@ -1,9 +1,13 @@
1
+ import { fileURLToPath } from 'url'
2
+ import path from 'path'
3
+
4
+ const getFilename = () => fileURLToPath(import.meta.url)
5
+ const getDirname = () => path.dirname(getFilename())
6
+
7
+ export const __dirname = /* @__PURE__ */ getDirname()
1
8
  import {
2
9
  validateFilePath
3
- } from "./chunk-32B4YQM7.mjs";
4
- import {
5
- __dirname
6
- } from "./chunk-4GBOSMF7.mjs";
10
+ } from "./chunk-7Y3WSN44.mjs";
7
11
 
8
12
  // src/eval.ts
9
13
  import { assert } from "@metamask/utils";
@@ -56,4 +60,4 @@ export {
56
60
  SnapEvalError,
57
61
  evalBundle
58
62
  };
59
- //# sourceMappingURL=chunk-TURGGK5F.mjs.map
63
+ //# sourceMappingURL=chunk-LSPOXPJJ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/eval.ts"],"names":[],"mappings":";;;;;AAAA,SAAS,cAAc;AACvB,SAAS,YAAY;AACrB,SAAS,YAAY;AASd,IAAM,gBAAN,cAA4B,MAAM;AAAA,EAGvC,YAAY,SAAiB,QAAoB;AAC/C,UAAM,OAAO;AAEb,SAAK,OAAO;AACZ,SAAK,SAAS;AAAA,EAChB;AACF;AASA,eAAsB,WAAW,YAAyC;AACxE,QAAM,iBAAiB,UAAU;AAEjC,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,UAAM,SAAS,KAAK,KAAK,WAAW,gBAAgB,GAAG,CAAC,UAAU,GAAG;AAAA;AAAA;AAAA,MAGnE,OAAO;AAAA,IACT,CAAC;AAED,QAAI,SAAS;AACb,QAAI,SAAS;AAEb,WAAO,OAAO,QAAQ,6BAA6B;AACnD,WAAO,OAAO,QAAQ,6BAA6B;AAEnD,WAAO,OAAO,GAAG,QAAQ,CAAC,SAAiB;AACzC,gBAAU,KAAK,SAAS;AAAA,IAC1B,CAAC;AAED,WAAO,OAAO,GAAG,QAAQ,CAAC,SAAiB;AACzC,gBAAU,KAAK,SAAS;AAAA,IAC1B,CAAC;AAED,WAAO,GAAG,QAAQ,CAAC,aAAqB;AACtC,YAAM,SAAS;AAAA,QACb;AAAA,QACA;AAAA,MACF;AAEA,UAAI,aAAa,GAAG;AAClB,eAAO,QAAQ,MAAM;AAAA,MACvB;AAEA,aAAO;AAAA,QACL,IAAI;AAAA,UACF,2CAA2C,QAAQ;AAAA,UACnD;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH","sourcesContent":["import { assert } from '@metamask/utils';\nimport { fork } from 'child_process';\nimport { join } from 'path';\n\nimport { validateFilePath } from './fs';\n\nexport type EvalOutput = {\n stdout: string;\n stderr: string;\n};\n\nexport class SnapEvalError extends Error {\n readonly output: EvalOutput;\n\n constructor(message: string, output: EvalOutput) {\n super(message);\n\n this.name = 'SnapEvalError';\n this.output = output;\n }\n}\n\n/**\n * Spawn a new process to run the provided bundle in.\n *\n * @param bundlePath - The path to the bundle to run.\n * @returns `null` if the worker ran successfully.\n * @throws If the worker failed to run successfully.\n */\nexport async function evalBundle(bundlePath: string): Promise<EvalOutput> {\n await validateFilePath(bundlePath);\n\n return new Promise((resolve, reject) => {\n const worker = fork(join(__dirname, 'eval-worker.js'), [bundlePath], {\n // To avoid printing the output of the worker to the console, we set\n // `stdio` to `pipe` and handle the output ourselves.\n stdio: 'pipe',\n });\n\n let stdout = '';\n let stderr = '';\n\n assert(worker.stdout, '`stdout` should be defined.');\n assert(worker.stderr, '`stderr` should be defined.');\n\n worker.stdout.on('data', (data: Buffer) => {\n stdout += data.toString();\n });\n\n worker.stderr.on('data', (data: Buffer) => {\n stderr += data.toString();\n });\n\n worker.on('exit', (exitCode: number) => {\n const output = {\n stdout,\n stderr,\n };\n\n if (exitCode === 0) {\n return resolve(output);\n }\n\n return reject(\n new SnapEvalError(\n `Process exited with non-zero exit code: ${exitCode}.`,\n output,\n ),\n );\n });\n });\n}\n"]}
@@ -47,4 +47,4 @@ export {
47
47
  assertIsSnapIcon,
48
48
  getSvgDimensions
49
49
  };
50
- //# sourceMappingURL=chunk-UGQQ5DJ4.mjs.map
50
+ //# sourceMappingURL=chunk-MCEKOGEG.mjs.map
@@ -1,13 +1,13 @@
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 _chunkR4BBIGBNjs = require('./chunk-R4BBIGBN.js');
3
+ var _chunk473MIETWjs = require('./chunk-473MIETW.js');
4
4
 
5
5
  // src/checksum.ts
6
6
  var _utils = require('@metamask/utils');
7
7
  var _sha256 = require('@noble/hashes/sha256');
8
8
  async function checksum(bytes) {
9
- const value = _chunkR4BBIGBNjs.getBytes.call(void 0, bytes);
10
- if ("crypto" in globalThis && typeof globalThis.crypto === "object" && _optionalChain([crypto, 'access', _ => _.subtle, 'optionalAccess', _2 => _2.digest])) {
9
+ const value = _chunk473MIETWjs.getBytes.call(void 0, bytes);
10
+ if ("crypto" in globalThis && typeof globalThis.crypto === "object" && crypto.subtle?.digest) {
11
11
  return new Uint8Array(await crypto.subtle.digest("SHA-256", value));
12
12
  }
13
13
  return _sha256.sha256.call(void 0, value);
@@ -29,4 +29,4 @@ async function checksumFiles(files) {
29
29
 
30
30
 
31
31
  exports.checksum = checksum; exports.checksumFiles = checksumFiles;
32
- //# sourceMappingURL=chunk-224S5XKL.js.map
32
+ //# sourceMappingURL=chunk-MLOQHUOY.js.map
@@ -38,4 +38,4 @@ var DEFAULT_ENDOWMENTS = Object.freeze([
38
38
 
39
39
 
40
40
  exports.DEFAULT_ENDOWMENTS = DEFAULT_ENDOWMENTS;
41
- //# sourceMappingURL=chunk-QYFDFOWT.js.map
41
+ //# sourceMappingURL=chunk-N722KRZW.js.map
@@ -5,4 +5,4 @@ var deepClone = _rfdc2.default.call(void 0, { proto: false, circles: false });
5
5
 
6
6
 
7
7
  exports.deepClone = deepClone;
8
- //# sourceMappingURL=chunk-Q7FGULTV.js.map
8
+ //# sourceMappingURL=chunk-NUCLSR2G.js.map
@@ -6,4 +6,4 @@ function isEqual(a, b) {
6
6
  export {
7
7
  isEqual
8
8
  };
9
- //# sourceMappingURL=chunk-XKXHM3PC.mjs.map
9
+ //# sourceMappingURL=chunk-P252LKUT.mjs.map
@@ -26,4 +26,4 @@ async function createWindow(uri, id, sandbox = true) {
26
26
  export {
27
27
  createWindow
28
28
  };
29
- //# sourceMappingURL=chunk-IUNNN6HN.mjs.map
29
+ //# sourceMappingURL=chunk-PJMEJVOB.mjs.map
@@ -26,4 +26,4 @@ async function createWindow(uri, id, sandbox = true) {
26
26
 
27
27
 
28
28
  exports.createWindow = createWindow;
29
- //# sourceMappingURL=chunk-RRPU7M4Y.js.map
29
+ //# sourceMappingURL=chunk-PLBSSUVY.js.map
@@ -0,0 +1,30 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkENKAY3PIjs = require('./chunk-ENKAY3PI.js');
4
+
5
+
6
+ var _chunkTG4BDSYJjs = require('./chunk-TG4BDSYJ.js');
7
+
8
+
9
+ var _chunk4BDR6KRHjs = require('./chunk-4BDR6KRH.js');
10
+
11
+
12
+ var _chunkAFQY2CNYjs = require('./chunk-AFQY2CNY.js');
13
+
14
+ // src/validation.ts
15
+ async function validateFetchedSnap(files) {
16
+ _chunkENKAY3PIjs.assertIsSnapManifest.call(void 0, files.manifest.result);
17
+ await _chunkTG4BDSYJjs.validateSnapShasum.call(void 0, files);
18
+ _chunkAFQY2CNYjs.validateSnapManifestLocalizations.call(void 0,
19
+ files.manifest.result,
20
+ files.localizationFiles.map((file) => file.result)
21
+ );
22
+ if (files.svgIcon) {
23
+ _chunk4BDR6KRHjs.assertIsSnapIcon.call(void 0, files.svgIcon);
24
+ }
25
+ }
26
+
27
+
28
+
29
+ exports.validateFetchedSnap = validateFetchedSnap;
30
+ //# sourceMappingURL=chunk-Q7RCL5IE.js.map
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkXWFKTDB3js = require('./chunk-XWFKTDB3.js');
3
+ var _chunkHJYRGKCXjs = require('./chunk-HJYRGKCX.js');
4
4
 
5
5
  // src/virtual-file/toVirtualFile.ts
6
6
  var _fs = require('fs');
7
7
  async function readVirtualFile(path, encoding = null) {
8
- return new (0, _chunkXWFKTDB3js.VirtualFile)({
8
+ return new (0, _chunkHJYRGKCXjs.VirtualFile)({
9
9
  path,
10
10
  value: await _fs.promises.readFile(path, { encoding })
11
11
  });
@@ -18,4 +18,4 @@ async function writeVirtualFile(vfile, options) {
18
18
 
19
19
 
20
20
  exports.readVirtualFile = readVirtualFile; exports.writeVirtualFile = writeVirtualFile;
21
- //# sourceMappingURL=chunk-R7UAMO2U.js.map
21
+ //# sourceMappingURL=chunk-QSCKTRRU.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isEqual
3
- } from "./chunk-XKXHM3PC.mjs";
3
+ } from "./chunk-P252LKUT.mjs";
4
4
 
5
5
  // src/derivation-paths.ts
6
6
  import slip44 from "@metamask/slip44";
@@ -166,4 +166,4 @@ export {
166
166
  getSnapDerivationPathName,
167
167
  getSlip44ProtocolName
168
168
  };
169
- //# sourceMappingURL=chunk-H34N3OWO.mjs.map
169
+ //# sourceMappingURL=chunk-QX6MAFJU.mjs.map
@@ -12,7 +12,7 @@ var PostProcessWarning = /* @__PURE__ */ ((PostProcessWarning2) => {
12
12
  PostProcessWarning2["UnsafeMathRandom"] = "`Math.random` was detected in the Snap bundle. This is not a secure source of randomness, and should not be used in a secure context. Use `crypto.getRandomValues` instead.";
13
13
  return PostProcessWarning2;
14
14
  })(PostProcessWarning || {});
15
- var TOKEN_REGEX = /(<!)(--)|(--)(>)|(import)(\(.*?\))/gu;
15
+ var TOKEN_REGEX = /(<!)(--)|(--)(>)|(--)(!)(>)|(import)(\(.*?\))/gu;
16
16
  var EMPTY_TEMPLATE_ELEMENT = templateElement({ raw: "", cooked: "" });
17
17
  var evalWrapper = template.statement(`
18
18
  (1, REF)(ARGS)
@@ -246,4 +246,4 @@ export {
246
246
  PostProcessWarning,
247
247
  postProcessBundle
248
248
  };
249
- //# sourceMappingURL=chunk-O3XKEEJV.mjs.map
249
+ //# sourceMappingURL=chunk-QYPLUMB7.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/post-process.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/no-shadow\nimport type { Node, Visitor, PluginObj } from '@babel/core';\nimport { transformSync, template } from '@babel/core';\nimport type { Expression, Identifier, TemplateElement } from '@babel/types';\nimport {\n binaryExpression,\n isUnaryExpression,\n isUpdateExpression,\n stringLiteral,\n templateElement,\n templateLiteral,\n} from '@babel/types';\n\n/**\n * Source map declaration taken from `@babel/core`. Babel doesn't export the\n * type for this, so it's copied from the source code instead here.\n */\nexport type SourceMap = {\n version: number;\n sources: string[];\n names: string[];\n sourceRoot?: string | undefined;\n sourcesContent?: string[] | undefined;\n mappings: string;\n file: string;\n};\n\n/**\n * The post process options.\n *\n * @property stripComments - Whether to strip comments. Defaults to `true`.\n * @property sourceMap - Whether to generate a source map for the modified code.\n * See also `inputSourceMap`.\n * @property inputSourceMap - The source map for the input code. When provided,\n * the source map will be used to generate a source map for the modified code.\n * This ensures that the source map is correct for the modified code, and still\n * points to the original source. If not provided, a new source map will be\n * generated instead.\n */\nexport type PostProcessOptions = {\n stripComments?: boolean;\n sourceMap?: boolean | 'inline';\n inputSourceMap?: SourceMap;\n};\n\n/**\n * The post processed bundle output.\n *\n * @property code - The modified code.\n * @property sourceMap - The source map for the modified code, if the source map\n * option was enabled.\n * @property warnings - Any warnings that occurred during the post-processing.\n */\nexport type PostProcessedBundle = {\n code: string;\n sourceMap?: SourceMap | null;\n warnings: PostProcessWarning[];\n};\n\nexport enum PostProcessWarning {\n UnsafeMathRandom = '`Math.random` was detected in the Snap bundle. This is not a secure source of randomness, and should not be used in a secure context. Use `crypto.getRandomValues` instead.',\n}\n\n// The RegEx below consists of multiple groups joined by a boolean OR.\n// Each part consists of two groups which capture a part of each string\n// which needs to be split up, e.g., `<!--` is split into `<!` and `--`.\nconst TOKEN_REGEX = /(<!)(--)|(--)(>)|(--)(!)(>)|(import)(\\(.*?\\))/gu;\n\n// An empty template element, i.e., a part of a template literal without any\n// value (\"\").\nconst EMPTY_TEMPLATE_ELEMENT = templateElement({ raw: '', cooked: '' });\n\nconst evalWrapper = template.statement(`\n (1, REF)(ARGS)\n`);\n\nconst objectEvalWrapper = template.statement(`\n (1, OBJECT.REF)\n`);\n\nconst regeneratorRuntimeWrapper = template.statement(`\n var regeneratorRuntime;\n`);\n\n/**\n * Breaks up tokens that would otherwise result in SES errors. The tokens are\n * broken up in a non-destructive way where possible. Currently works with:\n * - HTML comment tags `<!--` and `-->`, broken up into `<!`, `--`, and `--`,\n * `>`.\n * - `import(n)` statements, broken up into `import`, `(n)`.\n *\n * @param value - The string value to break up.\n * @returns The string split into an array, in a way that it can be joined\n * together to form the same string, but with the tokens separated into single\n * array elements.\n */\nfunction breakTokens(value: string): string[] {\n const tokens = value.split(TOKEN_REGEX);\n return (\n tokens\n // TODO: The `split` above results in some values being `undefined`.\n // There may be a better solution to avoid having to filter those out.\n .filter((token) => token !== '' && token !== undefined)\n );\n}\n\n/**\n * Breaks up tokens that would otherwise result in SES errors. The tokens are\n * broken up in a non-destructive way where possible. Currently works with:\n * - HTML comment tags `<!--` and `-->`, broken up into `<!`, `--`, and `--`,\n * `>`.\n * - `import(n)` statements, broken up into `import`, `(n)`.\n *\n * @param value - The string value to break up.\n * @returns The string split into a tuple consisting of the new template\n * elements and string literal expressions.\n */\nfunction breakTokensTemplateLiteral(\n value: string,\n): [TemplateElement[], Expression[]] {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore `matchAll` is not available in ES2017, but this code\n // should only be used in environments where the function is supported.\n const matches: RegExpMatchArray[] = Array.from(value.matchAll(TOKEN_REGEX));\n\n if (matches.length > 0) {\n const output = matches.reduce<[TemplateElement[], Expression[]]>(\n ([elements, expressions], rawMatch, index, values) => {\n const [, first, last] = rawMatch.filter((raw) => raw !== undefined);\n\n // Slice the text in front of the match, which does not need to be\n // broken up.\n const prefix = value.slice(\n index === 0\n ? 0\n : (values[index - 1].index as number) + values[index - 1][0].length,\n rawMatch.index,\n );\n\n return [\n [\n ...elements,\n templateElement({\n raw: getRawTemplateValue(prefix),\n cooked: prefix,\n }),\n EMPTY_TEMPLATE_ELEMENT,\n ],\n [...expressions, stringLiteral(first), stringLiteral(last)],\n ];\n },\n [[], []],\n );\n\n // Add the text after the last match to the output.\n const lastMatch = matches[matches.length - 1];\n const suffix = value.slice(\n (lastMatch.index as number) + lastMatch[0].length,\n );\n\n return [\n [\n ...output[0],\n templateElement({ raw: getRawTemplateValue(suffix), cooked: suffix }),\n ],\n output[1],\n ];\n }\n\n // If there are no matches, simply return the original value.\n return [\n [templateElement({ raw: getRawTemplateValue(value), cooked: value })],\n [],\n ];\n}\n\n/**\n * Get a raw template literal value from a cooked value. This adds a backslash\n * before every '`', '\\' and '${' characters.\n *\n * @see https://github.com/babel/babel/issues/9242#issuecomment-532529613\n * @param value - The cooked string to get the raw string for.\n * @returns The value as raw value.\n */\nfunction getRawTemplateValue(value: string) {\n return value.replace(/\\\\|`|\\$\\{/gu, '\\\\$&');\n}\n\n/**\n * Post process code with AST such that it can be evaluated in SES.\n *\n * Currently:\n * - Makes all direct calls to eval indirect.\n * - Handles certain Babel-related edge cases.\n * - Removes the `Buffer` provided by Browserify.\n * - Optionally removes comments.\n * - Breaks up tokens that would otherwise result in SES errors, such as HTML\n * comment tags `<!--` and `-->` and `import(n)` statements.\n *\n * @param code - The code to post process.\n * @param options - The post-process options.\n * @param options.stripComments - Whether to strip comments. Defaults to `true`.\n * @param options.sourceMap - Whether to generate a source map for the modified\n * code. See also `inputSourceMap`.\n * @param options.inputSourceMap - The source map for the input code. When\n * provided, the source map will be used to generate a source map for the\n * modified code. This ensures that the source map is correct for the modified\n * code, and still points to the original source. If not provided, a new source\n * map will be generated instead.\n * @returns An object containing the modified code, and source map, or null if\n * the provided code is null.\n */\nexport function postProcessBundle(\n code: string,\n {\n stripComments = true,\n sourceMap: sourceMaps,\n inputSourceMap,\n }: Partial<PostProcessOptions> = {},\n): PostProcessedBundle {\n const warnings = new Set<PostProcessWarning>();\n\n const pre: PluginObj['pre'] = ({ ast }) => {\n ast.comments?.forEach((comment) => {\n // Break up tokens that could be parsed as HTML comment terminators. The\n // regular expressions below are written strangely so as to avoid the\n // appearance of such tokens in our source code. For reference:\n // https://github.com/endojs/endo/blob/70cc86eb400655e922413b99c38818d7b2e79da0/packages/ses/error-codes/SES_HTML_COMMENT_REJECTED.md\n comment.value = comment.value\n .replace(new RegExp(`<!${'--'}`, 'gu'), '< !--')\n .replace(new RegExp(`${'--'}>`, 'gu'), '-- >')\n .replace(/import(\\(.*\\))/gu, 'import\\\\$1');\n });\n };\n\n const visitor: Visitor<Node> = {\n FunctionExpression(path) {\n const { node } = path;\n\n // Browserify provides the `Buffer` global as an argument to modules that\n // use it, but this does not work in SES. Since we pass in `Buffer` as an\n // endowment, we can simply remove the argument.\n //\n // Note that this only removes `Buffer` from a wrapped function\n // expression, e.g., `(function (Buffer) { ... })`. Regular functions\n // are not affected.\n //\n // TODO: Since we're working on the AST level, we could check the scope\n // of the function expression, and possibly prevent false positives?\n if (node.type === 'FunctionExpression' && node.extra?.parenthesized) {\n node.params = node.params.filter(\n (param) => !(param.type === 'Identifier' && param.name === 'Buffer'),\n );\n }\n },\n\n CallExpression(path) {\n const { node } = path;\n\n // Replace `eval(foo)` with `(1, eval)(foo)`.\n if (node.callee.type === 'Identifier' && node.callee.name === 'eval') {\n path.replaceWith(\n evalWrapper({\n REF: node.callee,\n ARGS: node.arguments,\n }),\n );\n }\n\n // Detect the use of `Math.random()` and add a warning.\n if (\n node.callee.type === 'MemberExpression' &&\n node.callee.object.type === 'Identifier' &&\n node.callee.object.name === 'Math' &&\n node.callee.property.type === 'Identifier' &&\n node.callee.property.name === 'random'\n ) {\n warnings.add(PostProcessWarning.UnsafeMathRandom);\n }\n },\n\n MemberExpression(path) {\n const { node } = path;\n\n // Replace `object.eval(foo)` with `(1, object.eval)(foo)`.\n if (\n node.property.type === 'Identifier' &&\n node.property.name === 'eval' &&\n // We only apply this to MemberExpressions that are the callee of CallExpression\n path.parent.type === 'CallExpression' &&\n path.parent.callee === node\n ) {\n path.replaceWith(\n objectEvalWrapper({\n OBJECT: node.object,\n REF: node.property,\n }),\n );\n }\n },\n\n Identifier(path) {\n const { node } = path;\n\n // Insert `regeneratorRuntime` global if it's used in the code.\n if (node.name === 'regeneratorRuntime') {\n const program = path.findParent(\n (parent) => parent.node.type === 'Program',\n );\n\n // We know that `program` is a Program node here, but this keeps\n // TypeScript happy.\n if (program?.node.type === 'Program') {\n const body = program.node.body[0];\n\n // This stops it from inserting `regeneratorRuntime` multiple times.\n if (\n body.type === 'VariableDeclaration' &&\n (body.declarations[0].id as Identifier).name ===\n 'regeneratorRuntime'\n ) {\n return;\n }\n\n program?.node.body.unshift(regeneratorRuntimeWrapper());\n }\n }\n },\n\n TemplateLiteral(path) {\n const { node } = path;\n\n // This checks if the template literal was visited before. Without this,\n // it would cause an infinite loop resulting in a stack overflow. We can't\n // skip the path here, because we need to visit the children of the node.\n if (path.getData('visited')) {\n return;\n }\n\n // Break up tokens that could be parsed as HTML comment terminators, or\n // `import()` statements.\n // For reference:\n // - https://github.com/endojs/endo/blob/70cc86eb400655e922413b99c38818d7b2e79da0/packages/ses/error-codes/SES_HTML_COMMENT_REJECTED.md\n // - https://github.com/MetaMask/snaps-monorepo/issues/505\n const [replacementQuasis, replacementExpressions] = node.quasis.reduce<\n [TemplateElement[], Expression[]]\n >(\n ([elements, expressions], quasi, index) => {\n // Note: Template literals have two variants, \"cooked\" and \"raw\". Here\n // we use the cooked version.\n // https://exploringjs.com/impatient-js/ch_template-literals.html#template-strings-cooked-vs-raw\n const tokens = breakTokensTemplateLiteral(\n quasi.value.cooked as string,\n );\n\n // Only update the node if something changed.\n if (tokens[0].length <= 1) {\n return [\n [...elements, quasi],\n [...expressions, node.expressions[index] as Expression],\n ];\n }\n\n return [\n [...elements, ...tokens[0]],\n [\n ...expressions,\n ...tokens[1],\n node.expressions[index] as Expression,\n ],\n ];\n },\n [[], []],\n );\n\n path.replaceWith(\n templateLiteral(\n replacementQuasis,\n replacementExpressions.filter(\n (expression) => expression !== undefined,\n ),\n ) as Node,\n );\n\n path.setData('visited', true);\n },\n\n StringLiteral(path) {\n const { node } = path;\n\n // Break up tokens that could be parsed as HTML comment terminators, or\n // `import()` statements.\n // For reference:\n // - https://github.com/endojs/endo/blob/70cc86eb400655e922413b99c38818d7b2e79da0/packages/ses/error-codes/SES_HTML_COMMENT_REJECTED.md\n // - https://github.com/MetaMask/snaps-monorepo/issues/505\n const tokens = breakTokens(node.value);\n\n // Only update the node if the string literal was broken up.\n if (tokens.length <= 1) {\n return;\n }\n\n const replacement = tokens\n .slice(1)\n .reduce<Expression>(\n (acc, value) => binaryExpression('+', acc, stringLiteral(value)),\n stringLiteral(tokens[0]),\n );\n\n path.replaceWith(replacement as Node);\n path.skip();\n },\n\n BinaryExpression(path) {\n const { node } = path;\n\n const errorMessage =\n 'Using HTML comments (`<!--` and `-->`) as operators is not allowed. The behaviour of ' +\n 'these comments is ambiguous, and differs per browser and environment. If you want ' +\n 'to use them as operators, break them up into separate characters, i.e., `a-- > b` ' +\n 'and `a < ! --b`.';\n\n if (\n node.operator === '<' &&\n isUnaryExpression(node.right) &&\n isUpdateExpression(node.right.argument) &&\n node.right.argument.operator === '--' &&\n node.left.end &&\n node.right.argument.argument.start\n ) {\n const expression = code.slice(\n node.left.end,\n node.right.argument.argument.start,\n );\n\n if (expression.includes('<!--')) {\n throw new Error(errorMessage);\n }\n }\n\n if (\n node.operator === '>' &&\n isUpdateExpression(node.left) &&\n node.left.operator === '--' &&\n node.left.argument.end &&\n node.right.start\n ) {\n const expression = code.slice(node.left.argument.end, node.right.start);\n\n if (expression.includes('-->')) {\n throw new Error(errorMessage);\n }\n }\n },\n };\n\n try {\n const file = transformSync(code, {\n // Prevent Babel from searching for a config file.\n configFile: false,\n\n parserOpts: {\n // Strict mode isn't enabled by default, so we need to enable it here.\n strictMode: true,\n\n // If this is disabled, the AST does not include any comments. This is\n // useful for performance reasons, and we use it for stripping comments.\n attachComment: !stripComments,\n },\n\n // By default, Babel optimises bundles that exceed 500 KB, but that\n // results in characters which look like HTML comments, which breaks SES.\n compact: false,\n\n // This configures Babel to generate a new source map from the existing\n // source map if specified. If `sourceMap` is `true` but an input source\n // map is not provided, a new source map will be generated instead.\n inputSourceMap,\n sourceMaps,\n\n plugins: [\n () => ({\n pre,\n visitor,\n }),\n ],\n });\n\n if (!file?.code) {\n throw new Error('Bundled code is empty.');\n }\n\n return {\n code: file.code,\n sourceMap: file.map,\n warnings: Array.from(warnings),\n };\n } catch (error) {\n throw new Error(`Failed to post process code:\\n${error.message}`);\n }\n}\n"],"mappings":";AAEA,SAAS,eAAe,gBAAgB;AAExC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAgDA,IAAK,qBAAL,kBAAKA,wBAAL;AACL,EAAAA,oBAAA,sBAAmB;AADT,SAAAA;AAAA,GAAA;AAOZ,IAAM,cAAc;AAIpB,IAAM,yBAAyB,gBAAgB,EAAE,KAAK,IAAI,QAAQ,GAAG,CAAC;AAEtE,IAAM,cAAc,SAAS,UAAU;AAAA;AAAA,CAEtC;AAED,IAAM,oBAAoB,SAAS,UAAU;AAAA;AAAA,CAE5C;AAED,IAAM,4BAA4B,SAAS,UAAU;AAAA;AAAA,CAEpD;AAcD,SAAS,YAAY,OAAyB;AAC5C,QAAM,SAAS,MAAM,MAAM,WAAW;AACtC,SACE,OAGG,O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M,KAAK;AAEtE,YAAI,WAAW,SAAS,KAAK,GAAG;AAC9B,gBAAM,IAAI,MAAM,YAAY;AAAA,QAC9B;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,MAAI;AACF,UAAM,OAAO,cAAc,MAAM;AAAA;AAAA,MAE/B,YAAY;AAAA,MAEZ,YAAY;AAAA;AAAA,QAEV,YAAY;AAAA;AAAA;AAAA,QAIZ,eAAe,CAAC;AAAA,MAClB;AAAA;AAAA;AAAA,MAIA,SAAS;AAAA;AAAA;AAAA;AAAA,MAKT;AAAA,MACA;AAAA,MAEA,SAAS;AAAA,QACP,OAAO;AAAA,UACL;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAC;AAED,QAAI,CAAC,MAAM,MAAM;AACf,YAAM,IAAI,MAAM,wBAAwB;AAAA,IAC1C;AAEA,WAAO;AAAA,MACL,MAAM,KAAK;AAAA,MACX,WAAW,KAAK;AAAA,MAChB,UAAU,MAAM,KAAK,QAAQ;AAAA,IAC/B;AAAA,EACF,SAAS,OAAO;AACd,UAAM,IAAI,MAAM;AAAA,EAAiC,MAAM,OAAO,EAAE;AAAA,EAClE;AACF;","names":["PostProcessWarning"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-RAZ7XG4Z.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -17,4 +17,4 @@ export {
17
17
  logError,
18
18
  logWarning
19
19
  };
20
- //# sourceMappingURL=chunk-6CTV7VW5.mjs.map
20
+ //# sourceMappingURL=chunk-SRMDDOVO.mjs.map
@@ -0,0 +1 @@
1
+ "use strict";//# sourceMappingURL=chunk-T3VM5YXY.js.map
@@ -6,4 +6,4 @@ function isEqual(a, b) {
6
6
 
7
7
 
8
8
  exports.isEqual = isEqual;
9
- //# sourceMappingURL=chunk-FTY3BOF7.js.map
9
+ //# sourceMappingURL=chunk-T3YY4JIJ.js.map
@@ -92,4 +92,4 @@ export {
92
92
  isValidUrl,
93
93
  WALLET_SNAP_PERMISSION_KEY
94
94
  };
95
- //# sourceMappingURL=chunk-ZVXX2CTH.mjs.map
95
+ //# sourceMappingURL=chunk-T6FWIDA6.mjs.map
@@ -0,0 +1 @@
1
+ "use strict";//# sourceMappingURL=chunk-TFP64TMV.js.map