@metamask/snaps-jest 8.2.0 → 8.3.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 (632) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/README.md +2 -2
  3. package/dist/environment.cjs +96 -0
  4. package/dist/environment.cjs.map +1 -0
  5. package/dist/{types/environment.d.ts → environment.d.cts} +5 -4
  6. package/dist/environment.d.cts.map +1 -0
  7. package/dist/environment.d.mts +53 -0
  8. package/dist/environment.d.mts.map +1 -0
  9. package/dist/environment.mjs +94 -44
  10. package/dist/environment.mjs.map +1 -1
  11. package/dist/global.cjs +4 -0
  12. package/dist/global.cjs.map +1 -0
  13. package/dist/{types/global.d.ts → global.d.cts} +2 -1
  14. package/dist/global.d.cts.map +1 -0
  15. package/dist/global.d.mts +70 -0
  16. package/dist/global.d.mts.map +1 -0
  17. package/dist/global.mjs +2 -1
  18. package/dist/global.mjs.map +1 -1
  19. package/dist/helpers.cjs +240 -0
  20. package/dist/helpers.cjs.map +1 -0
  21. package/dist/{types/helpers.d.ts → helpers.d.cts} +47 -4
  22. package/dist/helpers.d.cts.map +1 -0
  23. package/dist/helpers.d.mts +132 -0
  24. package/dist/helpers.d.mts.map +1 -0
  25. package/dist/helpers.mjs +228 -42
  26. package/dist/helpers.mjs.map +1 -1
  27. package/dist/index.cjs +29 -0
  28. package/dist/index.cjs.map +1 -0
  29. package/dist/index.d.cts +6 -0
  30. package/dist/index.d.cts.map +1 -0
  31. package/dist/index.d.mts +6 -0
  32. package/dist/index.d.mts.map +1 -0
  33. package/dist/index.mjs +6 -53
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/internals/environment.cjs +18 -0
  36. package/dist/internals/environment.cjs.map +1 -0
  37. package/dist/{types/internals/environment.d.ts → internals/environment.d.cts} +1 -0
  38. package/dist/internals/environment.d.cts.map +1 -0
  39. package/dist/internals/environment.d.mts +8 -0
  40. package/dist/internals/environment.d.mts.map +1 -0
  41. package/dist/internals/environment.mjs +13 -7
  42. package/dist/internals/environment.mjs.map +1 -1
  43. package/dist/internals/index.cjs +23 -0
  44. package/dist/internals/index.cjs.map +1 -0
  45. package/dist/internals/index.d.cts +7 -0
  46. package/dist/internals/index.d.cts.map +1 -0
  47. package/dist/internals/index.d.mts +7 -0
  48. package/dist/internals/index.d.mts.map +1 -0
  49. package/dist/internals/index.mjs +6 -141
  50. package/dist/internals/index.mjs.map +1 -1
  51. package/dist/internals/logger.cjs +6 -0
  52. package/dist/internals/logger.cjs.map +1 -0
  53. package/dist/{types/internals/logger.d.ts → internals/logger.d.cts} +1 -0
  54. package/dist/internals/logger.d.cts.map +1 -0
  55. package/dist/internals/logger.d.mts +3 -0
  56. package/dist/internals/logger.d.mts.map +1 -0
  57. package/dist/internals/logger.mjs +2 -7
  58. package/dist/internals/logger.mjs.map +1 -1
  59. package/dist/internals/request.cjs +143 -0
  60. package/dist/internals/request.cjs.map +1 -0
  61. package/dist/{types/internals/request.d.ts → internals/request.d.cts} +8 -7
  62. package/dist/internals/request.d.cts.map +1 -0
  63. package/dist/internals/request.d.mts +56 -0
  64. package/dist/internals/request.d.mts.map +1 -0
  65. package/dist/internals/request.mjs +137 -41
  66. package/dist/internals/request.mjs.map +1 -1
  67. package/dist/internals/server.cjs +74 -0
  68. package/dist/internals/server.cjs.map +1 -0
  69. package/dist/{types/internals/server.d.ts → internals/server.d.cts} +4 -3
  70. package/dist/internals/server.d.cts.map +1 -0
  71. package/dist/internals/server.d.mts +15 -0
  72. package/dist/internals/server.d.mts.map +1 -0
  73. package/dist/internals/server.mjs +73 -8
  74. package/dist/internals/server.mjs.map +1 -1
  75. package/dist/internals/simulation/constants.cjs +21 -0
  76. package/dist/internals/simulation/constants.cjs.map +1 -0
  77. package/dist/{types/internals/simulation/constants.d.ts → internals/simulation/constants.d.cts} +5 -0
  78. package/dist/internals/simulation/constants.d.cts.map +1 -0
  79. package/dist/internals/simulation/constants.d.mts +18 -0
  80. package/dist/internals/simulation/constants.d.mts.map +1 -0
  81. package/dist/internals/simulation/constants.mjs +17 -11
  82. package/dist/internals/simulation/constants.mjs.map +1 -1
  83. package/dist/internals/simulation/controllers.cjs +101 -0
  84. package/dist/internals/simulation/controllers.cjs.map +1 -0
  85. package/dist/{types/internals/simulation/controllers.d.ts → internals/simulation/controllers.d.cts} +15 -14
  86. package/dist/internals/simulation/controllers.d.cts.map +1 -0
  87. package/dist/internals/simulation/controllers.d.mts +41 -0
  88. package/dist/internals/simulation/controllers.d.mts.map +1 -0
  89. package/dist/internals/simulation/controllers.mjs +95 -24
  90. package/dist/internals/simulation/controllers.mjs.map +1 -1
  91. package/dist/internals/simulation/files.cjs +94 -0
  92. package/dist/internals/simulation/files.cjs.map +1 -0
  93. package/dist/{types/internals/simulation/files.d.ts → internals/simulation/files.d.cts} +6 -4
  94. package/dist/internals/simulation/files.d.cts.map +1 -0
  95. package/dist/internals/simulation/files.d.mts +49 -0
  96. package/dist/internals/simulation/files.d.mts.map +1 -0
  97. package/dist/internals/simulation/files.mjs +90 -13
  98. package/dist/internals/simulation/files.mjs.map +1 -1
  99. package/dist/internals/simulation/index.cjs +22 -0
  100. package/dist/internals/simulation/index.cjs.map +1 -0
  101. package/dist/internals/simulation/index.d.cts +6 -0
  102. package/dist/internals/simulation/index.d.cts.map +1 -0
  103. package/dist/internals/simulation/index.d.mts +6 -0
  104. package/dist/internals/simulation/index.d.mts.map +1 -0
  105. package/dist/internals/simulation/index.mjs +5 -102
  106. package/dist/internals/simulation/index.mjs.map +1 -1
  107. package/dist/internals/simulation/interface.cjs +527 -0
  108. package/dist/internals/simulation/interface.cjs.map +1 -0
  109. package/dist/{types/internals/simulation/interface.d.ts → internals/simulation/interface.d.cts} +38 -10
  110. package/dist/internals/simulation/interface.d.cts.map +1 -0
  111. package/dist/internals/simulation/interface.d.mts +152 -0
  112. package/dist/internals/simulation/interface.d.mts.map +1 -0
  113. package/dist/internals/simulation/interface.mjs +512 -30
  114. package/dist/internals/simulation/interface.mjs.map +1 -1
  115. package/dist/internals/simulation/methods/constants.cjs +72 -0
  116. package/dist/internals/simulation/methods/constants.cjs.map +1 -0
  117. package/dist/{types/internals/simulation/methods/constants.d.ts → internals/simulation/methods/constants.d.cts} +1 -0
  118. package/dist/internals/simulation/methods/constants.d.cts.map +1 -0
  119. package/dist/internals/simulation/methods/constants.d.mts +11 -0
  120. package/dist/internals/simulation/methods/constants.d.mts.map +1 -0
  121. package/dist/internals/simulation/methods/constants.mjs +68 -11
  122. package/dist/internals/simulation/methods/constants.mjs.map +1 -1
  123. package/dist/internals/simulation/methods/hooks/get-preferences.cjs +18 -0
  124. package/dist/internals/simulation/methods/hooks/get-preferences.cjs.map +1 -0
  125. package/dist/internals/simulation/methods/hooks/get-preferences.d.cts +14 -0
  126. package/dist/internals/simulation/methods/hooks/get-preferences.d.cts.map +1 -0
  127. package/dist/internals/simulation/methods/hooks/get-preferences.d.mts +14 -0
  128. package/dist/internals/simulation/methods/hooks/get-preferences.d.mts.map +1 -0
  129. package/dist/internals/simulation/methods/hooks/get-preferences.mjs +14 -0
  130. package/dist/internals/simulation/methods/hooks/get-preferences.mjs.map +1 -0
  131. package/dist/internals/simulation/methods/hooks/index.cjs +22 -0
  132. package/dist/internals/simulation/methods/hooks/index.cjs.map +1 -0
  133. package/dist/internals/simulation/methods/hooks/index.d.cts +6 -0
  134. package/dist/internals/simulation/methods/hooks/index.d.cts.map +1 -0
  135. package/dist/internals/simulation/methods/hooks/index.d.mts +6 -0
  136. package/dist/internals/simulation/methods/hooks/index.d.mts.map +1 -0
  137. package/dist/internals/simulation/methods/hooks/index.mjs +5 -38
  138. package/dist/internals/simulation/methods/hooks/index.mjs.map +1 -1
  139. package/dist/internals/simulation/methods/hooks/interface.cjs +24 -0
  140. package/dist/internals/simulation/methods/hooks/interface.cjs.map +1 -0
  141. package/dist/{types/internals/simulation/methods/hooks/interface.d.ts → internals/simulation/methods/hooks/interface.d.cts} +3 -2
  142. package/dist/internals/simulation/methods/hooks/interface.d.cts.map +1 -0
  143. package/dist/internals/simulation/methods/hooks/interface.d.mts +17 -0
  144. package/dist/internals/simulation/methods/hooks/interface.d.mts.map +1 -0
  145. package/dist/internals/simulation/methods/hooks/interface.mjs +18 -9
  146. package/dist/internals/simulation/methods/hooks/interface.mjs.map +1 -1
  147. package/dist/internals/simulation/methods/hooks/notifications.cjs +58 -0
  148. package/dist/internals/simulation/methods/hooks/notifications.cjs.map +1 -0
  149. package/dist/{types/internals/simulation/methods/hooks/notifications.d.ts → internals/simulation/methods/hooks/notifications.d.cts} +5 -4
  150. package/dist/internals/simulation/methods/hooks/notifications.d.cts.map +1 -0
  151. package/dist/internals/simulation/methods/hooks/notifications.d.mts +17 -0
  152. package/dist/internals/simulation/methods/hooks/notifications.d.mts.map +1 -0
  153. package/dist/internals/simulation/methods/hooks/notifications.mjs +54 -15
  154. package/dist/internals/simulation/methods/hooks/notifications.mjs.map +1 -1
  155. package/dist/internals/simulation/methods/hooks/request-user-approval.cjs +38 -0
  156. package/dist/internals/simulation/methods/hooks/request-user-approval.cjs.map +1 -0
  157. package/dist/internals/simulation/methods/hooks/request-user-approval.d.cts +16 -0
  158. package/dist/internals/simulation/methods/hooks/request-user-approval.d.cts.map +1 -0
  159. package/dist/internals/simulation/methods/hooks/request-user-approval.d.mts +16 -0
  160. package/dist/internals/simulation/methods/hooks/request-user-approval.d.mts.map +1 -0
  161. package/dist/internals/simulation/methods/hooks/request-user-approval.mjs +35 -0
  162. package/dist/internals/simulation/methods/hooks/request-user-approval.mjs.map +1 -0
  163. package/dist/internals/simulation/methods/hooks/state.cjs +84 -0
  164. package/dist/internals/simulation/methods/hooks/state.cjs.map +1 -0
  165. package/dist/{types/internals/simulation/methods/hooks/state.d.ts → internals/simulation/methods/hooks/state.d.cts} +3 -2
  166. package/dist/internals/simulation/methods/hooks/state.d.cts.map +1 -0
  167. package/dist/internals/simulation/methods/hooks/state.d.mts +24 -0
  168. package/dist/internals/simulation/methods/hooks/state.d.mts.map +1 -0
  169. package/dist/internals/simulation/methods/hooks/state.mjs +78 -17
  170. package/dist/internals/simulation/methods/hooks/state.mjs.map +1 -1
  171. package/dist/internals/simulation/methods/index.cjs +18 -0
  172. package/dist/internals/simulation/methods/index.cjs.map +1 -0
  173. package/dist/internals/simulation/methods/index.d.cts +2 -0
  174. package/dist/internals/simulation/methods/index.d.cts.map +1 -0
  175. package/dist/internals/simulation/methods/index.d.mts +2 -0
  176. package/dist/internals/simulation/methods/index.d.mts.map +1 -0
  177. package/dist/internals/simulation/methods/index.mjs +1 -27
  178. package/dist/internals/simulation/methods/index.mjs.map +1 -1
  179. package/dist/internals/simulation/methods/specifications.cjs +85 -0
  180. package/dist/internals/simulation/methods/specifications.cjs.map +1 -0
  181. package/dist/{types/internals/simulation/methods/specifications.d.ts → internals/simulation/methods/specifications.d.cts} +8 -7
  182. package/dist/internals/simulation/methods/specifications.d.cts.map +1 -0
  183. package/dist/internals/simulation/methods/specifications.d.mts +57 -0
  184. package/dist/internals/simulation/methods/specifications.d.mts.map +1 -0
  185. package/dist/internals/simulation/methods/specifications.mjs +77 -26
  186. package/dist/internals/simulation/methods/specifications.mjs.map +1 -1
  187. package/dist/internals/simulation/middleware/engine.cjs +37 -0
  188. package/dist/internals/simulation/middleware/engine.cjs.map +1 -0
  189. package/dist/{types/internals/simulation/middleware/engine.d.ts → internals/simulation/middleware/engine.d.cts} +8 -7
  190. package/dist/internals/simulation/middleware/engine.d.cts.map +1 -0
  191. package/dist/internals/simulation/middleware/engine.d.mts +27 -0
  192. package/dist/internals/simulation/middleware/engine.d.mts.map +1 -0
  193. package/dist/internals/simulation/middleware/engine.mjs +33 -14
  194. package/dist/internals/simulation/middleware/engine.mjs.map +1 -1
  195. package/dist/internals/simulation/middleware/index.cjs +18 -0
  196. package/dist/internals/simulation/middleware/index.cjs.map +1 -0
  197. package/dist/internals/simulation/middleware/index.d.cts +2 -0
  198. package/dist/internals/simulation/middleware/index.d.cts.map +1 -0
  199. package/dist/internals/simulation/middleware/index.d.mts +2 -0
  200. package/dist/internals/simulation/middleware/index.d.mts.map +1 -0
  201. package/dist/internals/simulation/middleware/index.mjs +1 -15
  202. package/dist/internals/simulation/middleware/index.mjs.map +1 -1
  203. package/dist/internals/simulation/middleware/internal-methods/accounts.cjs +34 -0
  204. package/dist/internals/simulation/middleware/internal-methods/accounts.cjs.map +1 -0
  205. package/dist/{types/internals/simulation/middleware/internal-methods/accounts.d.ts → internals/simulation/middleware/internal-methods/accounts.d.cts} +5 -3
  206. package/dist/internals/simulation/middleware/internal-methods/accounts.d.cts.map +1 -0
  207. package/dist/internals/simulation/middleware/internal-methods/accounts.d.mts +20 -0
  208. package/dist/internals/simulation/middleware/internal-methods/accounts.d.mts.map +1 -0
  209. package/dist/internals/simulation/middleware/internal-methods/accounts.mjs +29 -7
  210. package/dist/internals/simulation/middleware/internal-methods/accounts.mjs.map +1 -1
  211. package/dist/internals/simulation/middleware/internal-methods/index.cjs +18 -0
  212. package/dist/internals/simulation/middleware/internal-methods/index.cjs.map +1 -0
  213. package/dist/internals/simulation/middleware/internal-methods/index.d.cts +2 -0
  214. package/dist/internals/simulation/middleware/internal-methods/index.d.cts.map +1 -0
  215. package/dist/internals/simulation/middleware/internal-methods/index.d.mts +2 -0
  216. package/dist/internals/simulation/middleware/internal-methods/index.d.mts.map +1 -0
  217. package/dist/internals/simulation/middleware/internal-methods/index.mjs +1 -10
  218. package/dist/internals/simulation/middleware/internal-methods/index.mjs.map +1 -1
  219. package/dist/internals/simulation/middleware/internal-methods/middleware.cjs +44 -0
  220. package/dist/internals/simulation/middleware/internal-methods/middleware.cjs.map +1 -0
  221. package/dist/{types/internals/simulation/middleware/internal-methods/middleware.d.ts → internals/simulation/middleware/internal-methods/middleware.d.cts} +4 -3
  222. package/dist/internals/simulation/middleware/internal-methods/middleware.d.cts.map +1 -0
  223. package/dist/internals/simulation/middleware/internal-methods/middleware.d.mts +23 -0
  224. package/dist/internals/simulation/middleware/internal-methods/middleware.d.mts.map +1 -0
  225. package/dist/internals/simulation/middleware/internal-methods/middleware.mjs +38 -8
  226. package/dist/internals/simulation/middleware/internal-methods/middleware.mjs.map +1 -1
  227. package/dist/internals/simulation/middleware/internal-methods/provider-state.cjs +28 -0
  228. package/dist/internals/simulation/middleware/internal-methods/provider-state.cjs.map +1 -0
  229. package/dist/{types/internals/simulation/middleware/internal-methods/provider-state.d.ts → internals/simulation/middleware/internal-methods/provider-state.d.cts} +4 -2
  230. package/dist/internals/simulation/middleware/internal-methods/provider-state.d.cts.map +1 -0
  231. package/dist/internals/simulation/middleware/internal-methods/provider-state.d.mts +16 -0
  232. package/dist/internals/simulation/middleware/internal-methods/provider-state.d.mts.map +1 -0
  233. package/dist/internals/simulation/middleware/internal-methods/provider-state.mjs +23 -7
  234. package/dist/internals/simulation/middleware/internal-methods/provider-state.mjs.map +1 -1
  235. package/dist/internals/simulation/middleware/mock.cjs +22 -0
  236. package/dist/internals/simulation/middleware/mock.cjs.map +1 -0
  237. package/dist/{types/internals/simulation/middleware/mock.d.ts → internals/simulation/middleware/mock.d.cts} +4 -3
  238. package/dist/internals/simulation/middleware/mock.d.cts.map +1 -0
  239. package/dist/internals/simulation/middleware/mock.d.mts +11 -0
  240. package/dist/internals/simulation/middleware/mock.d.mts.map +1 -0
  241. package/dist/internals/simulation/middleware/mock.mjs +17 -8
  242. package/dist/internals/simulation/middleware/mock.mjs.map +1 -1
  243. package/dist/internals/simulation/options.cjs +25 -0
  244. package/dist/internals/simulation/options.cjs.map +1 -0
  245. package/dist/{types/internals/simulation/options.d.ts → internals/simulation/options.d.cts} +11 -8
  246. package/dist/internals/simulation/options.d.cts.map +1 -0
  247. package/dist/internals/simulation/options.d.mts +40 -0
  248. package/dist/internals/simulation/options.d.mts.map +1 -0
  249. package/dist/internals/simulation/options.mjs +20 -8
  250. package/dist/internals/simulation/options.mjs.map +1 -1
  251. package/dist/internals/simulation/simulation.cjs +155 -0
  252. package/dist/internals/simulation/simulation.cjs.map +1 -0
  253. package/dist/{types/internals/simulation/simulation.d.ts → internals/simulation/simulation.d.cts} +18 -13
  254. package/dist/internals/simulation/simulation.d.cts.map +1 -0
  255. package/dist/internals/simulation/simulation.d.mts +103 -0
  256. package/dist/internals/simulation/simulation.d.mts.map +1 -0
  257. package/dist/internals/simulation/simulation.mjs +149 -37
  258. package/dist/internals/simulation/simulation.mjs.map +1 -1
  259. package/dist/internals/simulation/store/index.cjs +21 -0
  260. package/dist/internals/simulation/store/index.cjs.map +1 -0
  261. package/dist/internals/simulation/store/index.d.cts +5 -0
  262. package/dist/internals/simulation/store/index.d.cts.map +1 -0
  263. package/dist/internals/simulation/store/index.d.mts +5 -0
  264. package/dist/internals/simulation/store/index.d.mts.map +1 -0
  265. package/dist/internals/simulation/store/index.mjs +4 -43
  266. package/dist/internals/simulation/store/index.mjs.map +1 -1
  267. package/dist/internals/simulation/store/mocks.cjs +39 -0
  268. package/dist/internals/simulation/store/mocks.cjs.map +1 -0
  269. package/dist/{types/internals/simulation/store/mocks.d.ts → internals/simulation/store/mocks.d.cts} +8 -7
  270. package/dist/internals/simulation/store/mocks.d.cts.map +1 -0
  271. package/dist/internals/simulation/store/mocks.d.mts +36 -0
  272. package/dist/internals/simulation/store/mocks.d.mts.map +1 -0
  273. package/dist/internals/simulation/store/mocks.mjs +33 -14
  274. package/dist/internals/simulation/store/mocks.mjs.map +1 -1
  275. package/dist/internals/simulation/store/notifications.cjs +35 -0
  276. package/dist/internals/simulation/store/notifications.cjs.map +1 -0
  277. package/dist/{types/internals/simulation/store/notifications.d.ts → internals/simulation/store/notifications.d.cts} +8 -7
  278. package/dist/internals/simulation/store/notifications.d.cts.map +1 -0
  279. package/dist/internals/simulation/store/notifications.d.mts +45 -0
  280. package/dist/internals/simulation/store/notifications.d.mts.map +1 -0
  281. package/dist/internals/simulation/store/notifications.mjs +30 -14
  282. package/dist/internals/simulation/store/notifications.mjs.map +1 -1
  283. package/dist/internals/simulation/store/state.cjs +54 -0
  284. package/dist/internals/simulation/store/state.cjs.map +1 -0
  285. package/dist/{types/internals/simulation/store/state.d.ts → internals/simulation/store/state.d.cts} +7 -6
  286. package/dist/internals/simulation/store/state.d.cts.map +1 -0
  287. package/dist/internals/simulation/store/state.d.mts +56 -0
  288. package/dist/internals/simulation/store/state.d.mts.map +1 -0
  289. package/dist/internals/simulation/store/state.mjs +48 -12
  290. package/dist/internals/simulation/store/state.mjs.map +1 -1
  291. package/dist/internals/simulation/store/store.cjs +51 -0
  292. package/dist/internals/simulation/store/store.cjs.map +1 -0
  293. package/dist/{types/internals/simulation/store/store.d.ts → internals/simulation/store/store.d.cts} +6 -5
  294. package/dist/internals/simulation/store/store.d.cts.map +1 -0
  295. package/dist/internals/simulation/store/store.d.mts +22 -0
  296. package/dist/internals/simulation/store/store.d.mts.map +1 -0
  297. package/dist/internals/simulation/store/store.mjs +44 -11
  298. package/dist/internals/simulation/store/store.mjs.map +1 -1
  299. package/dist/internals/simulation/store/ui.cjs +24 -0
  300. package/dist/internals/simulation/store/ui.cjs.map +1 -0
  301. package/dist/{types/internals/simulation/store/ui.d.ts → internals/simulation/store/ui.d.cts} +9 -7
  302. package/dist/internals/simulation/store/ui.d.cts.map +1 -0
  303. package/dist/internals/simulation/store/ui.d.mts +27 -0
  304. package/dist/internals/simulation/store/ui.d.mts.map +1 -0
  305. package/dist/internals/simulation/store/ui.mjs +19 -14
  306. package/dist/internals/simulation/store/ui.mjs.map +1 -1
  307. package/dist/internals/structs.cjs +157 -0
  308. package/dist/internals/structs.cjs.map +1 -0
  309. package/dist/{types/internals/structs.d.ts → internals/structs.d.cts} +67 -66
  310. package/dist/internals/structs.d.cts.map +1 -0
  311. package/dist/internals/structs.d.mts +205 -0
  312. package/dist/internals/structs.d.mts.map +1 -0
  313. package/dist/internals/structs.mjs +153 -21
  314. package/dist/internals/structs.mjs.map +1 -1
  315. package/dist/matchers.cjs +160 -0
  316. package/dist/matchers.cjs.map +1 -0
  317. package/dist/{types/matchers.d.ts → matchers.d.cts} +4 -13
  318. package/dist/matchers.d.cts.map +1 -0
  319. package/dist/matchers.d.mts +28 -0
  320. package/dist/matchers.d.mts.map +1 -0
  321. package/dist/matchers.mjs +152 -49
  322. package/dist/matchers.mjs.map +1 -1
  323. package/dist/options.cjs +24 -0
  324. package/dist/options.cjs.map +1 -0
  325. package/dist/{types/options.d.ts → options.d.cts} +8 -7
  326. package/dist/options.d.cts.map +1 -0
  327. package/dist/options.d.mts +61 -0
  328. package/dist/options.d.mts.map +1 -0
  329. package/dist/options.mjs +19 -7
  330. package/dist/options.mjs.map +1 -1
  331. package/dist/setup.cjs +7 -0
  332. package/dist/setup.cjs.map +1 -0
  333. package/dist/setup.d.cts +2 -0
  334. package/dist/setup.d.cts.map +1 -0
  335. package/dist/setup.d.mts +2 -0
  336. package/dist/setup.d.mts.map +1 -0
  337. package/dist/setup.mjs +4 -37
  338. package/dist/setup.mjs.map +1 -1
  339. package/dist/types/index.cjs +18 -0
  340. package/dist/types/index.cjs.map +1 -0
  341. package/dist/types/index.d.cts +2 -0
  342. package/dist/types/index.d.cts.map +1 -0
  343. package/dist/types/index.d.mts +2 -0
  344. package/dist/types/index.d.mts.map +1 -0
  345. package/dist/types/index.mjs +2 -0
  346. package/dist/types/index.mjs.map +1 -0
  347. package/dist/types/types.cjs +3 -0
  348. package/dist/types/types.cjs.map +1 -0
  349. package/dist/types/{types.d.ts → types.d.cts} +66 -26
  350. package/dist/types/types.d.cts.map +1 -0
  351. package/dist/types/types.d.mts +386 -0
  352. package/dist/types/types.d.mts.map +1 -0
  353. package/dist/types/types.mjs +2 -0
  354. package/dist/types/types.mjs.map +1 -0
  355. package/jest-preset.js +1 -1
  356. package/package.json +32 -30
  357. package/dist/chunk-265BMFM5.js +0 -13
  358. package/dist/chunk-265BMFM5.js.map +0 -1
  359. package/dist/chunk-2JTGBHPR.js +0 -14
  360. package/dist/chunk-2JTGBHPR.js.map +0 -1
  361. package/dist/chunk-2YE2P5BZ.js +0 -36
  362. package/dist/chunk-2YE2P5BZ.js.map +0 -1
  363. package/dist/chunk-3FNLFVV2.js +0 -15
  364. package/dist/chunk-3FNLFVV2.js.map +0 -1
  365. package/dist/chunk-3M4GRUMH.mjs +0 -54
  366. package/dist/chunk-3M4GRUMH.mjs.map +0 -1
  367. package/dist/chunk-43HRTFLS.mjs +0 -421
  368. package/dist/chunk-43HRTFLS.mjs.map +0 -1
  369. package/dist/chunk-44ARQBXS.js +0 -95
  370. package/dist/chunk-44ARQBXS.js.map +0 -1
  371. package/dist/chunk-4MAA7WGJ.js +0 -153
  372. package/dist/chunk-4MAA7WGJ.js.map +0 -1
  373. package/dist/chunk-55J6XMHW.js +0 -1
  374. package/dist/chunk-55J6XMHW.js.map +0 -1
  375. package/dist/chunk-57SGDM5B.mjs +0 -69
  376. package/dist/chunk-57SGDM5B.mjs.map +0 -1
  377. package/dist/chunk-5SGLRSWR.mjs +0 -153
  378. package/dist/chunk-5SGLRSWR.mjs.map +0 -1
  379. package/dist/chunk-5U5WB3SM.mjs +0 -41
  380. package/dist/chunk-5U5WB3SM.mjs.map +0 -1
  381. package/dist/chunk-5ZFHFICZ.mjs +0 -1
  382. package/dist/chunk-5ZFHFICZ.mjs.map +0 -1
  383. package/dist/chunk-6HHV6YFQ.mjs +0 -1
  384. package/dist/chunk-6HHV6YFQ.mjs.map +0 -1
  385. package/dist/chunk-6KXCBUNZ.mjs +0 -11
  386. package/dist/chunk-6KXCBUNZ.mjs.map +0 -1
  387. package/dist/chunk-74TIKA2T.mjs +0 -34
  388. package/dist/chunk-74TIKA2T.mjs.map +0 -1
  389. package/dist/chunk-7Y27L2EV.js +0 -211
  390. package/dist/chunk-7Y27L2EV.js.map +0 -1
  391. package/dist/chunk-ALRZENWP.mjs +0 -42
  392. package/dist/chunk-ALRZENWP.mjs.map +0 -1
  393. package/dist/chunk-B73P64TE.mjs +0 -28
  394. package/dist/chunk-B73P64TE.mjs.map +0 -1
  395. package/dist/chunk-CKRORVDW.js +0 -1
  396. package/dist/chunk-CKRORVDW.js.map +0 -1
  397. package/dist/chunk-CYPP66I7.mjs +0 -163
  398. package/dist/chunk-CYPP66I7.mjs.map +0 -1
  399. package/dist/chunk-DR6Y7IVX.js +0 -1
  400. package/dist/chunk-DR6Y7IVX.js.map +0 -1
  401. package/dist/chunk-DVDAOXO7.js +0 -134
  402. package/dist/chunk-DVDAOXO7.js.map +0 -1
  403. package/dist/chunk-EMTW3H54.js +0 -20
  404. package/dist/chunk-EMTW3H54.js.map +0 -1
  405. package/dist/chunk-FP4H3ADT.mjs +0 -20
  406. package/dist/chunk-FP4H3ADT.mjs.map +0 -1
  407. package/dist/chunk-FQWOVTBB.mjs +0 -22
  408. package/dist/chunk-FQWOVTBB.mjs.map +0 -1
  409. package/dist/chunk-GECE47HW.js +0 -1
  410. package/dist/chunk-GECE47HW.js.map +0 -1
  411. package/dist/chunk-GG2BCPQH.mjs +0 -95
  412. package/dist/chunk-GG2BCPQH.mjs.map +0 -1
  413. package/dist/chunk-GMTKFAWO.js +0 -42
  414. package/dist/chunk-GMTKFAWO.js.map +0 -1
  415. package/dist/chunk-GVTDUKXK.js +0 -421
  416. package/dist/chunk-GVTDUKXK.js.map +0 -1
  417. package/dist/chunk-H2464AXT.mjs +0 -33
  418. package/dist/chunk-H2464AXT.mjs.map +0 -1
  419. package/dist/chunk-HOI6FPLR.mjs +0 -240
  420. package/dist/chunk-HOI6FPLR.mjs.map +0 -1
  421. package/dist/chunk-HROOL3VI.js +0 -1
  422. package/dist/chunk-HROOL3VI.js.map +0 -1
  423. package/dist/chunk-IH7UNS5A.mjs +0 -36
  424. package/dist/chunk-IH7UNS5A.mjs.map +0 -1
  425. package/dist/chunk-IVFVB4VR.js +0 -163
  426. package/dist/chunk-IVFVB4VR.js.map +0 -1
  427. package/dist/chunk-IWJ4HKDR.mjs +0 -50
  428. package/dist/chunk-IWJ4HKDR.mjs.map +0 -1
  429. package/dist/chunk-IXKO6X55.mjs +0 -15
  430. package/dist/chunk-IXKO6X55.mjs.map +0 -1
  431. package/dist/chunk-J3I5KZIF.js +0 -22
  432. package/dist/chunk-J3I5KZIF.js.map +0 -1
  433. package/dist/chunk-J4ZPUCLX.mjs +0 -8
  434. package/dist/chunk-J4ZPUCLX.mjs.map +0 -1
  435. package/dist/chunk-JMDSN227.mjs +0 -25
  436. package/dist/chunk-JMDSN227.mjs.map +0 -1
  437. package/dist/chunk-KIQOUUEZ.mjs +0 -1
  438. package/dist/chunk-KIQOUUEZ.mjs.map +0 -1
  439. package/dist/chunk-KNJNL723.mjs +0 -39
  440. package/dist/chunk-KNJNL723.mjs.map +0 -1
  441. package/dist/chunk-KSIBNOB2.mjs +0 -13
  442. package/dist/chunk-KSIBNOB2.mjs.map +0 -1
  443. package/dist/chunk-LACTK6EO.js +0 -33
  444. package/dist/chunk-LACTK6EO.js.map +0 -1
  445. package/dist/chunk-LB4R3BUA.mjs +0 -36
  446. package/dist/chunk-LB4R3BUA.mjs.map +0 -1
  447. package/dist/chunk-LBC2OGSN.js +0 -48
  448. package/dist/chunk-LBC2OGSN.js.map +0 -1
  449. package/dist/chunk-MAT5SBM7.mjs +0 -211
  450. package/dist/chunk-MAT5SBM7.mjs.map +0 -1
  451. package/dist/chunk-MBQHVBLA.js +0 -89
  452. package/dist/chunk-MBQHVBLA.js.map +0 -1
  453. package/dist/chunk-MF43OG3Z.mjs +0 -1
  454. package/dist/chunk-MF43OG3Z.mjs.map +0 -1
  455. package/dist/chunk-MPZOXW6I.mjs +0 -48
  456. package/dist/chunk-MPZOXW6I.mjs.map +0 -1
  457. package/dist/chunk-N6MAO223.js +0 -60
  458. package/dist/chunk-N6MAO223.js.map +0 -1
  459. package/dist/chunk-NSMTFK33.mjs +0 -104
  460. package/dist/chunk-NSMTFK33.mjs.map +0 -1
  461. package/dist/chunk-NTOY6Y4Q.mjs +0 -1
  462. package/dist/chunk-NTOY6Y4Q.mjs.map +0 -1
  463. package/dist/chunk-O24GTINW.mjs +0 -134
  464. package/dist/chunk-O24GTINW.mjs.map +0 -1
  465. package/dist/chunk-ORO3T6BU.mjs +0 -24
  466. package/dist/chunk-ORO3T6BU.mjs.map +0 -1
  467. package/dist/chunk-PHUTP7NB.js +0 -25
  468. package/dist/chunk-PHUTP7NB.js.map +0 -1
  469. package/dist/chunk-PZDTZGSI.js +0 -34
  470. package/dist/chunk-PZDTZGSI.js.map +0 -1
  471. package/dist/chunk-Q2OQXAUM.mjs +0 -35
  472. package/dist/chunk-Q2OQXAUM.mjs.map +0 -1
  473. package/dist/chunk-RAMAN5RM.js +0 -24
  474. package/dist/chunk-RAMAN5RM.js.map +0 -1
  475. package/dist/chunk-RQKT6BQ2.mjs +0 -1
  476. package/dist/chunk-RQKT6BQ2.mjs.map +0 -1
  477. package/dist/chunk-S2HLITUN.js +0 -1
  478. package/dist/chunk-S2HLITUN.js.map +0 -1
  479. package/dist/chunk-SB5EPHE3.js +0 -41
  480. package/dist/chunk-SB5EPHE3.js.map +0 -1
  481. package/dist/chunk-SLU4FNKX.mjs +0 -60
  482. package/dist/chunk-SLU4FNKX.mjs.map +0 -1
  483. package/dist/chunk-SW65QYFV.js +0 -50
  484. package/dist/chunk-SW65QYFV.js.map +0 -1
  485. package/dist/chunk-T2PHS5FY.js +0 -28
  486. package/dist/chunk-T2PHS5FY.js.map +0 -1
  487. package/dist/chunk-TGZ7WOTJ.mjs +0 -1
  488. package/dist/chunk-TGZ7WOTJ.mjs.map +0 -1
  489. package/dist/chunk-TMAWGVZP.mjs +0 -89
  490. package/dist/chunk-TMAWGVZP.mjs.map +0 -1
  491. package/dist/chunk-TZB4LBT7.js +0 -8
  492. package/dist/chunk-TZB4LBT7.js.map +0 -1
  493. package/dist/chunk-UDOXICJK.mjs +0 -1
  494. package/dist/chunk-UDOXICJK.mjs.map +0 -1
  495. package/dist/chunk-VHJZERIC.js +0 -1
  496. package/dist/chunk-VHJZERIC.js.map +0 -1
  497. package/dist/chunk-VOYBI6T4.mjs +0 -22
  498. package/dist/chunk-VOYBI6T4.mjs.map +0 -1
  499. package/dist/chunk-VXPCUDBI.js +0 -36
  500. package/dist/chunk-VXPCUDBI.js.map +0 -1
  501. package/dist/chunk-WDYPMEZB.js +0 -22
  502. package/dist/chunk-WDYPMEZB.js.map +0 -1
  503. package/dist/chunk-WHGYMK5B.js +0 -1
  504. package/dist/chunk-WHGYMK5B.js.map +0 -1
  505. package/dist/chunk-WMLSD6B5.js +0 -54
  506. package/dist/chunk-WMLSD6B5.js.map +0 -1
  507. package/dist/chunk-WRKY2DLV.js +0 -104
  508. package/dist/chunk-WRKY2DLV.js.map +0 -1
  509. package/dist/chunk-XAOCS6ZD.js +0 -69
  510. package/dist/chunk-XAOCS6ZD.js.map +0 -1
  511. package/dist/chunk-XK5HPZZC.mjs +0 -14
  512. package/dist/chunk-XK5HPZZC.mjs.map +0 -1
  513. package/dist/chunk-XKJHFUHE.js +0 -11
  514. package/dist/chunk-XKJHFUHE.js.map +0 -1
  515. package/dist/chunk-XWGECIXI.js +0 -39
  516. package/dist/chunk-XWGECIXI.js.map +0 -1
  517. package/dist/chunk-Y3JC4WGW.js +0 -35
  518. package/dist/chunk-Y3JC4WGW.js.map +0 -1
  519. package/dist/chunk-YNUVT3HC.js +0 -240
  520. package/dist/chunk-YNUVT3HC.js.map +0 -1
  521. package/dist/chunk-ZG33OGC3.mjs +0 -1
  522. package/dist/chunk-ZG33OGC3.mjs.map +0 -1
  523. package/dist/chunk-ZTX624YO.js +0 -1
  524. package/dist/chunk-ZTX624YO.js.map +0 -1
  525. package/dist/environment.js +0 -46
  526. package/dist/environment.js.map +0 -1
  527. package/dist/global.js +0 -2
  528. package/dist/global.js.map +0 -1
  529. package/dist/helpers.js +0 -43
  530. package/dist/helpers.js.map +0 -1
  531. package/dist/index.js +0 -54
  532. package/dist/index.js.map +0 -1
  533. package/dist/internals/environment.js +0 -8
  534. package/dist/internals/environment.js.map +0 -1
  535. package/dist/internals/index.js +0 -142
  536. package/dist/internals/index.js.map +0 -1
  537. package/dist/internals/logger.js +0 -8
  538. package/dist/internals/logger.js.map +0 -1
  539. package/dist/internals/request.js +0 -42
  540. package/dist/internals/request.js.map +0 -1
  541. package/dist/internals/server.js +0 -9
  542. package/dist/internals/server.js.map +0 -1
  543. package/dist/internals/simulation/constants.js +0 -12
  544. package/dist/internals/simulation/constants.js.map +0 -1
  545. package/dist/internals/simulation/controllers.js +0 -25
  546. package/dist/internals/simulation/controllers.js.map +0 -1
  547. package/dist/internals/simulation/files.js +0 -14
  548. package/dist/internals/simulation/files.js.map +0 -1
  549. package/dist/internals/simulation/index.js +0 -103
  550. package/dist/internals/simulation/index.js.map +0 -1
  551. package/dist/internals/simulation/interface.js +0 -31
  552. package/dist/internals/simulation/interface.js.map +0 -1
  553. package/dist/internals/simulation/methods/constants.js +0 -12
  554. package/dist/internals/simulation/methods/constants.js.map +0 -1
  555. package/dist/internals/simulation/methods/hooks/get-locale.js +0 -8
  556. package/dist/internals/simulation/methods/hooks/get-locale.js.map +0 -1
  557. package/dist/internals/simulation/methods/hooks/get-locale.mjs +0 -8
  558. package/dist/internals/simulation/methods/hooks/get-locale.mjs.map +0 -1
  559. package/dist/internals/simulation/methods/hooks/index.js +0 -39
  560. package/dist/internals/simulation/methods/hooks/index.js.map +0 -1
  561. package/dist/internals/simulation/methods/hooks/interface.js +0 -10
  562. package/dist/internals/simulation/methods/hooks/interface.js.map +0 -1
  563. package/dist/internals/simulation/methods/hooks/notifications.js +0 -16
  564. package/dist/internals/simulation/methods/hooks/notifications.js.map +0 -1
  565. package/dist/internals/simulation/methods/hooks/show-dialog.js +0 -14
  566. package/dist/internals/simulation/methods/hooks/show-dialog.js.map +0 -1
  567. package/dist/internals/simulation/methods/hooks/show-dialog.mjs +0 -14
  568. package/dist/internals/simulation/methods/hooks/show-dialog.mjs.map +0 -1
  569. package/dist/internals/simulation/methods/hooks/state.js +0 -18
  570. package/dist/internals/simulation/methods/hooks/state.js.map +0 -1
  571. package/dist/internals/simulation/methods/index.js +0 -28
  572. package/dist/internals/simulation/methods/index.js.map +0 -1
  573. package/dist/internals/simulation/methods/specifications.js +0 -27
  574. package/dist/internals/simulation/methods/specifications.js.map +0 -1
  575. package/dist/internals/simulation/middleware/engine.js +0 -15
  576. package/dist/internals/simulation/middleware/engine.js.map +0 -1
  577. package/dist/internals/simulation/middleware/index.js +0 -16
  578. package/dist/internals/simulation/middleware/index.js.map +0 -1
  579. package/dist/internals/simulation/middleware/internal-methods/accounts.js +0 -8
  580. package/dist/internals/simulation/middleware/internal-methods/accounts.js.map +0 -1
  581. package/dist/internals/simulation/middleware/internal-methods/index.js +0 -11
  582. package/dist/internals/simulation/middleware/internal-methods/index.js.map +0 -1
  583. package/dist/internals/simulation/middleware/internal-methods/middleware.js +0 -10
  584. package/dist/internals/simulation/middleware/internal-methods/middleware.js.map +0 -1
  585. package/dist/internals/simulation/middleware/internal-methods/provider-state.js +0 -8
  586. package/dist/internals/simulation/middleware/internal-methods/provider-state.js.map +0 -1
  587. package/dist/internals/simulation/middleware/mock.js +0 -9
  588. package/dist/internals/simulation/middleware/mock.js.map +0 -1
  589. package/dist/internals/simulation/options.js +0 -9
  590. package/dist/internals/simulation/options.js.map +0 -1
  591. package/dist/internals/simulation/simulation.js +0 -38
  592. package/dist/internals/simulation/simulation.js.map +0 -1
  593. package/dist/internals/simulation/store/index.js +0 -44
  594. package/dist/internals/simulation/store/index.js.map +0 -1
  595. package/dist/internals/simulation/store/mocks.js +0 -16
  596. package/dist/internals/simulation/store/mocks.js.map +0 -1
  597. package/dist/internals/simulation/store/notifications.js +0 -16
  598. package/dist/internals/simulation/store/notifications.js.map +0 -1
  599. package/dist/internals/simulation/store/state.js +0 -14
  600. package/dist/internals/simulation/store/state.js.map +0 -1
  601. package/dist/internals/simulation/store/store.js +0 -12
  602. package/dist/internals/simulation/store/store.js.map +0 -1
  603. package/dist/internals/simulation/store/ui.js +0 -16
  604. package/dist/internals/simulation/store/ui.js.map +0 -1
  605. package/dist/internals/structs.js +0 -22
  606. package/dist/internals/structs.js.map +0 -1
  607. package/dist/matchers.js +0 -51
  608. package/dist/matchers.js.map +0 -1
  609. package/dist/options.js +0 -8
  610. package/dist/options.js.map +0 -1
  611. package/dist/setup.js +0 -38
  612. package/dist/setup.js.map +0 -1
  613. package/dist/tsconfig.build.tsbuildinfo +0 -1
  614. package/dist/types/index.d.ts +0 -5
  615. package/dist/types/internals/index.d.ts +0 -6
  616. package/dist/types/internals/simulation/index.d.ts +0 -5
  617. package/dist/types/internals/simulation/methods/hooks/get-locale.d.ts +0 -9
  618. package/dist/types/internals/simulation/methods/hooks/index.d.ts +0 -5
  619. package/dist/types/internals/simulation/methods/hooks/show-dialog.d.ts +0 -9
  620. package/dist/types/internals/simulation/methods/index.d.ts +0 -1
  621. package/dist/types/internals/simulation/middleware/index.d.ts +0 -1
  622. package/dist/types/internals/simulation/middleware/internal-methods/index.d.ts +0 -1
  623. package/dist/types/internals/simulation/store/index.d.ts +0 -4
  624. package/dist/types/setup.d.ts +0 -1
  625. package/dist/types/vendor/readable-stream.d.js +0 -1
  626. package/dist/types/vendor/readable-stream.d.js.map +0 -1
  627. package/dist/types/vendor/readable-stream.d.mjs +0 -1
  628. package/dist/types/vendor/readable-stream.d.mjs.map +0 -1
  629. package/dist/types.js +0 -2
  630. package/dist/types.js.map +0 -1
  631. package/dist/types.mjs +0 -2
  632. package/dist/types.mjs.map +0 -1
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UNRESTRICTED_METHODS = exports.EXCLUDED_SNAP_PERMISSIONS = exports.EXCLUDED_SNAP_ENDOWMENTS = void 0;
4
+ exports.EXCLUDED_SNAP_ENDOWMENTS = [];
5
+ exports.EXCLUDED_SNAP_PERMISSIONS = [];
6
+ /**
7
+ * All unrestricted methods recognized by the `PermissionController`.
8
+ * Unrestricted methods are ignored by the permission system, but every
9
+ * JSON-RPC request seen by the permission system must correspond to a
10
+ * restricted or unrestricted method, or the request will be rejected with a
11
+ * "method not found" error.
12
+ */
13
+ exports.UNRESTRICTED_METHODS = Object.freeze([
14
+ 'eth_blockNumber',
15
+ 'eth_call',
16
+ 'eth_chainId',
17
+ 'eth_coinbase',
18
+ 'eth_decrypt',
19
+ 'eth_estimateGas',
20
+ 'eth_feeHistory',
21
+ 'eth_gasPrice',
22
+ 'eth_getBalance',
23
+ 'eth_getBlockByHash',
24
+ 'eth_getBlockByNumber',
25
+ 'eth_getBlockTransactionCountByHash',
26
+ 'eth_getBlockTransactionCountByNumber',
27
+ 'eth_getCode',
28
+ 'eth_getEncryptionPublicKey',
29
+ 'eth_getFilterChanges',
30
+ 'eth_getFilterLogs',
31
+ 'eth_getLogs',
32
+ 'eth_getProof',
33
+ 'eth_getStorageAt',
34
+ 'eth_getTransactionByBlockHashAndIndex',
35
+ 'eth_getTransactionByBlockNumberAndIndex',
36
+ 'eth_getTransactionByHash',
37
+ 'eth_getTransactionCount',
38
+ 'eth_getTransactionReceipt',
39
+ 'eth_getUncleByBlockHashAndIndex',
40
+ 'eth_getUncleByBlockNumberAndIndex',
41
+ 'eth_getUncleCountByBlockHash',
42
+ 'eth_getUncleCountByBlockNumber',
43
+ 'eth_getWork',
44
+ 'eth_hashrate',
45
+ 'eth_mining',
46
+ 'eth_newBlockFilter',
47
+ 'eth_newFilter',
48
+ 'eth_newPendingTransactionFilter',
49
+ 'eth_protocolVersion',
50
+ 'eth_sendRawTransaction',
51
+ 'eth_sendTransaction',
52
+ 'eth_sign',
53
+ 'eth_signTypedData',
54
+ 'eth_signTypedData_v1',
55
+ 'eth_signTypedData_v3',
56
+ 'eth_signTypedData_v4',
57
+ 'eth_submitHashrate',
58
+ 'eth_submitWork',
59
+ 'eth_syncing',
60
+ 'eth_uninstallFilter',
61
+ 'metamask_getProviderState',
62
+ 'metamask_watchAsset',
63
+ 'net_listening',
64
+ 'net_peerCount',
65
+ 'net_version',
66
+ 'personal_ecRecover',
67
+ 'personal_sign',
68
+ 'wallet_watchAsset',
69
+ 'web3_clientVersion',
70
+ 'web3_sha3',
71
+ ]);
72
+ //# sourceMappingURL=constants.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../../../src/internals/simulation/methods/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG,EAAE,CAAC;AAE9B,QAAA,yBAAyB,GAAG,EAAE,CAAC;AAE5C;;;;;;GAMG;AACU,QAAA,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,iBAAiB;IACjB,UAAU;IACV,aAAa;IACb,cAAc;IACd,aAAa;IACb,iBAAiB;IACjB,gBAAgB;IAChB,cAAc;IACd,gBAAgB;IAChB,oBAAoB;IACpB,sBAAsB;IACtB,oCAAoC;IACpC,sCAAsC;IACtC,aAAa;IACb,4BAA4B;IAC5B,sBAAsB;IACtB,mBAAmB;IACnB,aAAa;IACb,cAAc;IACd,kBAAkB;IAClB,uCAAuC;IACvC,yCAAyC;IACzC,0BAA0B;IAC1B,yBAAyB;IACzB,2BAA2B;IAC3B,iCAAiC;IACjC,mCAAmC;IACnC,8BAA8B;IAC9B,gCAAgC;IAChC,aAAa;IACb,cAAc;IACd,YAAY;IACZ,oBAAoB;IACpB,eAAe;IACf,iCAAiC;IACjC,qBAAqB;IACrB,wBAAwB;IACxB,qBAAqB;IACrB,UAAU;IACV,mBAAmB;IACnB,sBAAsB;IACtB,sBAAsB;IACtB,sBAAsB;IACtB,oBAAoB;IACpB,gBAAgB;IAChB,aAAa;IACb,qBAAqB;IACrB,2BAA2B;IAC3B,qBAAqB;IACrB,eAAe;IACf,eAAe;IACf,aAAa;IACb,oBAAoB;IACpB,eAAe;IACf,mBAAmB;IACnB,oBAAoB;IACpB,WAAW;CACZ,CAAC,CAAC","sourcesContent":["export const EXCLUDED_SNAP_ENDOWMENTS = [];\n\nexport const EXCLUDED_SNAP_PERMISSIONS = [];\n\n/**\n * All unrestricted methods recognized by the `PermissionController`.\n * Unrestricted methods are ignored by the permission system, but every\n * JSON-RPC request seen by the permission system must correspond to a\n * restricted or unrestricted method, or the request will be rejected with a\n * \"method not found\" error.\n */\nexport const UNRESTRICTED_METHODS = Object.freeze([\n 'eth_blockNumber',\n 'eth_call',\n 'eth_chainId',\n 'eth_coinbase',\n 'eth_decrypt',\n 'eth_estimateGas',\n 'eth_feeHistory',\n 'eth_gasPrice',\n 'eth_getBalance',\n 'eth_getBlockByHash',\n 'eth_getBlockByNumber',\n 'eth_getBlockTransactionCountByHash',\n 'eth_getBlockTransactionCountByNumber',\n 'eth_getCode',\n 'eth_getEncryptionPublicKey',\n 'eth_getFilterChanges',\n 'eth_getFilterLogs',\n 'eth_getLogs',\n 'eth_getProof',\n 'eth_getStorageAt',\n 'eth_getTransactionByBlockHashAndIndex',\n 'eth_getTransactionByBlockNumberAndIndex',\n 'eth_getTransactionByHash',\n 'eth_getTransactionCount',\n 'eth_getTransactionReceipt',\n 'eth_getUncleByBlockHashAndIndex',\n 'eth_getUncleByBlockNumberAndIndex',\n 'eth_getUncleCountByBlockHash',\n 'eth_getUncleCountByBlockNumber',\n 'eth_getWork',\n 'eth_hashrate',\n 'eth_mining',\n 'eth_newBlockFilter',\n 'eth_newFilter',\n 'eth_newPendingTransactionFilter',\n 'eth_protocolVersion',\n 'eth_sendRawTransaction',\n 'eth_sendTransaction',\n 'eth_sign',\n 'eth_signTypedData',\n 'eth_signTypedData_v1',\n 'eth_signTypedData_v3',\n 'eth_signTypedData_v4',\n 'eth_submitHashrate',\n 'eth_submitWork',\n 'eth_syncing',\n 'eth_uninstallFilter',\n 'metamask_getProviderState',\n 'metamask_watchAsset',\n 'net_listening',\n 'net_peerCount',\n 'net_version',\n 'personal_ecRecover',\n 'personal_sign',\n 'wallet_watchAsset',\n 'web3_clientVersion',\n 'web3_sha3',\n]);\n"]}
@@ -8,3 +8,4 @@ export declare const EXCLUDED_SNAP_PERMISSIONS: never[];
8
8
  * "method not found" error.
