@metamask/snaps-jest 6.0.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/README.md +100 -7
  3. package/dist/{chunk-JUNUGLG4.js → chunk-2JAGD4N6.js} +3 -3
  4. package/dist/{chunk-7YD4IW43.mjs → chunk-3M4GRUMH.mjs} +3 -6
  5. package/dist/chunk-3M4GRUMH.mjs.map +1 -0
  6. package/dist/{chunk-7BFTEFLS.mjs → chunk-5U5WB3SM.mjs} +5 -3
  7. package/dist/chunk-5U5WB3SM.mjs.map +1 -0
  8. package/dist/chunk-6POKT4OO.js +127 -0
  9. package/dist/chunk-6POKT4OO.js.map +1 -0
  10. package/dist/{chunk-7VILST6M.mjs → chunk-BVGI3E45.mjs} +2 -2
  11. package/dist/chunk-CKRORVDW.js +1 -0
  12. package/dist/{chunk-WFBQPYSV.js → chunk-DTDYOBCI.js} +10 -6
  13. package/dist/chunk-DTDYOBCI.js.map +1 -0
  14. package/dist/{chunk-WIFOID2P.mjs → chunk-EDEJD326.mjs} +20 -10
  15. package/dist/chunk-EDEJD326.mjs.map +1 -0
  16. package/dist/{chunk-B4QZXXQY.js → chunk-FIZAYEHV.js} +4 -4
  17. package/dist/chunk-I5P52IMF.mjs +223 -0
  18. package/dist/chunk-I5P52IMF.mjs.map +1 -0
  19. package/dist/{chunk-T2BE4O5H.js → chunk-IDGD7TZ7.js} +33 -23
  20. package/dist/chunk-IDGD7TZ7.js.map +1 -0
  21. package/dist/{chunk-CCYBLBVL.mjs → chunk-LG3VKXGH.mjs} +9 -5
  22. package/dist/chunk-LG3VKXGH.mjs.map +1 -0
  23. package/dist/{chunk-SQJOQ7AF.js → chunk-MCYTJUDG.js} +13 -16
  24. package/dist/chunk-MCYTJUDG.js.map +1 -0
  25. package/dist/chunk-PVMIH6OB.mjs +127 -0
  26. package/dist/chunk-PVMIH6OB.mjs.map +1 -0
  27. package/dist/chunk-S2HLITUN.js +1 -0
  28. package/dist/{chunk-ISWZ7XZ5.js → chunk-SB5EPHE3.js} +5 -3
  29. package/dist/chunk-SB5EPHE3.js.map +1 -0
  30. package/dist/{chunk-HBLJOACO.mjs → chunk-TAIJXTLU.mjs} +2 -10
  31. package/dist/chunk-TAIJXTLU.mjs.map +1 -0
  32. package/dist/chunk-TGZ7WOTJ.mjs +1 -0
  33. package/dist/chunk-UDOXICJK.mjs +1 -0
  34. package/dist/{chunk-LHU3EHLI.mjs → chunk-VSUNWJMQ.mjs} +11 -14
  35. package/dist/chunk-VSUNWJMQ.mjs.map +1 -0
  36. package/dist/{chunk-TO46ICOZ.js → chunk-WMLSD6B5.js} +3 -6
  37. package/dist/chunk-WMLSD6B5.js.map +1 -0
  38. package/dist/{chunk-4SC3HVI5.mjs → chunk-X5IPMTHO.mjs} +2 -2
  39. package/dist/chunk-Y4DKEF7Y.js +223 -0
  40. package/dist/chunk-Y4DKEF7Y.js.map +1 -0
  41. package/dist/{chunk-7J34R6YW.mjs → chunk-YEVKBYKO.mjs} +35 -25
  42. package/dist/chunk-YEVKBYKO.mjs.map +1 -0
  43. package/dist/{chunk-5PLDD7ZC.js → chunk-Z35PCKFD.js} +24 -14
  44. package/dist/chunk-Z35PCKFD.js.map +1 -0
  45. package/dist/{chunk-LXSNRZV4.js → chunk-ZWN4SO2V.js} +5 -13
  46. package/dist/chunk-ZWN4SO2V.js.map +1 -0
  47. package/dist/environment.js +13 -14
  48. package/dist/environment.mjs +12 -13
  49. package/dist/global.js +2 -0
  50. package/dist/global.js.map +1 -0
  51. package/dist/global.mjs +2 -0
  52. package/dist/global.mjs.map +1 -0
  53. package/dist/helpers.js +13 -14
  54. package/dist/helpers.mjs +12 -13
  55. package/dist/index.js +16 -16
  56. package/dist/index.mjs +15 -15
  57. package/dist/internals/index.js +27 -14
  58. package/dist/internals/index.mjs +30 -17
  59. package/dist/internals/request.js +12 -11
  60. package/dist/internals/request.mjs +13 -12
  61. package/dist/internals/simulation/controllers.js +6 -7
  62. package/dist/internals/simulation/controllers.mjs +5 -6
  63. package/dist/internals/simulation/index.js +17 -10
  64. package/dist/internals/simulation/index.mjs +17 -10
  65. package/dist/internals/simulation/interface.js +11 -3
  66. package/dist/internals/simulation/interface.mjs +12 -4
  67. package/dist/internals/simulation/methods/hooks/index.js +4 -10
  68. package/dist/internals/simulation/methods/hooks/index.mjs +3 -9
  69. package/dist/internals/simulation/methods/hooks/notifications.js +1 -1
  70. package/dist/internals/simulation/methods/hooks/notifications.mjs +1 -1
  71. package/dist/internals/simulation/methods/hooks/show-dialog.js +1 -1
  72. package/dist/internals/simulation/methods/hooks/show-dialog.mjs +1 -1
  73. package/dist/internals/simulation/methods/hooks/state.js +3 -3
  74. package/dist/internals/simulation/methods/hooks/state.mjs +2 -2
  75. package/dist/internals/simulation/methods/index.js +5 -6
  76. package/dist/internals/simulation/methods/index.mjs +4 -5
  77. package/dist/internals/simulation/methods/specifications.js +5 -6
  78. package/dist/internals/simulation/methods/specifications.mjs +4 -5
  79. package/dist/internals/simulation/simulation.js +8 -9
  80. package/dist/internals/simulation/simulation.mjs +7 -8
  81. package/dist/internals/simulation/store/index.js +2 -2
  82. package/dist/internals/simulation/store/index.mjs +1 -1
  83. package/dist/internals/simulation/store/store.js +2 -2
  84. package/dist/internals/simulation/store/store.mjs +1 -1
  85. package/dist/internals/structs.js +6 -2
  86. package/dist/internals/structs.mjs +5 -1
  87. package/dist/matchers.js +13 -14
  88. package/dist/matchers.mjs +12 -13
  89. package/dist/setup.js +12 -13
  90. package/dist/setup.mjs +12 -13
  91. package/dist/tsconfig.build.tsbuildinfo +1 -1
  92. package/dist/types/global.d.ts +69 -0
  93. package/dist/types/index.d.ts +1 -0
  94. package/dist/types/internals/request.d.ts +13 -4
  95. package/dist/types/internals/simulation/interface.d.ts +47 -4
  96. package/dist/types/internals/simulation/methods/hooks/index.d.ts +0 -1
  97. package/dist/types/internals/simulation/methods/hooks/state.d.ts +2 -1
  98. package/dist/types/internals/simulation/store/store.d.ts +1 -2
  99. package/dist/types/internals/structs.d.ts +87 -156
  100. package/dist/types/types.d.ts +42 -21
  101. package/package.json +11 -11
  102. package/dist/chunk-2X23DUDP.mjs +0 -22
  103. package/dist/chunk-2X23DUDP.mjs.map +0 -1
  104. package/dist/chunk-5PLDD7ZC.js.map +0 -1
  105. package/dist/chunk-6MVV44M5.mjs +0 -76
  106. package/dist/chunk-6MVV44M5.mjs.map +0 -1
  107. package/dist/chunk-7BFTEFLS.mjs.map +0 -1
  108. package/dist/chunk-7J34R6YW.mjs.map +0 -1
  109. package/dist/chunk-7YD4IW43.mjs.map +0 -1
  110. package/dist/chunk-CCYBLBVL.mjs.map +0 -1
  111. package/dist/chunk-HBLJOACO.mjs.map +0 -1
  112. package/dist/chunk-HNH5UAKZ.js +0 -80
  113. package/dist/chunk-HNH5UAKZ.js.map +0 -1
  114. package/dist/chunk-ISWZ7XZ5.js.map +0 -1
  115. package/dist/chunk-LHU3EHLI.mjs.map +0 -1
  116. package/dist/chunk-LXSNRZV4.js.map +0 -1
  117. package/dist/chunk-LYK6EGZU.mjs +0 -80
  118. package/dist/chunk-LYK6EGZU.mjs.map +0 -1
  119. package/dist/chunk-RD7GQCPL.js +0 -22
  120. package/dist/chunk-RD7GQCPL.js.map +0 -1
  121. package/dist/chunk-SQJOQ7AF.js.map +0 -1
  122. package/dist/chunk-T2BE4O5H.js.map +0 -1
  123. package/dist/chunk-TO46ICOZ.js.map +0 -1
  124. package/dist/chunk-U5BLLHIU.js +0 -1
  125. package/dist/chunk-V6LFAN3U.mjs +0 -1
  126. package/dist/chunk-WFBQPYSV.js.map +0 -1
  127. package/dist/chunk-WIFOID2P.mjs.map +0 -1
  128. package/dist/chunk-ZAQZRYPW.js +0 -76
  129. package/dist/chunk-ZAQZRYPW.js.map +0 -1
  130. package/dist/internals/simulation/methods/hooks/encryption.js +0 -10
  131. package/dist/internals/simulation/methods/hooks/encryption.mjs +0 -10
  132. package/dist/types/internals/simulation/methods/hooks/encryption.d.ts +0 -29
  133. /package/dist/{chunk-JUNUGLG4.js.map → chunk-2JAGD4N6.js.map} +0 -0
  134. /package/dist/{chunk-7VILST6M.mjs.map → chunk-BVGI3E45.mjs.map} +0 -0
  135. /package/dist/{chunk-U5BLLHIU.js.map → chunk-CKRORVDW.js.map} +0 -0
  136. /package/dist/{chunk-B4QZXXQY.js.map → chunk-FIZAYEHV.js.map} +0 -0
  137. /package/dist/{internals/simulation/methods/hooks/encryption.js.map → chunk-S2HLITUN.js.map} +0 -0
  138. /package/dist/{chunk-V6LFAN3U.mjs.map → chunk-TGZ7WOTJ.mjs.map} +0 -0
  139. /package/dist/{internals/simulation/methods/hooks/encryption.mjs.map → chunk-UDOXICJK.mjs.map} +0 -0
  140. /package/dist/{chunk-4SC3HVI5.mjs.map → chunk-X5IPMTHO.mjs.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  // src/internals/structs.ts
2
2
  import {
3
- NotificationType,
4
3
  ComponentStruct,
4
+ NotificationType,
5
5
  enumValue
6
6
  } from "@metamask/snaps-sdk";
7
7
  import {
@@ -23,10 +23,11 @@ import {
23
23
  object,
24
24
  optional,
25
25
  string,
26
- type,
27
26
  union,
28
27
  record,
29
- any
28
+ any,
29
+ func,
30
+ type
30
31
  } from "superstruct";
31
32
  var BytesLikeStruct = union([
32
33
  bigint(),
@@ -197,30 +198,37 @@ var JsonRpcMockOptionsStruct = object({
197
198
  var InterfaceStruct = type({
198
199
  content: optional(ComponentStruct)
199
200
  });
200
- var SnapResponseStruct = assign(
201
- InterfaceStruct,
201
+ var SnapResponseWithoutInterfaceStruct = object({
202
+ id: string(),
203
+ response: union([
204
+ object({
205
+ result: JsonStruct
206
+ }),
207
+ object({
208
+ error: JsonStruct
209
+ })
210
+ ]),
211
+ notifications: array(
212
+ object({
213
+ id: string(),
214
+ message: string(),
215
+ type: union([
216
+ enumValue(NotificationType.InApp),
217
+ enumValue(NotificationType.Native)
218
+ ])
219
+ })
220
+ )
221
+ });
222
+ var SnapResponseWithInterfaceStruct = assign(
223
+ SnapResponseWithoutInterfaceStruct,
202
224
  object({
203
- id: string(),
204
- response: union([
205
- object({
206
- result: JsonStruct
207
- }),
208
- object({
209
- error: JsonStruct
210
- })
211
- ]),
212
- notifications: array(
213
- object({
214
- id: string(),
215
- message: string(),
216
- type: union([
217
- enumValue(NotificationType.InApp),
218
- enumValue(NotificationType.Native)
219
- ])
220
- })
221
- )
225
+ getInterface: func()
222
226
  })
223
227
  );
228
+ var SnapResponseStruct = union([
229
+ SnapResponseWithoutInterfaceStruct,
230
+ SnapResponseWithInterfaceStruct
231
+ ]);
224
232
 
225
233
  export {
226
234
  TransactionOptionsStruct,
@@ -228,6 +236,8 @@ export {
228
236
  SnapOptionsStruct,
229
237
  JsonRpcMockOptionsStruct,
230
238
  InterfaceStruct,
239
+ SnapResponseWithoutInterfaceStruct,
240
+ SnapResponseWithInterfaceStruct,
231
241
  SnapResponseStruct
232
242
  };
233
- //# sourceMappingURL=chunk-7J34R6YW.mjs.map
243
+ //# sourceMappingURL=chunk-YEVKBYKO.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/internals/structs.ts"],"sourcesContent":["import {\n ComponentStruct,\n NotificationType,\n enumValue,\n} from '@metamask/snaps-sdk';\nimport {\n bytesToHex,\n JsonStruct,\n StrictHexStruct,\n valueToBytes,\n} from '@metamask/utils';\nimport { randomBytes } from 'crypto';\nimport {\n array,\n assign,\n bigint,\n coerce,\n defaulted,\n instance,\n literal,\n number,\n object,\n optional,\n string,\n union,\n record,\n any,\n func,\n type,\n} from 'superstruct';\n\n// TODO: Export this from `@metamask/utils` instead.\nconst BytesLikeStruct = union([\n bigint(),\n number(),\n string(),\n instance(Uint8Array),\n]);\n\nexport const TransactionOptionsStruct = object({\n /**\n * The CAIP-2 chain ID to send the transaction on. Defaults to `eip155:1`.\n */\n chainId: defaulted(string(), 'eip155:1'),\n\n /**\n * The origin to send the transaction from. Defaults to `metamask.io`.\n */\n origin: defaulted(string(), 'metamask.io'),\n\n /**\n * The address to send the transaction from. Defaults to a randomly generated\n * address.\n */\n // TODO: Move this coercer to `@metamask/utils`.\n from: coerce(StrictHexStruct, optional(BytesLikeStruct), (value) => {\n if (value) {\n return bytesToHex(valueToBytes(value));\n }\n\n return bytesToHex(randomBytes(20));\n }),\n\n /**\n * The address to send the transaction to. Defaults to a randomly generated\n * address.\n */\n // TODO: Move this coercer to `@metamask/utils`.\n to: coerce(StrictHexStruct, optional(BytesLikeStruct), (value) => {\n if (value) {\n return bytesToHex(valueToBytes(value));\n }\n\n return bytesToHex(randomBytes(20));\n }),\n\n /**\n * The value to send with the transaction. The value may be specified as a\n * `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `0`.\n */\n value: defaulted(\n coerce(StrictHexStruct, BytesLikeStruct, (value) =>\n bytesToHex(valueToBytes(value)),\n ),\n '0x0',\n ),\n\n /**\n * The gas limit to use for the transaction. The gas limit may be specified\n * as a `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `21_000`.\n */\n gasLimit: defaulted(\n coerce(StrictHexStruct, BytesLikeStruct, (value) =>\n bytesToHex(valueToBytes(value)),\n ),\n valueToBytes(21_000),\n ),\n\n /**\n * The max fee per gas (in Wei) to use for the transaction. The max fee per\n * gas may be specified as a `number`, `bigint`, `string`, or `Uint8Array`.\n * Defaults to `1`.\n */\n maxFeePerGas: defaulted(\n coerce(StrictHexStruct, BytesLikeStruct, (value) =>\n bytesToHex(valueToBytes(value)),\n ),\n valueToBytes(1),\n ),\n\n /**\n * The max priority fee per gas (in Wei) to use for the transaction. The max\n * priority fee per gas may be specified as a `number`, `bigint`, `string`,\n * or `Uint8Array`. Defaults to `1`.\n */\n maxPriorityFeePerGas: defaulted(\n coerce(StrictHexStruct, BytesLikeStruct, (value) =>\n bytesToHex(valueToBytes(value)),\n ),\n valueToBytes(1),\n ),\n\n /**\n * The nonce to use for the transaction. The nonce may be specified as a\n * `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `0`.\n */\n nonce: defaulted(\n coerce(StrictHexStruct, BytesLikeStruct, (value) =>\n bytesToHex(valueToBytes(value)),\n ),\n valueToBytes(0),\n ),\n\n /**\n * The data to send with the transaction. The data may be specified as a\n * `number`, `bigint`, `string`, or `Uint8Array`. Defaults to `0x`.\n */\n data: defaulted(\n coerce(union([StrictHexStruct, literal('0x')]), BytesLikeStruct, (value) =>\n bytesToHex(valueToBytes(value)),\n ),\n '0x',\n ),\n});\n\nexport const SignatureOptionsStruct = object({\n /**\n * The origin making the signature request.\n */\n origin: defaulted(string(), 'metamask.io'),\n\n /**\n * The address signing the signature request. Defaults to a randomly generated\n * address.\n */\n from: coerce(StrictHexStruct, optional(BytesLikeStruct), (value) => {\n if (value) {\n return bytesToHex(valueToBytes(value));\n }\n\n return bytesToHex(randomBytes(20));\n }),\n\n /**\n * The data to send with the transaction. The data may be specified as a\n * `string`, an object, or an array of objects. This covers the data types\n * for the supported signature methods. Defaults to `0x`.\n */\n data: defaulted(\n union([\n StrictHexStruct,\n literal('0x'),\n record(string(), any()),\n array(record(string(), any())),\n ]),\n '0x',\n ),\n\n /**\n * The signature method being used.\n */\n signatureMethod: defaulted(\n union([\n literal('eth_sign'),\n literal('personal_sign'),\n literal('eth_signTypedData'),\n literal('eth_signTypedData_v3'),\n literal('eth_signTypedData_v4'),\n ]),\n 'personal_sign',\n ),\n});\n\nexport const SnapOptionsStruct = object({\n /**\n * The timeout in milliseconds to use for requests to the snap. Defaults to\n * `1000`.\n */\n timeout: defaulted(optional(number()), 1000),\n});\n\nexport const JsonRpcMockOptionsStruct = object({\n method: string(),\n result: JsonStruct,\n});\n\nexport const InterfaceStruct = type({\n content: optional(ComponentStruct),\n});\n\nexport const SnapResponseWithoutInterfaceStruct = object({\n id: string(),\n\n response: union([\n object({\n result: JsonStruct,\n }),\n object({\n error: JsonStruct,\n }),\n ]),\n\n notifications: array(\n object({\n id: string(),\n message: string(),\n type: union([\n enumValue(NotificationType.InApp),\n enumValue(NotificationType.Native),\n ]),\n }),\n ),\n});\n\nexport const SnapResponseWithInterfaceStruct = assign(\n SnapResponseWithoutInterfaceStruct,\n object({\n getInterface: func(),\n }),\n);\n\nexport const SnapResponseStruct = union([\n SnapResponseWithoutInterfaceStruct,\n SnapResponseWithInterfaceStruct,\n]);\n"],"mappings":"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","names":[]}
@@ -1,21 +1,22 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkHNH5UAKZjs = require('./chunk-HNH5UAKZ.js');
3
+ var _chunk2JTGBHPRjs = require('./chunk-2JTGBHPR.js');
4
4
 
5
5
 
6
- var _chunkTZB4LBT7js = require('./chunk-TZB4LBT7.js');
6
+ var _chunk6POKT4OOjs = require('./chunk-6POKT4OO.js');
7
7
 
8
8
 
9
+ var _chunkTZB4LBT7js = require('./chunk-TZB4LBT7.js');
9
10
 
10
11
 
11
- var _chunkT2BE4O5Hjs = require('./chunk-T2BE4O5H.js');
12
12
 
13
13
 
14
14
 
15
- var _chunkLACTK6EOjs = require('./chunk-LACTK6EO.js');
15
+ var _chunkIDGD7TZ7js = require('./chunk-IDGD7TZ7.js');
16
16
 
17
17
 
18
- var _chunk2JTGBHPRjs = require('./chunk-2JTGBHPR.js');
18
+
19
+ var _chunkLACTK6EOjs = require('./chunk-LACTK6EO.js');
19
20
 
20
21
  // src/helpers.ts
21
22
  var _snapsutils = require('@metamask/snaps-utils');
@@ -28,6 +29,9 @@ function getOptions(snapId, options) {
28
29
  }
29
30
  return [snapId, options];
30
31
  }
32
+ function assertIsResponseWithInterface(response) {
33
+ _utils.assertStruct.call(void 0, response, _chunkIDGD7TZ7js.SnapResponseWithInterfaceStruct);
34
+ }
31
35
  async function installSnap(snapId, options = {}) {
32
36
  const resolvedOptions = getOptions(snapId, options);
33
37
  const {
@@ -43,8 +47,8 @@ async function installSnap(snapId, options = {}) {
43
47
  origin: transactionOrigin,
44
48
  chainId,
45
49
  ...transaction
46
- } = _superstruct.create.call(void 0, request, _chunkT2BE4O5Hjs.TransactionOptionsStruct);
47
- return _chunkHNH5UAKZjs.handleRequest.call(void 0, {
50
+ } = _superstruct.create.call(void 0, request, _chunkIDGD7TZ7js.TransactionOptionsStruct);
51
+ const response = await _chunk6POKT4OOjs.handleRequest.call(void 0, {
48
52
  snapId: installedSnapId,
49
53
  store,
50
54
  executionService,
@@ -60,10 +64,12 @@ async function installSnap(snapId, options = {}) {
60
64
  }
61
65
  }
62
66
  });
67
+ assertIsResponseWithInterface(response);
68
+ return response;
63
69
  };
64
70
  const onCronjob = (request) => {
65
71
  log("Running cronjob %o.", options);
66
- return _chunkHNH5UAKZjs.handleRequest.call(void 0, {
72
+ return _chunk6POKT4OOjs.handleRequest.call(void 0, {
67
73
  snapId: installedSnapId,
68
74
  store,
69
75
  executionService,
@@ -76,7 +82,7 @@ async function installSnap(snapId, options = {}) {
76
82
  return {
77
83
  request: (request) => {
78
84
  log("Sending request %o.", request);
79
- return _chunkHNH5UAKZjs.handleRequest.call(void 0, {
85
+ return _chunk6POKT4OOjs.handleRequest.call(void 0, {
80
86
  snapId: installedSnapId,
81
87
  store,
82
88
  executionService,
@@ -92,9 +98,9 @@ async function installSnap(snapId, options = {}) {
92
98
  log("Requesting signature %o.", request);
93
99
  const { origin: signatureOrigin, ...signature } = _superstruct.create.call(void 0,
94
100
  request,
95
- _chunkT2BE4O5Hjs.SignatureOptionsStruct
101
+ _chunkIDGD7TZ7js.SignatureOptionsStruct
96
102
  );
97
- return _chunkHNH5UAKZjs.handleRequest.call(void 0, {
103
+ const response = await _chunk6POKT4OOjs.handleRequest.call(void 0, {
98
104
  snapId: installedSnapId,
99
105
  store,
100
106
  executionService,
@@ -109,12 +115,14 @@ async function installSnap(snapId, options = {}) {
109
115
  }
110
116
  }
111
117
  });
118
+ assertIsResponseWithInterface(response);
119
+ return response;
112
120
  },
113
121
  onCronjob,
114
122
  runCronjob: onCronjob,
115
123
  onHomePage: async () => {
116
124
  log("Rendering home page.");
117
- return _chunkHNH5UAKZjs.handleRequest.call(void 0, {
125
+ const response = await _chunk6POKT4OOjs.handleRequest.call(void 0, {
118
126
  snapId: installedSnapId,
119
127
  store,
120
128
  executionService,
@@ -125,10 +133,12 @@ async function installSnap(snapId, options = {}) {
125
133
  method: ""
126
134
  }
127
135
  });
136
+ assertIsResponseWithInterface(response);
137
+ return response;
128
138
  },
129
139
  mockJsonRpc(mock) {
130
140
  log("Mocking JSON-RPC request %o.", mock);
131
- const { method, result } = _superstruct.create.call(void 0, mock, _chunkT2BE4O5Hjs.JsonRpcMockOptionsStruct);
141
+ const { method, result } = _superstruct.create.call(void 0, mock, _chunkIDGD7TZ7js.JsonRpcMockOptionsStruct);
132
142
  store.dispatch(_chunkLACTK6EOjs.addJsonRpcMock.call(void 0, { method, result }));
133
143
  return {
134
144
  unmock() {
@@ -150,4 +160,4 @@ async function installSnap(snapId, options = {}) {
150
160
 
151
161
 
152
162
  exports.installSnap = installSnap;
153
- //# sourceMappingURL=chunk-5PLDD7ZC.js.map
163
+ //# sourceMappingURL=chunk-Z35PCKFD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/helpers.ts"],"names":[],"mappings":"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","sourcesContent":["import type { AbstractExecutionService } from '@metamask/snaps-controllers';\nimport type { SnapId } from '@metamask/snaps-sdk';\nimport { HandlerType, logInfo } from '@metamask/snaps-utils';\nimport { assertStruct, createModuleLogger } from '@metamask/utils';\nimport { create } from 'superstruct';\n\nimport {\n rootLogger,\n handleRequest,\n TransactionOptionsStruct,\n getEnvironment,\n JsonRpcMockOptionsStruct,\n SignatureOptionsStruct,\n SnapResponseWithInterfaceStruct,\n} from './internals';\nimport type { InstallSnapOptions } from './internals';\nimport {\n addJsonRpcMock,\n removeJsonRpcMock,\n} from './internals/simulation/store/mocks';\nimport type {\n SnapResponseWithInterface,\n CronjobOptions,\n JsonRpcMockOptions,\n Snap,\n SnapResponse,\n TransactionOptions,\n} from './types';\n\nconst log = createModuleLogger(rootLogger, 'helpers');\n\n/**\n * Get the options for {@link installSnap}.\n *\n * @param snapId - The ID of the Snap, or the options.\n * @param options - The options, if any.\n * @returns The options.\n */\nfunction getOptions<\n Service extends new (...args: any[]) => InstanceType<\n typeof AbstractExecutionService\n >,\n>(\n snapId: SnapId | Partial<InstallSnapOptions<Service>> | undefined,\n options: Partial<InstallSnapOptions<Service>>,\n): [SnapId | undefined, Partial<InstallSnapOptions<Service>>] {\n if (typeof snapId === 'object') {\n return [undefined, snapId];\n }\n\n return [snapId, options];\n}\n\n/**\n * Ensure that the actual response contains `getInterface`.\n *\n * @param response - The response of the handler.\n */\nfunction assertIsResponseWithInterface(\n response: SnapResponse,\n): asserts response is SnapResponseWithInterface {\n assertStruct(response, SnapResponseWithInterfaceStruct);\n}\n\n/**\n * Load a snap into the environment. This is the main entry point for testing\n * snaps: It returns a {@link Snap} object that can be used to interact with the\n * snap.\n *\n * @example\n * import { installSnap } from '@metamask/snaps-jest';\n *\n * describe('My Snap', () => {\n * it('should do something', async () => {\n * const { request } = await installSnap('local:my-snap');\n * const response = await request({\n * method: 'foo',\n * params: ['bar'],\n * });\n * expect(response).toRespondWith('bar');\n * });\n * });\n * @returns The snap.\n * @throws If the built-in server is not running, and no snap ID is provided.\n */\nexport async function installSnap(): Promise<Snap>;\n\n/**\n * Load a snap into the environment. This is the main entry point for testing\n * snaps: It returns a {@link Snap} object that can be used to interact with the\n * snap.\n *\n * @example\n * import { installSnap } from '@metamask/snaps-jest';\n *\n * describe('My Snap', () => {\n * it('should do something', async () => {\n * const { request } = await installSnap('local:my-snap');\n * const response = await request({\n * method: 'foo',\n * params: ['bar'],\n * });\n * expect(response).toRespondWith('bar');\n * });\n * });\n * @param options - The options to use.\n * @param options.executionService - The execution service to use. Defaults to\n * {@link NodeThreadExecutionService}. You do not need to provide this unless\n * you are testing a custom execution service.\n * @param options.executionServiceOptions - The options to use when creating the\n * execution service, if any. This should only include options specific to the\n * provided execution service.\n * @param options.options - The simulation options.\n * @returns The snap.\n * @throws If the built-in server is not running, and no snap ID is provided.\n */\nexport async function installSnap<\n Service extends new (...args: any[]) => InstanceType<\n typeof AbstractExecutionService\n >,\n>(options: Partial<InstallSnapOptions<Service>>): Promise<Snap>;\n\n/**\n * Load a snap into the environment. This is the main entry point for testing\n * snaps: It returns a {@link Snap} object that can be used to interact with the\n * snap.\n *\n * @example\n * import { installSnap } from '@metamask/snaps-jest';\n *\n * describe('My Snap', () => {\n * it('should do something', async () => {\n * const { request } = await installSnap('local:my-snap');\n * const response = await request({\n * method: 'foo',\n * params: ['bar'],\n * });\n * expect(response).toRespondWith('bar');\n * });\n * });\n * @param snapId - The ID of the snap, including the prefix (`local:`). Defaults\n * to the URL of the built-in server, if it is running. This supports both\n * local snap IDs and NPM snap IDs.\n * @param options - The options to use.\n * @param options.executionService - The execution service to use. Defaults to\n * {@link NodeThreadExecutionService}. You do not need to provide this unless\n * you are testing a custom execution service.\n * @param options.executionServiceOptions - The options to use when creating the\n * execution service, if any. This should only include options specific to the\n * provided execution service.\n * @param options.options - The simulation options.\n * @returns The snap.\n * @throws If the built-in server is not running, and no snap ID is provided.\n */\nexport async function installSnap<\n Service extends new (...args: any[]) => InstanceType<\n typeof AbstractExecutionService\n >,\n>(\n snapId: SnapId,\n options?: Partial<InstallSnapOptions<Service>>,\n): Promise<Snap>;\n\n/**\n * Load a snap into the environment. This is the main entry point for testing\n * snaps: It returns a {@link Snap} object that can be used to interact with the\n * snap.\n *\n * @example\n * import { installSnap } from '@metamask/snaps-jest';\n *\n * describe('My Snap', () => {\n * it('should do something', async () => {\n * const { request } = await installSnap('local:my-snap');\n * const response = await request({\n * method: 'foo',\n * params: ['bar'],\n * });\n * expect(response).toRespondWith('bar');\n * });\n * });\n * @param snapId - The ID of the snap, including the prefix (`local:`). Defaults\n * to the URL of the built-in server, if it is running. This supports both\n * local snap IDs and NPM snap IDs.\n * @param options - The options to use.\n * @param options.executionService - The execution service to use. Defaults to\n * {@link NodeThreadExecutionService}. You do not need to provide this unless\n * you are testing a custom execution service.\n * @param options.executionServiceOptions - The options to use when creating the\n * execution service, if any. This should only include options specific to the\n * provided execution service.\n * @param options.options - The simulation options.\n * @returns The snap.\n * @throws If the built-in server is not running, and no snap ID is provided.\n */\nexport async function installSnap<\n Service extends new (...args: any[]) => InstanceType<\n typeof AbstractExecutionService\n >,\n>(\n snapId?: SnapId | Partial<InstallSnapOptions<Service>>,\n options: Partial<InstallSnapOptions<Service>> = {},\n): Promise<Snap> {\n const resolvedOptions = getOptions(snapId, options);\n const {\n snapId: installedSnapId,\n store,\n executionService,\n runSaga,\n controllerMessenger,\n } = await getEnvironment().installSnap(...resolvedOptions);\n\n const onTransaction = async (\n request: TransactionOptions,\n ): Promise<SnapResponseWithInterface> => {\n log('Sending transaction %o.', request);\n\n const {\n origin: transactionOrigin,\n chainId,\n ...transaction\n } = create(request, TransactionOptionsStruct);\n\n const response = await handleRequest({\n snapId: installedSnapId,\n store,\n executionService,\n runSaga,\n controllerMessenger,\n handler: HandlerType.OnTransaction,\n request: {\n method: '',\n params: {\n chainId,\n transaction,\n transactionOrigin,\n },\n },\n });\n\n assertIsResponseWithInterface(response);\n\n return response;\n };\n\n const onCronjob = (request: CronjobOptions) => {\n log('Running cronjob %o.', options);\n\n return handleRequest({\n snapId: installedSnapId,\n store,\n executionService,\n controllerMessenger,\n runSaga,\n handler: HandlerType.OnCronjob,\n request,\n });\n };\n\n return {\n request: (request) => {\n log('Sending request %o.', request);\n\n return handleRequest({\n snapId: installedSnapId,\n store,\n executionService,\n controllerMessenger,\n runSaga,\n handler: HandlerType.OnRpcRequest,\n request,\n });\n },\n\n onTransaction,\n sendTransaction: onTransaction,\n\n onSignature: async (\n request: unknown,\n ): Promise<SnapResponseWithInterface> => {\n log('Requesting signature %o.', request);\n\n const { origin: signatureOrigin, ...signature } = create(\n request,\n SignatureOptionsStruct,\n );\n\n const response = await handleRequest({\n snapId: installedSnapId,\n store,\n executionService,\n controllerMessenger,\n runSaga,\n handler: HandlerType.OnSignature,\n request: {\n method: '',\n params: {\n signature,\n signatureOrigin,\n },\n },\n });\n\n assertIsResponseWithInterface(response);\n\n return response;\n },\n\n onCronjob,\n runCronjob: onCronjob,\n\n onHomePage: async (): Promise<SnapResponseWithInterface> => {\n log('Rendering home page.');\n\n const response = await handleRequest({\n snapId: installedSnapId,\n store,\n executionService,\n controllerMessenger,\n runSaga,\n handler: HandlerType.OnHomePage,\n request: {\n method: '',\n },\n });\n\n assertIsResponseWithInterface(response);\n\n return response;\n },\n\n mockJsonRpc(mock: JsonRpcMockOptions) {\n log('Mocking JSON-RPC request %o.', mock);\n\n const { method, result } = create(mock, JsonRpcMockOptionsStruct);\n store.dispatch(addJsonRpcMock({ method, result }));\n\n return {\n unmock() {\n log('Unmocking JSON-RPC request %o.', mock);\n\n store.dispatch(removeJsonRpcMock(method));\n },\n };\n },\n\n close: async () => {\n log('Closing execution service.');\n logInfo(\n 'Calling `snap.close()` is deprecated, and will be removed in a future release. Snaps are now automatically closed when the test ends.',\n );\n\n await executionService.terminateAllSnaps();\n },\n };\n}\n"]}
@@ -1,9 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
-
4
- var _chunkRD7GQCPLjs = require('./chunk-RD7GQCPL.js');
5
-
6
-
7
3
  var _chunk265BMFM5js = require('./chunk-265BMFM5.js');
8
4
 
9
5
 
@@ -20,7 +16,7 @@ var _chunkRAMAN5RMjs = require('./chunk-RAMAN5RM.js');
20
16
 
21
17
 
22
18
 
23
- var _chunkISWZ7XZ5js = require('./chunk-ISWZ7XZ5.js');
19
+ var _chunkSB5EPHE3js = require('./chunk-SB5EPHE3.js');
24
20
 
25
21
 
26
22
 
@@ -50,14 +46,10 @@ function getPermissionSpecifications({
50
46
  ..._snapsrpcmethods.buildSnapRestrictedMethodSpecifications.call(void 0, _chunkXAOCS6ZDjs.EXCLUDED_SNAP_PERMISSIONS, {
51
47
  // Shared hooks.
52
48
  ...hooks,
53
- // Encryption and decryption hooks.
54
- // TODO: Swap these out for the real implementations.
55
- encrypt: _chunkRD7GQCPLjs.encryptImplementation,
56
- decrypt: _chunkRD7GQCPLjs.decryptImplementation,
57
49
  // Snaps-specific hooks.
58
- clearSnapState: _chunkISWZ7XZ5js.getClearSnapStateMethodImplementation.call(void 0, runSaga),
50
+ clearSnapState: _chunkSB5EPHE3js.getClearSnapStateMethodImplementation.call(void 0, runSaga),
59
51
  getLocale: _chunk265BMFM5js.getGetLocaleMethodImplementation.call(void 0, options),
60
- getSnapState: _chunkISWZ7XZ5js.getGetSnapStateMethodImplementation.call(void 0, runSaga),
52
+ getSnapState: _chunkSB5EPHE3js.getGetSnapStateMethodImplementation.call(void 0, runSaga),
61
53
  getUnlockPromise: asyncResolve(true),
62
54
  // TODO: Allow the user to specify the result of this function.
63
55
  isOnPhishingList: resolve(false),
@@ -65,7 +57,7 @@ function getPermissionSpecifications({
65
57
  showDialog: _chunkRAMAN5RMjs.getShowDialogImplementation.call(void 0, runSaga),
66
58
  showInAppNotification: _chunkGMTKFAWOjs.getShowInAppNotificationImplementation.call(void 0, runSaga),
67
59
  showNativeNotification: _chunkGMTKFAWOjs.getShowNativeNotificationImplementation.call(void 0, runSaga),
68
- updateSnapState: _chunkISWZ7XZ5js.getUpdateSnapStateMethodImplementation.call(void 0, runSaga),
60
+ updateSnapState: _chunkSB5EPHE3js.getUpdateSnapStateMethodImplementation.call(void 0, runSaga),
69
61
  createInterface: _chunkMJHR5RTYjs.getCreateInterfaceImplementation.call(void 0, controllerMessenger),
70
62
  getInterface: _chunkMJHR5RTYjs.getGetInterfaceImplementation.call(void 0, controllerMessenger)
71
63
  })
@@ -94,4 +86,4 @@ async function getEndowments(permissionController, snapId) {
94
86
 
95
87
 
96
88
  exports.resolve = resolve; exports.asyncResolve = asyncResolve; exports.getPermissionSpecifications = getPermissionSpecifications; exports.getEndowments = getEndowments;
97
- //# sourceMappingURL=chunk-LXSNRZV4.js.map
89
+ //# sourceMappingURL=chunk-ZWN4SO2V.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/internals/simulation/methods/specifications.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,0BAA0B;AA2C5B,SAAS,QAAQ,QAAiB;AACvC,SAAO,MAAM;AACf;AASO,SAAS,aAAa,QAAkB;AAC7C,SAAO,YAAY;AACrB;AAaO,SAAS,4BAA4B;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAuC;AACrC,SAAO;AAAA,IACL,GAAG,iCAAiC,wBAAwB;AAAA,IAC5D,GAAG,wCAAwC,2BAA2B;AAAA;AAAA,MAEpE,GAAG;AAAA;AAAA,MAGH,gBAAgB,sCAAsC,OAAO;AAAA,MAC7D,WAAW,iCAAiC,OAAO;AAAA,MACnD,cAAc,oCAAoC,OAAO;AAAA,MACzD,kBAAkB,aAAa,IAAI;AAAA;AAAA,MAGnC,kBAAkB,QAAQ,KAAK;AAAA,MAE/B,yBAAyB,aAAa;AAAA,MACtC,YAAY,4BAA4B,OAAO;AAAA,MAC/C,uBAAuB,uCAAuC,OAAO;AAAA,MACrE,wBAAwB,wCAAwC,OAAO;AAAA,MACvE,iBAAiB,uCAAuC,OAAO;AAAA,MAC/D,iBAAiB,iCAAiC,mBAAmB;AAAA,MACrE,cAAc,8BAA8B,mBAAmB;AAAA,IACjE,CAAC;AAAA,EACH;AACF;AASA,eAAsB,cACpB,sBACA,QACA;AACA,QAAM,gBAAgB,MAAM,OAAO,KAAK,2BAA2B,EAAE,OAEnE,OAAO,SAAS,mBAAmB;AACnC,UAAM,cAAc,MAAM;AAC1B,QAAI,qBAAqB,cAAc,QAAQ,cAAc,GAAG;AAC9D,YAAM,aAAa,MAAM,qBAAqB;AAAA,QAC5C;AAAA,QACA;AAAA,MACF;AAEA,UAAI,YAAY;AACd,eAAO,YAAY,OAAO,UAAsB;AAAA,MAClD;AAAA,IACF;AAEA,WAAO;AAAA,EACT,GAAG,QAAQ,QAAQ,CAAC,CAAC,CAAC;AAEtB,SAAO,CAAC,GAAG,oBAAI,IAAI,CAAC,GAAG,oBAAoB,GAAG,aAAa,CAAC,CAAC;AAC/D","sourcesContent":["import type { GenericPermissionController } from '@metamask/permission-controller';\nimport {\n endowmentPermissionBuilders,\n buildSnapEndowmentSpecifications,\n buildSnapRestrictedMethodSpecifications,\n} from '@metamask/snaps-rpc-methods';\nimport type { SnapId } from '@metamask/snaps-sdk';\nimport { DEFAULT_ENDOWMENTS } from '@metamask/snaps-utils';\n\nimport type { RootControllerMessenger } from '../controllers';\nimport type { SimulationOptions } from '../options';\nimport type { RunSagaFunction } from '../store';\nimport {\n EXCLUDED_SNAP_ENDOWMENTS,\n EXCLUDED_SNAP_PERMISSIONS,\n} from './constants';\nimport {\n getGetLocaleMethodImplementation,\n getClearSnapStateMethodImplementation,\n getGetSnapStateMethodImplementation,\n getUpdateSnapStateMethodImplementation,\n getShowDialogImplementation,\n getShowInAppNotificationImplementation,\n getShowNativeNotificationImplementation,\n getCreateInterfaceImplementation,\n getGetInterfaceImplementation,\n} from './hooks';\n\nexport type PermissionSpecificationsHooks = {\n /**\n * A hook that returns the user's secret recovery phrase.\n *\n * @returns The user's secret recovery phrase.\n */\n getMnemonic: () => Promise<Uint8Array>;\n};\n\nexport type GetPermissionSpecificationsOptions = {\n controllerMessenger: RootControllerMessenger;\n hooks: PermissionSpecificationsHooks;\n runSaga: RunSagaFunction;\n options: SimulationOptions;\n};\n\n/**\n * Get a function which resolves with the specified result.\n *\n * @param result - The result to return.\n * @returns The function implementation.\n */\nexport function resolve(result: unknown) {\n return () => result;\n}\n\n/**\n * Get a function which resolves with the specified result.\n *\n * @param result - The result to return. If not specified, the function will\n * resolve with `undefined`.\n * @returns The function implementation.\n */\nexport function asyncResolve(result?: unknown) {\n return async () => result;\n}\n\n/**\n * Get the permission specifications for the Snap.\n *\n * @param options - The options.\n * @param options.controllerMessenger - The controller messenger.\n * @param options.hooks - The hooks.\n * @param options.runSaga - The function to run a saga outside the usual Redux\n * flow.\n * @param options.options - The simulation options.\n * @returns The permission specifications for the Snap.\n */\nexport function getPermissionSpecifications({\n controllerMessenger,\n hooks,\n runSaga,\n options,\n}: GetPermissionSpecificationsOptions) {\n return {\n ...buildSnapEndowmentSpecifications(EXCLUDED_SNAP_ENDOWMENTS),\n ...buildSnapRestrictedMethodSpecifications(EXCLUDED_SNAP_PERMISSIONS, {\n // Shared hooks.\n ...hooks,\n\n // Snaps-specific hooks.\n clearSnapState: getClearSnapStateMethodImplementation(runSaga),\n getLocale: getGetLocaleMethodImplementation(options),\n getSnapState: getGetSnapStateMethodImplementation(runSaga),\n getUnlockPromise: asyncResolve(true),\n\n // TODO: Allow the user to specify the result of this function.\n isOnPhishingList: resolve(false),\n\n maybeUpdatePhishingList: asyncResolve(),\n showDialog: getShowDialogImplementation(runSaga),\n showInAppNotification: getShowInAppNotificationImplementation(runSaga),\n showNativeNotification: getShowNativeNotificationImplementation(runSaga),\n updateSnapState: getUpdateSnapStateMethodImplementation(runSaga),\n createInterface: getCreateInterfaceImplementation(controllerMessenger),\n getInterface: getGetInterfaceImplementation(controllerMessenger),\n }),\n };\n}\n\n/**\n * Get the endowments for the Snap.\n *\n * @param permissionController - The permission controller.\n * @param snapId - The ID of the Snap.\n * @returns The endowments for the Snap.\n */\nexport async function getEndowments(\n permissionController: GenericPermissionController,\n snapId: SnapId,\n) {\n const allEndowments = await Object.keys(endowmentPermissionBuilders).reduce<\n Promise<string[]>\n >(async (promise, permissionName) => {\n const accumulator = await promise;\n if (permissionController.hasPermission(snapId, permissionName)) {\n const endowments = await permissionController.getEndowments(\n snapId,\n permissionName,\n );\n\n if (endowments) {\n return accumulator.concat(endowments as string[]);\n }\n }\n\n return accumulator;\n }, Promise.resolve([]));\n\n return [...new Set([...DEFAULT_ENDOWMENTS, ...allEndowments])];\n}\n"]}
@@ -1,13 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkJUNUGLG4js = require('./chunk-JUNUGLG4.js');
4
+ var _chunk2JAGD4N6js = require('./chunk-2JAGD4N6.js');
5
5
  require('./chunk-T2PHS5FY.js');
6
6
  require('./chunk-HROOL3VI.js');
7
- require('./chunk-HNH5UAKZ.js');
7
+ require('./chunk-2JTGBHPR.js');
8
+ require('./chunk-6POKT4OO.js');
8
9
  require('./chunk-GECE47HW.js');
9
- require('./chunk-ZAQZRYPW.js');
10
- require('./chunk-SQJOQ7AF.js');
10
+ require('./chunk-Y4DKEF7Y.js');
11
+ require('./chunk-MCYTJUDG.js');
11
12
  require('./chunk-ZTX624YO.js');
12
13
  require('./chunk-XWGECIXI.js');
13
14
  require('./chunk-WHGYMK5B.js');
@@ -15,33 +16,31 @@ require('./chunk-Y3JC4WGW.js');
15
16
  require('./chunk-WDYPMEZB.js');
16
17
  require('./chunk-3FNLFVV2.js');
17
18
  require('./chunk-EMTW3H54.js');
19
+ require('./chunk-TVD4SWH7.js');
18
20
  require('./chunk-VXPCUDBI.js');
19
21
  require('./chunk-N6MAO223.js');
20
22
  require('./chunk-TZB4LBT7.js');
21
- require('./chunk-T2BE4O5H.js');
23
+ require('./chunk-IDGD7TZ7.js');
22
24
  require('./chunk-XKJHFUHE.js');
23
- require('./chunk-WFBQPYSV.js');
25
+ require('./chunk-DTDYOBCI.js');
24
26
  require('./chunk-DR6Y7IVX.js');
25
- require('./chunk-LXSNRZV4.js');
26
- require('./chunk-U5BLLHIU.js');
27
- require('./chunk-RD7GQCPL.js');
27
+ require('./chunk-ZWN4SO2V.js');
28
+ require('./chunk-CKRORVDW.js');
28
29
  require('./chunk-265BMFM5.js');
29
30
  require('./chunk-MJHR5RTY.js');
30
31
  require('./chunk-GMTKFAWO.js');
31
32
  require('./chunk-RAMAN5RM.js');
32
- require('./chunk-ISWZ7XZ5.js');
33
+ require('./chunk-SB5EPHE3.js');
33
34
  require('./chunk-VHJZERIC.js');
34
- require('./chunk-TO46ICOZ.js');
35
+ require('./chunk-WMLSD6B5.js');
35
36
  require('./chunk-PZDTZGSI.js');
36
37
  require('./chunk-LACTK6EO.js');
37
38
  require('./chunk-2YE2P5BZ.js');
38
39
  require('./chunk-LBC2OGSN.js');
39
40
  require('./chunk-XAOCS6ZD.js');
40
- require('./chunk-TVD4SWH7.js');
41
- require('./chunk-2JTGBHPR.js');
42
41
  require('./chunk-PHUTP7NB.js');
43
42
 
44
43
 
45
44
 
46
- exports.SnapsEnvironment = _chunkJUNUGLG4js.SnapsEnvironment; exports.default = _chunkJUNUGLG4js.environment_default;
45
+ exports.SnapsEnvironment = _chunk2JAGD4N6js.SnapsEnvironment; exports.default = _chunk2JAGD4N6js.environment_default;
47
46
  //# sourceMappingURL=environment.js.map
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  SnapsEnvironment,
3
3
  environment_default
4
- } from "./chunk-4SC3HVI5.mjs";
4
+ } from "./chunk-X5IPMTHO.mjs";
5
5
  import "./chunk-B73P64TE.mjs";
6
6
  import "./chunk-MF43OG3Z.mjs";
7
- import "./chunk-LYK6EGZU.mjs";
7
+ import "./chunk-XK5HPZZC.mjs";
8
+ import "./chunk-PVMIH6OB.mjs";
8
9
  import "./chunk-5ZFHFICZ.mjs";
9
- import "./chunk-6MVV44M5.mjs";
10
- import "./chunk-LHU3EHLI.mjs";
10
+ import "./chunk-I5P52IMF.mjs";
11
+ import "./chunk-VSUNWJMQ.mjs";
11
12
  import "./chunk-ZG33OGC3.mjs";
12
13
  import "./chunk-KNJNL723.mjs";
13
14
  import "./chunk-6HHV6YFQ.mjs";
@@ -15,30 +16,28 @@ import "./chunk-Q2OQXAUM.mjs";
15
16
  import "./chunk-VOYBI6T4.mjs";
16
17
  import "./chunk-IXKO6X55.mjs";
17
18
  import "./chunk-FP4H3ADT.mjs";
19
+ import "./chunk-TBDYQSRT.mjs";
18
20
  import "./chunk-IH7UNS5A.mjs";
19
21
  import "./chunk-SLU4FNKX.mjs";
20
22
  import "./chunk-J4ZPUCLX.mjs";
21
- import "./chunk-7J34R6YW.mjs";
23
+ import "./chunk-YEVKBYKO.mjs";
22
24
  import "./chunk-6KXCBUNZ.mjs";
23
- import "./chunk-CCYBLBVL.mjs";
25
+ import "./chunk-LG3VKXGH.mjs";
24
26
  import "./chunk-NTOY6Y4Q.mjs";
25
- import "./chunk-HBLJOACO.mjs";
26
- import "./chunk-V6LFAN3U.mjs";
27
- import "./chunk-2X23DUDP.mjs";
27
+ import "./chunk-TAIJXTLU.mjs";
28
+ import "./chunk-UDOXICJK.mjs";
28
29
  import "./chunk-KSIBNOB2.mjs";
29
30
  import "./chunk-WH5C5WIZ.mjs";
30
31
  import "./chunk-ALRZENWP.mjs";
31
32
  import "./chunk-ORO3T6BU.mjs";
32
- import "./chunk-7BFTEFLS.mjs";
33
+ import "./chunk-5U5WB3SM.mjs";
33
34
  import "./chunk-RQKT6BQ2.mjs";
34
- import "./chunk-7YD4IW43.mjs";
35
+ import "./chunk-3M4GRUMH.mjs";
35
36
  import "./chunk-74TIKA2T.mjs";
36
37
  import "./chunk-H2464AXT.mjs";
37
38
  import "./chunk-LB4R3BUA.mjs";
38
39
  import "./chunk-MPZOXW6I.mjs";
39
40
  import "./chunk-57SGDM5B.mjs";
40
- import "./chunk-TBDYQSRT.mjs";
41
- import "./chunk-XK5HPZZC.mjs";
42
41
  import "./chunk-JMDSN227.mjs";
43
42
  export {
44
43
  SnapsEnvironment,
package/dist/global.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";require('./chunk-S2HLITUN.js');
2
+ //# sourceMappingURL=global.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import "./chunk-TGZ7WOTJ.mjs";
2
+ //# sourceMappingURL=global.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/helpers.js CHANGED
@@ -1,11 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk5PLDD7ZCjs = require('./chunk-5PLDD7ZC.js');
3
+ var _chunkZ35PCKFDjs = require('./chunk-Z35PCKFD.js');
4
4
  require('./chunk-HROOL3VI.js');
5
- require('./chunk-HNH5UAKZ.js');
5
+ require('./chunk-2JTGBHPR.js');
6
+ require('./chunk-6POKT4OO.js');
6
7
  require('./chunk-GECE47HW.js');
7
- require('./chunk-ZAQZRYPW.js');
8
- require('./chunk-SQJOQ7AF.js');
8
+ require('./chunk-Y4DKEF7Y.js');
9
+ require('./chunk-MCYTJUDG.js');
9
10
  require('./chunk-ZTX624YO.js');
10
11
  require('./chunk-XWGECIXI.js');
11
12
  require('./chunk-WHGYMK5B.js');
@@ -13,32 +14,30 @@ require('./chunk-Y3JC4WGW.js');
13
14
  require('./chunk-WDYPMEZB.js');
14
15
  require('./chunk-3FNLFVV2.js');
15
16
  require('./chunk-EMTW3H54.js');
17
+ require('./chunk-TVD4SWH7.js');
16
18
  require('./chunk-VXPCUDBI.js');
17
19
  require('./chunk-N6MAO223.js');
18
20
  require('./chunk-TZB4LBT7.js');
19
- require('./chunk-T2BE4O5H.js');
21
+ require('./chunk-IDGD7TZ7.js');
20
22
  require('./chunk-XKJHFUHE.js');
21
- require('./chunk-WFBQPYSV.js');
23
+ require('./chunk-DTDYOBCI.js');
22
24
  require('./chunk-DR6Y7IVX.js');
23
- require('./chunk-LXSNRZV4.js');
24
- require('./chunk-U5BLLHIU.js');
25
- require('./chunk-RD7GQCPL.js');
25
+ require('./chunk-ZWN4SO2V.js');
26
+ require('./chunk-CKRORVDW.js');
26
27
  require('./chunk-265BMFM5.js');
27
28
  require('./chunk-MJHR5RTY.js');
28
29
  require('./chunk-GMTKFAWO.js');
29
30
  require('./chunk-RAMAN5RM.js');
30
- require('./chunk-ISWZ7XZ5.js');
31
+ require('./chunk-SB5EPHE3.js');
31
32
  require('./chunk-VHJZERIC.js');
32
- require('./chunk-TO46ICOZ.js');
33
+ require('./chunk-WMLSD6B5.js');
33
34
  require('./chunk-PZDTZGSI.js');
34
35
  require('./chunk-LACTK6EO.js');
35
36
  require('./chunk-2YE2P5BZ.js');
36
37
  require('./chunk-LBC2OGSN.js');
37
38
  require('./chunk-XAOCS6ZD.js');
38
- require('./chunk-TVD4SWH7.js');
39
- require('./chunk-2JTGBHPR.js');
40
39
  require('./chunk-PHUTP7NB.js');
41
40
 
42
41
 
43
- exports.installSnap = _chunk5PLDD7ZCjs.installSnap;
42
+ exports.installSnap = _chunkZ35PCKFDjs.installSnap;
44
43
  //# sourceMappingURL=helpers.js.map
package/dist/helpers.mjs CHANGED
@@ -1,11 +1,12 @@
1
1
  import {
2
2
  installSnap
3
- } from "./chunk-WIFOID2P.mjs";
3
+ } from "./chunk-EDEJD326.mjs";
4
4
  import "./chunk-MF43OG3Z.mjs";
5
- import "./chunk-LYK6EGZU.mjs";
5
+ import "./chunk-XK5HPZZC.mjs";
6
+ import "./chunk-PVMIH6OB.mjs";
6
7
  import "./chunk-5ZFHFICZ.mjs";
7
- import "./chunk-6MVV44M5.mjs";
8
- import "./chunk-LHU3EHLI.mjs";
8
+ import "./chunk-I5P52IMF.mjs";
9
+ import "./chunk-VSUNWJMQ.mjs";
9
10
  import "./chunk-ZG33OGC3.mjs";
10
11
  import "./chunk-KNJNL723.mjs";
11
12
  import "./chunk-6HHV6YFQ.mjs";
@@ -13,30 +14,28 @@ import "./chunk-Q2OQXAUM.mjs";
13
14
  import "./chunk-VOYBI6T4.mjs";
14
15
  import "./chunk-IXKO6X55.mjs";
15
16
  import "./chunk-FP4H3ADT.mjs";
17
+ import "./chunk-TBDYQSRT.mjs";
16
18
  import "./chunk-IH7UNS5A.mjs";
17
19
  import "./chunk-SLU4FNKX.mjs";
18
20
  import "./chunk-J4ZPUCLX.mjs";
19
- import "./chunk-7J34R6YW.mjs";
21
+ import "./chunk-YEVKBYKO.mjs";
20
22
  import "./chunk-6KXCBUNZ.mjs";
21
- import "./chunk-CCYBLBVL.mjs";
23
+ import "./chunk-LG3VKXGH.mjs";
22
24
  import "./chunk-NTOY6Y4Q.mjs";
23
- import "./chunk-HBLJOACO.mjs";
24
- import "./chunk-V6LFAN3U.mjs";
25
- import "./chunk-2X23DUDP.mjs";
25
+ import "./chunk-TAIJXTLU.mjs";
26
+ import "./chunk-UDOXICJK.mjs";
26
27
  import "./chunk-KSIBNOB2.mjs";
27
28
  import "./chunk-WH5C5WIZ.mjs";
28
29
  import "./chunk-ALRZENWP.mjs";
29
30
  import "./chunk-ORO3T6BU.mjs";
30
- import "./chunk-7BFTEFLS.mjs";
31
+ import "./chunk-5U5WB3SM.mjs";
31
32
  import "./chunk-RQKT6BQ2.mjs";
32
- import "./chunk-7YD4IW43.mjs";
33
+ import "./chunk-3M4GRUMH.mjs";
33
34
  import "./chunk-74TIKA2T.mjs";
34
35
  import "./chunk-H2464AXT.mjs";
35
36
  import "./chunk-LB4R3BUA.mjs";
36
37
  import "./chunk-MPZOXW6I.mjs";
37
38
  import "./chunk-57SGDM5B.mjs";
38
- import "./chunk-TBDYQSRT.mjs";
39
- import "./chunk-XK5HPZZC.mjs";
40
39
  import "./chunk-JMDSN227.mjs";
41
40
  export {
42
41
  installSnap
package/dist/index.js CHANGED
@@ -1,17 +1,19 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkJUNUGLG4js = require('./chunk-JUNUGLG4.js');
3
+ var _chunk2JAGD4N6js = require('./chunk-2JAGD4N6.js');
4
+ require('./chunk-S2HLITUN.js');
4
5
 
5
6
 
6
- var _chunk5PLDD7ZCjs = require('./chunk-5PLDD7ZC.js');
7
+ var _chunkZ35PCKFDjs = require('./chunk-Z35PCKFD.js');
7
8
 
8
9
 
9
10
  var _chunkT2PHS5FYjs = require('./chunk-T2PHS5FY.js');
10
11
  require('./chunk-HROOL3VI.js');
11
- require('./chunk-HNH5UAKZ.js');
12
+ require('./chunk-2JTGBHPR.js');
13
+ require('./chunk-6POKT4OO.js');
12
14
  require('./chunk-GECE47HW.js');
13
- require('./chunk-ZAQZRYPW.js');
14
- require('./chunk-SQJOQ7AF.js');
15
+ require('./chunk-Y4DKEF7Y.js');
16
+ require('./chunk-MCYTJUDG.js');
15
17
  require('./chunk-ZTX624YO.js');
16
18
  require('./chunk-XWGECIXI.js');
17
19
  require('./chunk-WHGYMK5B.js');
@@ -19,36 +21,34 @@ require('./chunk-Y3JC4WGW.js');
19
21
  require('./chunk-WDYPMEZB.js');
20
22
  require('./chunk-3FNLFVV2.js');
21
23
  require('./chunk-EMTW3H54.js');
24
+ require('./chunk-TVD4SWH7.js');
22
25
  require('./chunk-VXPCUDBI.js');
23
26
  require('./chunk-N6MAO223.js');
24
27
  require('./chunk-TZB4LBT7.js');
25
- require('./chunk-T2BE4O5H.js');
28
+ require('./chunk-IDGD7TZ7.js');
26
29
  require('./chunk-XKJHFUHE.js');
27
- require('./chunk-WFBQPYSV.js');
30
+ require('./chunk-DTDYOBCI.js');
28
31
  require('./chunk-DR6Y7IVX.js');
29
- require('./chunk-LXSNRZV4.js');
30
- require('./chunk-U5BLLHIU.js');
31
- require('./chunk-RD7GQCPL.js');
32
+ require('./chunk-ZWN4SO2V.js');
33
+ require('./chunk-CKRORVDW.js');
32
34
  require('./chunk-265BMFM5.js');
33
35
  require('./chunk-MJHR5RTY.js');
34
36
  require('./chunk-GMTKFAWO.js');
35
37
  require('./chunk-RAMAN5RM.js');
36
- require('./chunk-ISWZ7XZ5.js');
38
+ require('./chunk-SB5EPHE3.js');
37
39
  require('./chunk-VHJZERIC.js');
38
- require('./chunk-TO46ICOZ.js');
40
+ require('./chunk-WMLSD6B5.js');
39
41
  require('./chunk-PZDTZGSI.js');
40
42
  require('./chunk-LACTK6EO.js');
41
43
  require('./chunk-2YE2P5BZ.js');
42
44
  require('./chunk-LBC2OGSN.js');
43
45
  require('./chunk-XAOCS6ZD.js');
44
- require('./chunk-TVD4SWH7.js');
45
- require('./chunk-55J6XMHW.js');
46
- require('./chunk-2JTGBHPR.js');
47
46
  require('./chunk-PHUTP7NB.js');
47
+ require('./chunk-55J6XMHW.js');
48
48
 
49
49
 
50
50
 
51
51
 
52
52
 
53
- exports.TestEnvironment = _chunkJUNUGLG4js.environment_default; exports.default = _chunkJUNUGLG4js.environment_default; exports.getOptions = _chunkT2PHS5FYjs.getOptions; exports.installSnap = _chunk5PLDD7ZCjs.installSnap;
53
+ exports.TestEnvironment = _chunk2JAGD4N6js.environment_default; exports.default = _chunk2JAGD4N6js.environment_default; exports.getOptions = _chunkT2PHS5FYjs.getOptions; exports.installSnap = _chunkZ35PCKFDjs.installSnap;
54
54
  //# sourceMappingURL=index.js.map