9
9
  */
10
10
  export declare const UNRESTRICTED_METHODS: readonly string[];
11
+ //# sourceMappingURL=constants.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../../../src/internals/simulation/methods/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,SAAK,CAAC;AAE3C,eAAO,MAAM,yBAAyB,SAAK,CAAC;AAE5C;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,mBA0D/B,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const EXCLUDED_SNAP_ENDOWMENTS: never[];
2
+ export declare const EXCLUDED_SNAP_PERMISSIONS: never[];
3
+ /**
4
+ * All unrestricted methods recognized by the `PermissionController`.
5
+ * Unrestricted methods are ignored by the permission system, but every
6
+ * JSON-RPC request seen by the permission system must correspond to a
7
+ * restricted or unrestricted method, or the request will be rejected with a
8
+ * "method not found" error.
9
+ */
10
+ export declare const UNRESTRICTED_METHODS: readonly string[];
11
+ //# sourceMappingURL=constants.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../../../src/internals/simulation/methods/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,SAAK,CAAC;AAE3C,eAAO,MAAM,yBAAyB,SAAK,CAAC;AAE5C;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,mBA0D/B,CAAC"}
@@ -1,12 +1,69 @@
1
- import {
2
- EXCLUDED_SNAP_ENDOWMENTS,
3
- EXCLUDED_SNAP_PERMISSIONS,
4
- UNRESTRICTED_METHODS
5
- } from "../../../chunk-57SGDM5B.mjs";
6
- import "../../../chunk-JMDSN227.mjs";
7
- export {
8
- EXCLUDED_SNAP_ENDOWMENTS,
9
- EXCLUDED_SNAP_PERMISSIONS,
10
- UNRESTRICTED_METHODS
11
- };
1
+ export const EXCLUDED_SNAP_ENDOWMENTS = [];
2
+ export const EXCLUDED_SNAP_PERMISSIONS = [];
3
+ /**
4
+ * All unrestricted methods recognized by the `PermissionController`.
5
+ * Unrestricted methods are ignored by the permission system, but every
6
+ * JSON-RPC request seen by the permission system must correspond to a
7
+ * restricted or unrestricted method, or the request will be rejected with a
8
+ * "method not found" error.
9
+ */
10
+ export const UNRESTRICTED_METHODS = Object.freeze([
11
+ 'eth_blockNumber',
12
+ 'eth_call',
13
+ 'eth_chainId',
14
+ 'eth_coinbase',
15
+ 'eth_decrypt',
16
+ 'eth_estimateGas',
17
+ 'eth_feeHistory',
18
+ 'eth_gasPrice',
19
+ 'eth_getBalance',
20
+ 'eth_getBlockByHash',
21
+ 'eth_getBlockByNumber',
22
+ 'eth_getBlockTransactionCountByHash',
23
+ 'eth_getBlockTransactionCountByNumber',
24
+ 'eth_getCode',
25
+ 'eth_getEncryptionPublicKey',
26
+ 'eth_getFilterChanges',
27
+ 'eth_getFilterLogs',
28
+ 'eth_getLogs',
29
+ 'eth_getProof',
30
+ 'eth_getStorageAt',
31
+ 'eth_getTransactionByBlockHashAndIndex',
32
+ 'eth_getTransactionByBlockNumberAndIndex',
33
+ 'eth_getTransactionByHash',
34
+ 'eth_getTransactionCount',
35
+ 'eth_getTransactionReceipt',
36
+ 'eth_getUncleByBlockHashAndIndex',
37
+ 'eth_getUncleByBlockNumberAndIndex',
38
+ 'eth_getUncleCountByBlockHash',
39
+ 'eth_getUncleCountByBlockNumber',
40
+ 'eth_getWork',
41
+ 'eth_hashrate',
42
+ 'eth_mining',
43
+ 'eth_newBlockFilter',
44
+ 'eth_newFilter',
45
+ 'eth_newPendingTransactionFilter',
46
+ 'eth_protocolVersion',
47
+ 'eth_sendRawTransaction',
48
+ 'eth_sendTransaction',
49
+ 'eth_sign',
50
+ 'eth_signTypedData',
51
+ 'eth_signTypedData_v1',
52
+ 'eth_signTypedData_v3',
53
+ 'eth_signTypedData_v4',
54
+ 'eth_submitHashrate',
55
+ 'eth_submitWork',
56
+ 'eth_syncing',
57
+ 'eth_uninstallFilter',
58
+ 'metamask_getProviderState',
59
+ 'metamask_watchAsset',
60
+ 'net_listening',
61
+ 'net_peerCount',
62
+ 'net_version',
63
+ 'personal_ecRecover',
64
+ 'personal_sign',
65
+ 'wallet_watchAsset',
66
+ 'web3_clientVersion',
67
+ 'web3_sha3',
68
+ ]);
12
69
  //# sourceMappingURL=constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../../../src/internals/simulation/methods/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;IAChD,iBAAiB;IACjB,UAAU;IACV,aAAa;IACb,cAAc;IACd,aAAa;IACb,iBAAiB;IACjB,gBAAgB;IAChB,cAAc;IACd,gBAAgB;IAChB,oBAAoB;IACpB,sBAAsB;IACtB,oCAAoC;IACpC,sCAAsC;IACtC,aAAa;IACb,4BAA4B;IAC5B,sBAAsB;IACtB,mBAAmB;IACnB,aAAa;IACb,cAAc;IACd,kBAAkB;IAClB,uCAAuC;IACvC,yCAAyC;IACzC,0BAA0B;IAC1B,yBAAyB;IACzB,2BAA2B;IAC3B,iCAAiC;IACjC,mCAAmC;IACnC,8BAA8B;IAC9B,gCAAgC;IAChC,aAAa;IACb,cAAc;IACd,YAAY;IACZ,oBAAoB;IACpB,eAAe;IACf,iCAAiC;IACjC,qBAAqB;IACrB,wBAAwB;IACxB,qBAAqB;IACrB,UAAU;IACV,mBAAmB;IACnB,sBAAsB;IACtB,sBAAsB;IACtB,sBAAsB;IACtB,oBAAoB;IACpB,gBAAgB;IAChB,aAAa;IACb,qBAAqB;IACrB,2BAA2B;IAC3B,qBAAqB;IACrB,eAAe;IACf,eAAe;IACf,aAAa;IACb,oBAAoB;IACpB,eAAe;IACf,mBAAmB;IACnB,oBAAoB;IACpB,WAAW;CACZ,CAAC,CAAC","sourcesContent":["export const EXCLUDED_SNAP_ENDOWMENTS = [];\n\nexport const EXCLUDED_SNAP_PERMISSIONS = [];\n\n/**\n * All unrestricted methods recognized by the `PermissionController`.\n * Unrestricted methods are ignored by the permission system, but every\n * JSON-RPC request seen by the permission system must correspond to a\n * restricted or unrestricted method, or the request will be rejected with a\n * \"method not found\" error.\n */\nexport const UNRESTRICTED_METHODS = Object.freeze([\n 'eth_blockNumber',\n 'eth_call',\n 'eth_chainId',\n 'eth_coinbase',\n 'eth_decrypt',\n 'eth_estimateGas',\n 'eth_feeHistory',\n 'eth_gasPrice',\n 'eth_getBalance',\n 'eth_getBlockByHash',\n 'eth_getBlockByNumber',\n 'eth_getBlockTransactionCountByHash',\n 'eth_getBlockTransactionCountByNumber',\n 'eth_getCode',\n 'eth_getEncryptionPublicKey',\n 'eth_getFilterChanges',\n 'eth_getFilterLogs',\n 'eth_getLogs',\n 'eth_getProof',\n 'eth_getStorageAt',\n 'eth_getTransactionByBlockHashAndIndex',\n 'eth_getTransactionByBlockNumberAndIndex',\n 'eth_getTransactionByHash',\n 'eth_getTransactionCount',\n 'eth_getTransactionReceipt',\n 'eth_getUncleByBlockHashAndIndex',\n 'eth_getUncleByBlockNumberAndIndex',\n 'eth_getUncleCountByBlockHash',\n 'eth_getUncleCountByBlockNumber',\n 'eth_getWork',\n 'eth_hashrate',\n 'eth_mining',\n 'eth_newBlockFilter',\n 'eth_newFilter',\n 'eth_newPendingTransactionFilter',\n 'eth_protocolVersion',\n 'eth_sendRawTransaction',\n 'eth_sendTransaction',\n 'eth_sign',\n 'eth_signTypedData',\n 'eth_signTypedData_v1',\n 'eth_signTypedData_v3',\n 'eth_signTypedData_v4',\n 'eth_submitHashrate',\n 'eth_submitWork',\n 'eth_syncing',\n 'eth_uninstallFilter',\n 'metamask_getProviderState',\n 'metamask_watchAsset',\n 'net_listening',\n 'net_peerCount',\n 'net_version',\n 'personal_ecRecover',\n 'personal_sign',\n 'wallet_watchAsset',\n 'web3_clientVersion',\n 'web3_sha3',\n]);\n"]}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getGetPreferencesMethodImplementation = void 0;
4
+ /**
5
+ * Get the implementation of the `getPreferences` hook.
6
+ *
7
+ * @param options - The simulation options.
8
+ * @param options.currency - The currency to use.
9
+ * @param options.locale - The locale to use.
10
+ * @returns The implementation of the `getPreferences` hook.
11
+ */
12
+ function getGetPreferencesMethodImplementation({ currency, locale, }) {
13
+ return () => {
14
+ return { currency, locale };
15
+ };
16
+ }
17
+ exports.getGetPreferencesMethodImplementation = getGetPreferencesMethodImplementation;
18
+ //# sourceMappingURL=get-preferences.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-preferences.cjs","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/get-preferences.ts"],"names":[],"mappings":";;;AAEA;;;;;;;GAOG;AACH,SAAgB,qCAAqC,CAAC,EACpD,QAAQ,EACR,MAAM,GACY;IAClB,OAAO,GAAG,EAAE;QACV,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAC9B,CAAC,CAAC;AACJ,CAAC;AAPD,sFAOC","sourcesContent":["import type { SimulationOptions } from '../../options';\n\n/**\n * Get the implementation of the `getPreferences` hook.\n *\n * @param options - The simulation options.\n * @param options.currency - The currency to use.\n * @param options.locale - The locale to use.\n * @returns The implementation of the `getPreferences` hook.\n */\nexport function getGetPreferencesMethodImplementation({\n currency,\n locale,\n}: SimulationOptions) {\n return () => {\n return { currency, locale };\n };\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import type { SimulationOptions } from "../../options.cjs";
2
+ /**
3
+ * Get the implementation of the `getPreferences` hook.
4
+ *
5
+ * @param options - The simulation options.
6
+ * @param options.currency - The currency to use.
7
+ * @param options.locale - The locale to use.
8
+ * @returns The implementation of the `getPreferences` hook.
9
+ */
10
+ export declare function getGetPreferencesMethodImplementation({ currency, locale, }: SimulationOptions): () => {
11
+ currency: string;
12
+ locale: string;
13
+ };
14
+ //# sourceMappingURL=get-preferences.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-preferences.d.cts","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/get-preferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,0BAAsB;AAEvD;;;;;;;GAOG;AACH,wBAAgB,qCAAqC,CAAC,EACpD,QAAQ,EACR,MAAM,GACP,EAAE,iBAAiB;;;EAInB"}
@@ -0,0 +1,14 @@
1
+ import type { SimulationOptions } from "../../options.mjs";
2
+ /**
3
+ * Get the implementation of the `getPreferences` hook.
4
+ *
5
+ * @param options - The simulation options.
6
+ * @param options.currency - The currency to use.
7
+ * @param options.locale - The locale to use.
8
+ * @returns The implementation of the `getPreferences` hook.
9
+ */
10
+ export declare function getGetPreferencesMethodImplementation({ currency, locale, }: SimulationOptions): () => {
11
+ currency: string;
12
+ locale: string;
13
+ };
14
+ //# sourceMappingURL=get-preferences.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-preferences.d.mts","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/get-preferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,0BAAsB;AAEvD;;;;;;;GAOG;AACH,wBAAgB,qCAAqC,CAAC,EACpD,QAAQ,EACR,MAAM,GACP,EAAE,iBAAiB;;;EAInB"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Get the implementation of the `getPreferences` hook.
3
+ *
4
+ * @param options - The simulation options.
5
+ * @param options.currency - The currency to use.
6
+ * @param options.locale - The locale to use.
7
+ * @returns The implementation of the `getPreferences` hook.
8
+ */
9
+ export function getGetPreferencesMethodImplementation({ currency, locale, }) {
10
+ return () => {
11
+ return { currency, locale };
12
+ };
13
+ }
14
+ //# sourceMappingURL=get-preferences.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-preferences.mjs","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/get-preferences.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,UAAU,qCAAqC,CAAC,EACpD,QAAQ,EACR,MAAM,GACY;IAClB,OAAO,GAAG,EAAE;QACV,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAC9B,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import type { SimulationOptions } from '../../options';\n\n/**\n * Get the implementation of the `getPreferences` hook.\n *\n * @param options - The simulation options.\n * @param options.currency - The currency to use.\n * @param options.locale - The locale to use.\n * @returns The implementation of the `getPreferences` hook.\n */\nexport function getGetPreferencesMethodImplementation({\n currency,\n locale,\n}: SimulationOptions) {\n return () => {\n return { currency, locale };\n };\n}\n"]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./get-preferences.cjs"), exports);
18
+ __exportStar(require("./notifications.cjs"), exports);
19
+ __exportStar(require("./request-user-approval.cjs"), exports);
20
+ __exportStar(require("./state.cjs"), exports);
21
+ __exportStar(require("./interface.cjs"), exports);
22
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAkC;AAClC,sDAAgC;AAChC,8DAAwC;AACxC,8CAAwB;AACxB,kDAA4B","sourcesContent":["export * from './get-preferences';\nexport * from './notifications';\nexport * from './request-user-approval';\nexport * from './state';\nexport * from './interface';\n"]}
@@ -0,0 +1,6 @@
1
+ export * from "./get-preferences.cjs";
2
+ export * from "./notifications.cjs";
3
+ export * from "./request-user-approval.cjs";
4
+ export * from "./state.cjs";
5
+ export * from "./interface.cjs";
6
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/index.ts"],"names":[],"mappings":"AAAA,sCAAkC;AAClC,oCAAgC;AAChC,4CAAwC;AACxC,4BAAwB;AACxB,gCAA4B"}
@@ -0,0 +1,6 @@
1
+ export * from "./get-preferences.mjs";
2
+ export * from "./notifications.mjs";
3
+ export * from "./request-user-approval.mjs";
4
+ export * from "./state.mjs";
5
+ export * from "./interface.mjs";
6
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/index.ts"],"names":[],"mappings":"AAAA,sCAAkC;AAClC,oCAAgC;AAChC,4CAAwC;AACxC,4BAAwB;AACxB,gCAA4B"}
@@ -1,39 +1,6 @@
1
- import "../../../../chunk-UDOXICJK.mjs";
2
- import {
3
- getGetLocaleMethodImplementation
4
- } from "../../../../chunk-KSIBNOB2.mjs";
5
- import {
6
- getCreateInterfaceImplementation,
7
- getGetInterfaceImplementation
8
- } from "../../../../chunk-FQWOVTBB.mjs";
9
- import {
10
- getShowInAppNotificationImplementation,
11
- getShowNativeNotificationImplementation
12
- } from "../../../../chunk-ALRZENWP.mjs";
13
- import {
14
- getShowDialogImplementation
15
- } from "../../../../chunk-ORO3T6BU.mjs";
16
- import {
17
- getClearSnapStateMethodImplementation,
18
- getGetSnapStateMethodImplementation,
19
- getUpdateSnapStateMethodImplementation
20
- } from "../../../../chunk-5U5WB3SM.mjs";
21
- import "../../../../chunk-RQKT6BQ2.mjs";
22
- import "../../../../chunk-3M4GRUMH.mjs";
23
- import "../../../../chunk-74TIKA2T.mjs";
24
- import "../../../../chunk-H2464AXT.mjs";
25
- import "../../../../chunk-LB4R3BUA.mjs";
26
- import "../../../../chunk-MPZOXW6I.mjs";
27
- import "../../../../chunk-JMDSN227.mjs";
28
- export {
29
- getClearSnapStateMethodImplementation,
30
- getCreateInterfaceImplementation,
31
- getGetInterfaceImplementation,
32
- getGetLocaleMethodImplementation,
33
- getGetSnapStateMethodImplementation,
34
- getShowDialogImplementation,
35
- getShowInAppNotificationImplementation,
36
- getShowNativeNotificationImplementation,
37
- getUpdateSnapStateMethodImplementation
38
- };
1
+ export * from "./get-preferences.mjs";
2
+ export * from "./notifications.mjs";
3
+ export * from "./request-user-approval.mjs";
4
+ export * from "./state.mjs";
5
+ export * from "./interface.mjs";
39
6
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/index.ts"],"names":[],"mappings":"AAAA,sCAAkC;AAClC,oCAAgC;AAChC,4CAAwC;AACxC,4BAAwB;AACxB,gCAA4B","sourcesContent":["export * from './get-preferences';\nexport * from './notifications';\nexport * from './request-user-approval';\nexport * from './state';\nexport * from './interface';\n"]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getGetInterfaceImplementation = exports.getCreateInterfaceImplementation = void 0;
4
+ /**
5
+ * Get the implementation of the `createInterface` hook.
6
+ *
7
+ * @param controllerMessenger - The controller messenger used to call actions.
8
+ * @returns The implementation of the `createInterface` hook.
9
+ */
10
+ function getCreateInterfaceImplementation(controllerMessenger) {
11
+ return async (snapId, content, context) => controllerMessenger.call('SnapInterfaceController:createInterface', snapId, content, context);
12
+ }
13
+ exports.getCreateInterfaceImplementation = getCreateInterfaceImplementation;
14
+ /**
15
+ * Get the implementation of the `getInterface` hook.
16
+ *
17
+ * @param controllerMessenger - The controller messenger used to call actions.
18
+ * @returns The implementation of the `getInterface` hook.
19
+ */
20
+ function getGetInterfaceImplementation(controllerMessenger) {
21
+ return (snapId, id) => controllerMessenger.call('SnapInterfaceController:getInterface', snapId, id);
22
+ }
23
+ exports.getGetInterfaceImplementation = getGetInterfaceImplementation;
24
+ //# sourceMappingURL=interface.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.cjs","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/interface.ts"],"names":[],"mappings":";;;AAIA;;;;;GAKG;AACH,SAAgB,gCAAgC,CAC9C,mBAA4C;IAE5C,OAAO,KAAK,EACV,MAAc,EACd,OAAkB,EAClB,OAA0B,EAC1B,EAAE,CACF,mBAAmB,CAAC,IAAI,CACtB,yCAAyC,EACzC,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC;AACN,CAAC;AAdD,4EAcC;AAED;;;;;GAKG;AACH,SAAgB,6BAA6B,CAC3C,mBAA4C;IAE5C,OAAO,CAAC,MAAc,EAAE,EAAU,EAAE,EAAE,CACpC,mBAAmB,CAAC,IAAI,CACtB,sCAAsC,EACtC,MAAM,EACN,EAAE,CACH,CAAC;AACN,CAAC;AATD,sEASC","sourcesContent":["import type { Component, InterfaceContext, SnapId } from '@metamask/snaps-sdk';\n\nimport type { RootControllerMessenger } from '../../controllers';\n\n/**\n * Get the implementation of the `createInterface` hook.\n *\n * @param controllerMessenger - The controller messenger used to call actions.\n * @returns The implementation of the `createInterface` hook.\n */\nexport function getCreateInterfaceImplementation(\n controllerMessenger: RootControllerMessenger,\n) {\n return async (\n snapId: SnapId,\n content: Component,\n context?: InterfaceContext,\n ) =>\n controllerMessenger.call(\n 'SnapInterfaceController:createInterface',\n snapId,\n content,\n context,\n );\n}\n\n/**\n * Get the implementation of the `getInterface` hook.\n *\n * @param controllerMessenger - The controller messenger used to call actions.\n * @returns The implementation of the `getInterface` hook.\n */\nexport function getGetInterfaceImplementation(\n controllerMessenger: RootControllerMessenger,\n) {\n return (snapId: SnapId, id: string) =>\n controllerMessenger.call(\n 'SnapInterfaceController:getInterface',\n snapId,\n id,\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
- import type { Component, InterfaceContext, SnapId } from '@metamask/snaps-sdk';
2
- import type { RootControllerMessenger } from '../../controllers';
1
+ import type { Component, InterfaceContext, SnapId } from "@metamask/snaps-sdk";
2
+ import type { RootControllerMessenger } from "../../controllers.cjs";
3
3
  /**
4
4
  * Get the implementation of the `createInterface` hook.
5
5
  *
@@ -14,3 +14,4 @@ export declare function getCreateInterfaceImplementation(controllerMessenger: Ro
14
14
  * @returns The implementation of the `getInterface` hook.
15
15
  */
16
16
  export declare function getGetInterfaceImplementation(controllerMessenger: RootControllerMessenger): (snapId: SnapId, id: string) => import("@metamask/snaps-controllers").StoredInterface;
17
+ //# sourceMappingURL=interface.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.d.cts","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,4BAA4B;AAE/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,8BAA0B;AAEjE;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,mBAAmB,EAAE,uBAAuB,YAGlC,MAAM,WACL,SAAS,YACR,gBAAgB,qBAQ7B;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,mBAAmB,EAAE,uBAAuB,YAE5B,MAAM,MAAM,MAAM,2DAMnC"}
@@ -0,0 +1,17 @@
1
+ import type { Component, InterfaceContext, SnapId } from "@metamask/snaps-sdk";
2
+ import type { RootControllerMessenger } from "../../controllers.mjs";
3
+ /**
4
+ * Get the implementation of the `createInterface` hook.
5
+ *
6
+ * @param controllerMessenger - The controller messenger used to call actions.
7
+ * @returns The implementation of the `createInterface` hook.
8
+ */
9
+ export declare function getCreateInterfaceImplementation(controllerMessenger: RootControllerMessenger): (snapId: SnapId, content: Component, context?: InterfaceContext) => Promise<string>;
10
+ /**
11
+ * Get the implementation of the `getInterface` hook.
12
+ *
13
+ * @param controllerMessenger - The controller messenger used to call actions.
14
+ * @returns The implementation of the `getInterface` hook.
15
+ */
16
+ export declare function getGetInterfaceImplementation(controllerMessenger: RootControllerMessenger): (snapId: SnapId, id: string) => import("@metamask/snaps-controllers").StoredInterface;
17
+ //# sourceMappingURL=interface.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.d.mts","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,4BAA4B;AAE/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,8BAA0B;AAEjE;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,mBAAmB,EAAE,uBAAuB,YAGlC,MAAM,WACL,SAAS,YACR,gBAAgB,qBAQ7B;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,mBAAmB,EAAE,uBAAuB,YAE5B,MAAM,MAAM,MAAM,2DAMnC"}
@@ -1,10 +1,19 @@
1
- import {
2
- getCreateInterfaceImplementation,
3
- getGetInterfaceImplementation
4
- } from "../../../../chunk-FQWOVTBB.mjs";
5
- import "../../../../chunk-JMDSN227.mjs";
6
- export {
7
- getCreateInterfaceImplementation,
8
- getGetInterfaceImplementation
9
- };
1
+ /**
2
+ * Get the implementation of the `createInterface` hook.
3
+ *
4
+ * @param controllerMessenger - The controller messenger used to call actions.
5
+ * @returns The implementation of the `createInterface` hook.
6
+ */
7
+ export function getCreateInterfaceImplementation(controllerMessenger) {
8
+ return async (snapId, content, context) => controllerMessenger.call('SnapInterfaceController:createInterface', snapId, content, context);
9
+ }
10
+ /**
11
+ * Get the implementation of the `getInterface` hook.
12
+ *
13
+ * @param controllerMessenger - The controller messenger used to call actions.
14
+ * @returns The implementation of the `getInterface` hook.
15
+ */
16
+ export function getGetInterfaceImplementation(controllerMessenger) {
17
+ return (snapId, id) => controllerMessenger.call('SnapInterfaceController:getInterface', snapId, id);
18
+ }
10
19
  //# sourceMappingURL=interface.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"interface.mjs","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/interface.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,UAAU,gCAAgC,CAC9C,mBAA4C;IAE5C,OAAO,KAAK,EACV,MAAc,EACd,OAAkB,EAClB,OAA0B,EAC1B,EAAE,CACF,mBAAmB,CAAC,IAAI,CACtB,yCAAyC,EACzC,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAC3C,mBAA4C;IAE5C,OAAO,CAAC,MAAc,EAAE,EAAU,EAAE,EAAE,CACpC,mBAAmB,CAAC,IAAI,CACtB,sCAAsC,EACtC,MAAM,EACN,EAAE,CACH,CAAC;AACN,CAAC","sourcesContent":["import type { Component, InterfaceContext, SnapId } from '@metamask/snaps-sdk';\n\nimport type { RootControllerMessenger } from '../../controllers';\n\n/**\n * Get the implementation of the `createInterface` hook.\n *\n * @param controllerMessenger - The controller messenger used to call actions.\n * @returns The implementation of the `createInterface` hook.\n */\nexport function getCreateInterfaceImplementation(\n controllerMessenger: RootControllerMessenger,\n) {\n return async (\n snapId: SnapId,\n content: Component,\n context?: InterfaceContext,\n ) =>\n controllerMessenger.call(\n 'SnapInterfaceController:createInterface',\n snapId,\n content,\n context,\n );\n}\n\n/**\n * Get the implementation of the `getInterface` hook.\n *\n * @param controllerMessenger - The controller messenger used to call actions.\n * @returns The implementation of the `getInterface` hook.\n */\nexport function getGetInterfaceImplementation(\n controllerMessenger: RootControllerMessenger,\n) {\n return (snapId: SnapId, id: string) =>\n controllerMessenger.call(\n 'SnapInterfaceController:getInterface',\n snapId,\n id,\n );\n}\n"]}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getShowInAppNotificationImplementation = exports.getShowNativeNotificationImplementation = void 0;
4
+ const snaps_sdk_1 = require("@metamask/snaps-sdk");
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ const effects_1 = require("redux-saga/effects");
7
+ const store_1 = require("../../store/index.cjs");
8
+ /**
9
+ * Show a native notification to the user.
10
+ *
11
+ * @param _snapId - The ID of the Snap that created the notification.
12
+ * @param options - The notification options.
13
+ * @param options.message - The message to show in the notification.
14
+ * @yields Adds the notification to the store.
15
+ * @returns `null`.
16
+ */
17
+ function* showNativeNotificationImplementation(_snapId, { message }) {
18
+ yield (0, effects_1.put)((0, store_1.addNotification)({ id: (0, toolkit_1.nanoid)(), type: snaps_sdk_1.NotificationType.Native, message }));
19
+ return null;
20
+ }
21
+ /**
22
+ * Get a method that can be used to show a native notification.
23
+ *
24
+ * @param runSaga - A function to run a saga outside the usual Redux flow.
25
+ * @returns A method that can be used to show a native notification.
26
+ */
27
+ function getShowNativeNotificationImplementation(runSaga) {
28
+ return async (...args) => {
29
+ return await runSaga(showNativeNotificationImplementation, ...args).toPromise();
30
+ };
31
+ }
32
+ exports.getShowNativeNotificationImplementation = getShowNativeNotificationImplementation;
33
+ /**
34
+ * Show an in-app notification to the user.
35
+ *
36
+ * @param _snapId - The ID of the Snap that created the notification.
37
+ * @param options - The notification options.
38
+ * @param options.message - The message to show in the notification.
39
+ * @yields Adds the notification to the store.
40
+ * @returns `null`.
41
+ */
42
+ function* showInAppNotificationImplementation(_snapId, { message }) {
43
+ yield (0, effects_1.put)((0, store_1.addNotification)({ id: (0, toolkit_1.nanoid)(), type: snaps_sdk_1.NotificationType.InApp, message }));
44
+ return null;
45
+ }
46
+ /**
47
+ * Get a method that can be used to show an in-app notification.
48
+ *
49
+ * @param runSaga - A function to run a saga outside the usual Redux flow.
50
+ * @returns A method that can be used to show an in-app notification.
51
+ */
52
+ function getShowInAppNotificationImplementation(runSaga) {
53
+ return async (...args) => {
54
+ return await runSaga(showInAppNotificationImplementation, ...args).toPromise();
55
+ };
56
+ }
57
+ exports.getShowInAppNotificationImplementation = getShowInAppNotificationImplementation;
58
+ //# sourceMappingURL=notifications.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.cjs","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/notifications.ts"],"names":[],"mappings":";;;AACA,mDAAuD;AACvD,8CAA0C;AAE1C,gDAAyC;AAGzC,iDAA8C;AAE9C;;;;;;;;GAQG;AACH,QAAQ,CAAC,CAAC,oCAAoC,CAC5C,OAAe,EACf,EAAE,OAAO,EAAgB;IAEzB,MAAM,IAAA,aAAG,EACP,IAAA,uBAAe,EAAC,EAAE,EAAE,EAAE,IAAA,gBAAM,GAAE,EAAE,IAAI,EAAE,4BAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAC1E,CAAC;IAEF,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,SAAgB,uCAAuC,CACrD,OAAwB;IAExB,OAAO,KAAK,EACV,GAAG,IAA6D,EAChE,EAAE;QACF,OAAO,MAAM,OAAO,CAClB,oCAAoC,EACpC,GAAG,IAAI,CACR,CAAC,SAAS,EAAE,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AAXD,0FAWC;AAED;;;;;;;;GAQG;AACH,QAAQ,CAAC,CAAC,mCAAmC,CAC3C,OAAe,EACf,EAAE,OAAO,EAAgB;IAEzB,MAAM,IAAA,aAAG,EACP,IAAA,uBAAe,EAAC,EAAE,EAAE,EAAE,IAAA,gBAAM,GAAE,EAAE,IAAI,EAAE,4BAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,CACzE,CAAC;IAEF,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,SAAgB,sCAAsC,CACpD,OAAwB;IAExB,OAAO,KAAK,EACV,GAAG,IAA4D,EAC/D,EAAE;QACF,OAAO,MAAM,OAAO,CAClB,mCAAmC,EACnC,GAAG,IAAI,CACR,CAAC,SAAS,EAAE,CAAC;IAChB,CAAC,CAAC;AACJ,CAAC;AAXD,wFAWC","sourcesContent":["import type { NotifyParams } from '@metamask/snaps-sdk';\nimport { NotificationType } from '@metamask/snaps-sdk';\nimport { nanoid } from '@reduxjs/toolkit';\nimport type { SagaIterator } from 'redux-saga';\nimport { put } from 'redux-saga/effects';\n\nimport type { RunSagaFunction } from '../../store';\nimport { addNotification } from '../../store';\n\n/**\n * Show a native notification to the user.\n *\n * @param _snapId - The ID of the Snap that created the notification.\n * @param options - The notification options.\n * @param options.message - The message to show in the notification.\n * @yields Adds the notification to the store.\n * @returns `null`.\n */\nfunction* showNativeNotificationImplementation(\n _snapId: string,\n { message }: NotifyParams,\n): SagaIterator {\n yield put(\n addNotification({ id: nanoid(), type: NotificationType.Native, message }),\n );\n\n return null;\n}\n\n/**\n * Get a method that can be used to show a native notification.\n *\n * @param runSaga - A function to run a saga outside the usual Redux flow.\n * @returns A method that can be used to show a native notification.\n */\nexport function getShowNativeNotificationImplementation(\n runSaga: RunSagaFunction,\n) {\n return async (\n ...args: Parameters<typeof showNativeNotificationImplementation>\n ) => {\n return await runSaga(\n showNativeNotificationImplementation,\n ...args,\n ).toPromise();\n };\n}\n\n/**\n * Show an in-app notification to the user.\n *\n * @param _snapId - The ID of the Snap that created the notification.\n * @param options - The notification options.\n * @param options.message - The message to show in the notification.\n * @yields Adds the notification to the store.\n * @returns `null`.\n */\nfunction* showInAppNotificationImplementation(\n _snapId: string,\n { message }: NotifyParams,\n): SagaIterator<null> {\n yield put(\n addNotification({ id: nanoid(), type: NotificationType.InApp, message }),\n );\n\n return null;\n}\n\n/**\n * Get a method that can be used to show an in-app notification.\n *\n * @param runSaga - A function to run a saga outside the usual Redux flow.\n * @returns A method that can be used to show an in-app notification.\n */\nexport function getShowInAppNotificationImplementation(\n runSaga: RunSagaFunction,\n) {\n return async (\n ...args: Parameters<typeof showInAppNotificationImplementation>\n ) => {\n return await runSaga(\n showInAppNotificationImplementation,\n ...args,\n ).toPromise();\n };\n}\n"]}
@@ -1,16 +1,17 @@
1
- import type { NotifyParams } from '@metamask/snaps-sdk';
2
- import type { RunSagaFunction } from '../../store';
1
+ import type { NotifyParams } from "@metamask/snaps-sdk";
2
+ import type { RunSagaFunction } from "../../store/index.cjs";
3
3
  /**
4
4
  * Get a method that can be used to show a native notification.
5
5
  *
6
6
  * @param runSaga - A function to run a saga outside the usual Redux flow.
7
7
  * @returns A method that can be used to show a native notification.
8
8
  */
9
- export declare function getShowNativeNotificationImplementation(runSaga: RunSagaFunction): (args_0: string, args_1: NotifyParams) => Promise<any>;
9
+ export declare function getShowNativeNotificationImplementation(runSaga: RunSagaFunction): (_snapId: string, args_1: NotifyParams) => Promise<any>;
10
10
  /**
11
11
  * Get a method that can be used to show an in-app notification.
12
12
  *
13
13
  * @param runSaga - A function to run a saga outside the usual Redux flow.
14
14
  * @returns A method that can be used to show an in-app notification.
15
15
  */
16
- export declare function getShowInAppNotificationImplementation(runSaga: RunSagaFunction): (args_0: string, args_1: NotifyParams) => Promise<any>;
16
+ export declare function getShowInAppNotificationImplementation(runSaga: RunSagaFunction): (_snapId: string, args_1: NotifyParams) => Promise<any>;
17
+ //# sourceMappingURL=notifications.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.d.cts","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,4BAA4B;AAMxD,OAAO,KAAK,EAAE,eAAe,EAAE,8BAAoB;AAuBnD;;;;;GAKG;AACH,wBAAgB,uCAAuC,CACrD,OAAO,EAAE,eAAe,2DAUzB;AAsBD;;;;;GAKG;AACH,wBAAgB,sCAAsC,CACpD,OAAO,EAAE,eAAe,2DAUzB"}
@@ -0,0 +1,17 @@
1
+ import type { NotifyParams } from "@metamask/snaps-sdk";
2
+ import type { RunSagaFunction } from "../../store/index.mjs";
3
+ /**
4
+ * Get a method that can be used to show a native notification.
5
+ *
6
+ * @param runSaga - A function to run a saga outside the usual Redux flow.
7
+ * @returns A method that can be used to show a native notification.
8
+ */
9
+ export declare function getShowNativeNotificationImplementation(runSaga: RunSagaFunction): (_snapId: string, args_1: NotifyParams) => Promise<any>;
10
+ /**
11
+ * Get a method that can be used to show an in-app notification.
12
+ *
13
+ * @param runSaga - A function to run a saga outside the usual Redux flow.
14
+ * @returns A method that can be used to show an in-app notification.
15
+ */
16
+ export declare function getShowInAppNotificationImplementation(runSaga: RunSagaFunction): (_snapId: string, args_1: NotifyParams) => Promise<any>;
17
+ //# sourceMappingURL=notifications.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.d.mts","sourceRoot":"","sources":["../../../../../src/internals/simulation/methods/hooks/notifications.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,4BAA4B;AAMxD,OAAO,KAAK,EAAE,eAAe,EAAE,8BAAoB;AAuBnD;;;;;GAKG;AACH,wBAAgB,uCAAuC,CACrD,OAAO,EAAE,eAAe,2DAUzB;AAsBD;;;;;GAKG;AACH,wBAAgB,sCAAsC,CACpD,OAAO,EAAE,eAAe,2DAUzB"}