@metamask/snaps-execution-environments 6.5.0 → 6.6.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 (67) hide show
  1. package/CHANGELOG.md +18 -1
  2. package/dist/browserify/iframe/bundle.js +5 -5
  3. package/dist/browserify/iframe/index.html +11 -11
  4. package/dist/browserify/node-process/bundle.js +4 -4
  5. package/dist/browserify/node-thread/bundle.js +4 -4
  6. package/dist/browserify/webview/index.html +19 -11
  7. package/dist/browserify/worker-executor/bundle.js +5 -5
  8. package/dist/browserify/worker-pool/bundle.js +5 -5
  9. package/dist/browserify/worker-pool/index.html +11 -11
  10. package/dist/{chunk-YORBE35Y.mjs → chunk-72KFTWQZ.mjs} +2 -2
  11. package/dist/{chunk-KJ2VDWNW.mjs → chunk-75RCH4ZX.mjs} +10 -10
  12. package/dist/chunk-75RCH4ZX.mjs.map +1 -0
  13. package/dist/{chunk-RE5NT2N5.js → chunk-7MMUJJQ2.js} +3 -3
  14. package/dist/chunk-7MMUJJQ2.js.map +1 -0
  15. package/dist/{chunk-4I4X5VQI.mjs → chunk-BEJDC4XI.mjs} +2 -2
  16. package/dist/{chunk-Z5VEHM7C.js → chunk-BLHIYDO5.js} +3 -3
  17. package/dist/{chunk-4DBCLKW3.js → chunk-FUPEJT7B.js} +6 -6
  18. package/dist/{chunk-WHBMFB7M.js → chunk-HCXTK3PR.js} +9 -9
  19. package/dist/chunk-HCXTK3PR.js.map +1 -0
  20. package/dist/{chunk-Q6KWWQ7U.mjs → chunk-HXUJHX3E.mjs} +2 -2
  21. package/dist/{chunk-7YME4TI6.mjs → chunk-JDWYJ5UI.mjs} +2 -2
  22. package/dist/{chunk-OWO7XS4C.mjs → chunk-M3OBSGHF.mjs} +4 -4
  23. package/dist/chunk-M3OBSGHF.mjs.map +1 -0
  24. package/dist/{chunk-CMYXMQUM.mjs → chunk-MMYM63NH.mjs} +2 -2
  25. package/dist/{chunk-LK3HLWIY.js → chunk-RACRYFWM.js} +3 -3
  26. package/dist/{chunk-JJOIN7DT.js → chunk-RD2APLK5.js} +3 -3
  27. package/dist/{chunk-YRBXNYUV.js → chunk-ZAYDLP42.js} +3 -3
  28. package/dist/common/BaseSnapExecutor.js +4 -4
  29. package/dist/common/BaseSnapExecutor.mjs +3 -3
  30. package/dist/common/commands.js +3 -3
  31. package/dist/common/commands.mjs +2 -2
  32. package/dist/common/validation.js +2 -2
  33. package/dist/common/validation.mjs +1 -1
  34. package/dist/iframe/IFrameSnapExecutor.js +5 -5
  35. package/dist/iframe/IFrameSnapExecutor.mjs +4 -4
  36. package/dist/iframe/index.js +5 -5
  37. package/dist/iframe/index.mjs +4 -4
  38. package/dist/node-process/ChildProcessSnapExecutor.js +5 -5
  39. package/dist/node-process/ChildProcessSnapExecutor.mjs +4 -4
  40. package/dist/node-process/index.js +5 -5
  41. package/dist/node-process/index.mjs +4 -4
  42. package/dist/node-thread/ThreadSnapExecutor.js +5 -5
  43. package/dist/node-thread/ThreadSnapExecutor.mjs +4 -4
  44. package/dist/node-thread/index.js +5 -5
  45. package/dist/node-thread/index.mjs +4 -4
  46. package/dist/tsconfig.build.tsbuildinfo +1 -1
  47. package/dist/types/common/validation.d.ts +29 -29
  48. package/dist/webworker/executor/WebWorkerSnapExecutor.js +5 -5
  49. package/dist/webworker/executor/WebWorkerSnapExecutor.mjs +4 -4
  50. package/dist/webworker/executor/index.js +5 -5
  51. package/dist/webworker/executor/index.mjs +4 -4
  52. package/package.json +8 -8
  53. package/dist/browserify/webview/bundle.js +0 -9
  54. package/dist/chunk-KJ2VDWNW.mjs.map +0 -1
  55. package/dist/chunk-OWO7XS4C.mjs.map +0 -1
  56. package/dist/chunk-RE5NT2N5.js.map +0 -1
  57. package/dist/chunk-WHBMFB7M.js.map +0 -1
  58. /package/dist/{chunk-YORBE35Y.mjs.map → chunk-72KFTWQZ.mjs.map} +0 -0
  59. /package/dist/{chunk-4I4X5VQI.mjs.map → chunk-BEJDC4XI.mjs.map} +0 -0
  60. /package/dist/{chunk-Z5VEHM7C.js.map → chunk-BLHIYDO5.js.map} +0 -0
  61. /package/dist/{chunk-4DBCLKW3.js.map → chunk-FUPEJT7B.js.map} +0 -0
  62. /package/dist/{chunk-Q6KWWQ7U.mjs.map → chunk-HXUJHX3E.mjs.map} +0 -0
  63. /package/dist/{chunk-7YME4TI6.mjs.map → chunk-JDWYJ5UI.mjs.map} +0 -0
  64. /package/dist/{chunk-CMYXMQUM.mjs.map → chunk-MMYM63NH.mjs.map} +0 -0
  65. /package/dist/{chunk-LK3HLWIY.js.map → chunk-RACRYFWM.js.map} +0 -0
  66. /package/dist/{chunk-JJOIN7DT.js.map → chunk-RD2APLK5.js.map} +0 -0
  67. /package/dist/{chunk-YRBXNYUV.js.map → chunk-ZAYDLP42.js.map} +0 -0
@@ -1,19 +1,19 @@
1
1
  import { HandlerType } from '@metamask/snaps-utils';
2
+ import type { Infer } from '@metamask/superstruct';
2
3
  import type { Json, JsonRpcSuccess } from '@metamask/utils';
3
- import type { Infer } from 'superstruct';
4
- export declare const JsonRpcRequestWithoutIdStruct: import("superstruct").Struct<{
4
+ export declare const JsonRpcRequestWithoutIdStruct: import("@metamask/superstruct").Struct<{
5
5
  method: string;
6
6
  id?: string | number | null | undefined;
7
7
  jsonrpc?: "2.0" | undefined;
8
8
  params?: Record<string, Json> | Json[] | undefined;
9
9
  }, {
10
- jsonrpc: import("superstruct").Struct<"2.0" | undefined, "2.0">;
11
- id: import("superstruct").Struct<string | number | null | undefined, null>;
12
- method: import("superstruct").Struct<string, null>;
13
- params: import("superstruct").Struct<Record<string, Json> | Json[] | undefined, null>;
10
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0" | undefined, "2.0">;
11
+ id: import("@metamask/superstruct").Struct<string | number | null | undefined, null>;
12
+ method: import("@metamask/superstruct").Struct<string, null>;
13
+ params: import("@metamask/superstruct").Struct<Record<string, Json> | Json[] | undefined, null>;
14
14
  }>;
15
15
  export declare type JsonRpcRequestWithoutId = Infer<typeof JsonRpcRequestWithoutIdStruct>;
16
- export declare const EndowmentStruct: import("superstruct").Struct<string, null>;
16
+ export declare const EndowmentStruct: import("@metamask/superstruct").Struct<string, null>;
17
17
  export declare type Endowment = Infer<typeof EndowmentStruct>;
18
18
  /**
19
19
  * Check if the given value is an endowment.
@@ -29,10 +29,10 @@ export declare function isEndowment(value: unknown): value is Endowment;
29
29
  * @returns Whether the value is an array of endowments.
30
30
  */
31
31
  export declare function isEndowmentsArray(value: unknown): value is Endowment[];
32
- export declare const PingRequestArgumentsStruct: import("superstruct").Struct<unknown[] | undefined, null>;
33
- export declare const TerminateRequestArgumentsStruct: import("superstruct").Struct<unknown[] | undefined, null>;
34
- export declare const ExecuteSnapRequestArgumentsStruct: import("superstruct").Struct<[string, string, string[]], null>;
35
- export declare const SnapRpcRequestArgumentsStruct: import("superstruct").Struct<[string, HandlerType, string, {
32
+ export declare const PingRequestArgumentsStruct: import("@metamask/superstruct").Struct<unknown[] | undefined, null>;
33
+ export declare const TerminateRequestArgumentsStruct: import("@metamask/superstruct").Struct<unknown[] | undefined, null>;
34
+ export declare const ExecuteSnapRequestArgumentsStruct: import("@metamask/superstruct").Struct<[string, string, string[]], null>;
35
+ export declare const SnapRpcRequestArgumentsStruct: import("@metamask/superstruct").Struct<[string, HandlerType, string, {
36
36
  method: string;
37
37
  id?: string | number | null | undefined;
38
38
  jsonrpc?: "2.0" | undefined;
@@ -43,14 +43,14 @@ export declare type TerminateRequestArguments = Infer<typeof TerminateRequestArg
43
43
  export declare type ExecuteSnapRequestArguments = Infer<typeof ExecuteSnapRequestArgumentsStruct>;
44
44
  export declare type SnapRpcRequestArguments = Infer<typeof SnapRpcRequestArgumentsStruct>;
45
45
  export declare type RequestArguments = PingRequestArguments | TerminateRequestArguments | ExecuteSnapRequestArguments | SnapRpcRequestArguments;
46
- export declare const OnTransactionRequestArgumentsStruct: import("superstruct").Struct<{
46
+ export declare const OnTransactionRequestArgumentsStruct: import("@metamask/superstruct").Struct<{
47
47
  chainId: `${string}:${string}`;
48
48
  transaction: Record<string, Json>;
49
49
  transactionOrigin: string | null;
50
50
  }, {
51
- transaction: import("superstruct").Struct<Record<string, Json>, null>;
52
- chainId: import("superstruct").Struct<`${string}:${string}`, null>;
53
- transactionOrigin: import("superstruct").Struct<string | null, null>;
51
+ transaction: import("@metamask/superstruct").Struct<Record<string, Json>, null>;
52
+ chainId: import("@metamask/superstruct").Struct<`${string}:${string}`, null>;
53
+ transactionOrigin: import("@metamask/superstruct").Struct<string | null, null>;
54
54
  }>;
55
55
  export declare type OnTransactionRequestArguments = Infer<typeof OnTransactionRequestArgumentsStruct>;
56
56
  /**
@@ -62,12 +62,12 @@ export declare type OnTransactionRequestArguments = Infer<typeof OnTransactionRe
62
62
  * object.
63
63
  */
64
64
  export declare function assertIsOnTransactionRequestArguments(value: unknown): asserts value is OnTransactionRequestArguments;
65
- export declare const OnSignatureRequestArgumentsStruct: import("superstruct").Struct<{
65
+ export declare const OnSignatureRequestArgumentsStruct: import("@metamask/superstruct").Struct<{
66
66
  signature: Record<string, Json>;
67
67
  signatureOrigin: string | null;
68
68
  }, {
69
- signature: import("superstruct").Struct<Record<string, Json>, null>;
70
- signatureOrigin: import("superstruct").Struct<string | null, null>;
69
+ signature: import("@metamask/superstruct").Struct<Record<string, Json>, null>;
70
+ signatureOrigin: import("@metamask/superstruct").Struct<string | null, null>;
71
71
  }>;
72
72
  export declare type OnSignatureRequestArguments = Infer<typeof OnSignatureRequestArgumentsStruct>;
73
73
  /**
@@ -80,9 +80,9 @@ export declare type OnSignatureRequestArguments = Infer<typeof OnSignatureReques
80
80
  */
81
81
  export declare function assertIsOnSignatureRequestArguments(value: unknown): asserts value is OnSignatureRequestArguments;
82
82
  declare const baseNameLookupArgs: {
83
- chainId: import("superstruct").Struct<`${string}:${string}`, null>;
83
+ chainId: import("@metamask/superstruct").Struct<`${string}:${string}`, null>;
84
84
  };
85
- export declare const OnNameLookupRequestArgumentsStruct: import("superstruct").Struct<{
85
+ export declare const OnNameLookupRequestArgumentsStruct: import("@metamask/superstruct").Struct<{
86
86
  chainId: `${string}:${string}`;
87
87
  address: string;
88
88
  } | {
@@ -103,7 +103,7 @@ export declare type PossibleLookupRequestArgs = typeof baseNameLookupArgs & {
103
103
  * object.
104
104
  */
105
105
  export declare function assertIsOnNameLookupRequestArguments(value: unknown): asserts value is OnNameLookupRequestArguments;
106
- export declare const OnUserInputArgumentsStruct: import("superstruct").Struct<{
106
+ export declare const OnUserInputArgumentsStruct: import("@metamask/superstruct").Struct<{
107
107
  id: string;
108
108
  event: {
109
109
  type: import("@metamask/snaps-sdk").UserInputEventType.ButtonClickEvent;
@@ -133,8 +133,8 @@ export declare const OnUserInputArgumentsStruct: import("superstruct").Struct<{
133
133
  };
134
134
  context?: Record<string, Json> | null | undefined;
135
135
  }, {
136
- id: import("superstruct").Struct<string, null>;
137
- event: import("superstruct").Struct<{
136
+ id: import("@metamask/superstruct").Struct<string, null>;
137
+ event: import("@metamask/superstruct").Struct<{
138
138
  type: import("@metamask/snaps-sdk").UserInputEventType.ButtonClickEvent;
139
139
  name?: string | undefined;
140
140
  } | {
@@ -160,7 +160,7 @@ export declare const OnUserInputArgumentsStruct: import("superstruct").Struct<{
160
160
  contents: string;
161
161
  } | null;
162
162
  }, null>;
163
- context: import("superstruct").Struct<Record<string, Json> | null | undefined, null>;
163
+ context: import("@metamask/superstruct").Struct<Record<string, Json> | null | undefined, null>;
164
164
  }>;
165
165
  export declare type OnUserInputArguments = Infer<typeof OnUserInputArgumentsStruct>;
166
166
  /**
@@ -172,16 +172,16 @@ export declare type OnUserInputArguments = Infer<typeof OnUserInputArgumentsStru
172
172
  * object.
173
173
  */
174
174
  export declare function assertIsOnUserInputRequestArguments(value: unknown): asserts value is OnUserInputArguments;
175
- declare const OkResponseStruct: import("superstruct").Struct<{
175
+ declare const OkResponseStruct: import("@metamask/superstruct").Struct<{
176
176
  result: "OK";
177
177
  id: string | number | null;
178
178
  jsonrpc: "2.0";
179
179
  }, {
180
- id: import("superstruct").Struct<string | number | null, null>;
181
- jsonrpc: import("superstruct").Struct<"2.0", "2.0">;
182
- result: import("superstruct").Struct<"OK", "OK">;
180
+ id: import("@metamask/superstruct").Struct<string | number | null, null>;
181
+ jsonrpc: import("@metamask/superstruct").Struct<"2.0", "2.0">;
182
+ result: import("@metamask/superstruct").Struct<"OK", "OK">;
183
183
  }>;
184
- declare const SnapRpcResponse: import("superstruct").Struct<{
184
+ declare const SnapRpcResponse: import("@metamask/superstruct").Struct<{
185
185
  id: string | number | null;
186
186
  jsonrpc: "2.0";
187
187
  result: Json;
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkZ5VEHM7Cjs = require('../../chunk-Z5VEHM7C.js');
4
- require('../../chunk-WHBMFB7M.js');
3
+ var _chunkBLHIYDO5js = require('../../chunk-BLHIYDO5.js');
4
+ require('../../chunk-HCXTK3PR.js');
5
5
  require('../../chunk-DKDTGAFK.js');
6
6
  require('../../chunk-4COIRXF5.js');
7
7
  require('../../chunk-KEAB7ZVV.js');
@@ -15,13 +15,13 @@ require('../../chunk-HGLRZZ56.js');
15
15
  require('../../chunk-QZC2X6NG.js');
16
16
  require('../../chunk-46LW37FK.js');
17
17
  require('../../chunk-Z7BOREC4.js');
18
- require('../../chunk-4DBCLKW3.js');
19
- require('../../chunk-RE5NT2N5.js');
18
+ require('../../chunk-FUPEJT7B.js');
19
+ require('../../chunk-7MMUJJQ2.js');
20
20
  require('../../chunk-2VA6RAEE.js');
21
21
  require('../../chunk-DLLLH5HN.js');
22
22
  require('../../chunk-CV5LC4PP.js');
23
23
  require('../../chunk-EXN2TFDJ.js');
24
24
 
25
25
 
26
- exports.WebWorkerSnapExecutor = _chunkZ5VEHM7Cjs.WebWorkerSnapExecutor;
26
+ exports.WebWorkerSnapExecutor = _chunkBLHIYDO5js.WebWorkerSnapExecutor;
27
27
  //# sourceMappingURL=WebWorkerSnapExecutor.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  WebWorkerSnapExecutor
3
- } from "../../chunk-4I4X5VQI.mjs";
4
- import "../../chunk-OWO7XS4C.mjs";
3
+ } from "../../chunk-BEJDC4XI.mjs";
4
+ import "../../chunk-M3OBSGHF.mjs";
5
5
  import "../../chunk-BVRVUIJB.mjs";
6
6
  import "../../chunk-ODICKSGZ.mjs";
7
7
  import "../../chunk-S5NWI5Z7.mjs";
@@ -15,8 +15,8 @@ import "../../chunk-Q42NNJFY.mjs";
15
15
  import "../../chunk-UOPIRTJX.mjs";
16
16
  import "../../chunk-HL2TTKF3.mjs";
17
17
  import "../../chunk-5DEV3QQU.mjs";
18
- import "../../chunk-CMYXMQUM.mjs";
19
- import "../../chunk-KJ2VDWNW.mjs";
18
+ import "../../chunk-MMYM63NH.mjs";
19
+ import "../../chunk-75RCH4ZX.mjs";
20
20
  import "../../chunk-ZNTCZK7J.mjs";
21
21
  import "../../chunk-IX5S3V47.mjs";
22
22
  import "../../chunk-BTEAZZKP.mjs";
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
 
3
- var _chunkZ5VEHM7Cjs = require('../../chunk-Z5VEHM7C.js');
3
+ var _chunkBLHIYDO5js = require('../../chunk-BLHIYDO5.js');
4
4
 
5
5
 
6
6
  var _chunk4XRZLEKUjs = require('../../chunk-4XRZLEKU.js');
7
7
 
8
8
 
9
9
  var _chunkOCNPLHS2js = require('../../chunk-OCNPLHS2.js');
10
- require('../../chunk-WHBMFB7M.js');
10
+ require('../../chunk-HCXTK3PR.js');
11
11
  require('../../chunk-DKDTGAFK.js');
12
12
  require('../../chunk-4COIRXF5.js');
13
13
  require('../../chunk-KEAB7ZVV.js');
@@ -21,8 +21,8 @@ require('../../chunk-HGLRZZ56.js');
21
21
  require('../../chunk-QZC2X6NG.js');
22
22
  require('../../chunk-46LW37FK.js');
23
23
  require('../../chunk-Z7BOREC4.js');
24
- require('../../chunk-4DBCLKW3.js');
25
- require('../../chunk-RE5NT2N5.js');
24
+ require('../../chunk-FUPEJT7B.js');
25
+ require('../../chunk-7MMUJJQ2.js');
26
26
  require('../../chunk-2VA6RAEE.js');
27
27
  require('../../chunk-DLLLH5HN.js');
28
28
  require('../../chunk-CV5LC4PP.js');
@@ -31,5 +31,5 @@ require('../../chunk-EXN2TFDJ.js');
31
31
  // src/webworker/executor/index.ts
32
32
  _chunkOCNPLHS2js.executeLockdownMore.call(void 0, );
33
33
  _chunk4XRZLEKUjs.executeLockdownEvents.call(void 0, );
34
- _chunkZ5VEHM7Cjs.WebWorkerSnapExecutor.initialize();
34
+ _chunkBLHIYDO5js.WebWorkerSnapExecutor.initialize();
35
35
  //# sourceMappingURL=index.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  WebWorkerSnapExecutor
3
- } from "../../chunk-4I4X5VQI.mjs";
3
+ } from "../../chunk-BEJDC4XI.mjs";
4
4
  import {
5
5
  executeLockdownEvents
6
6
  } from "../../chunk-S7257EN3.mjs";
7
7
  import {
8
8
  executeLockdownMore
9
9
  } from "../../chunk-MXNMMTJW.mjs";
10
- import "../../chunk-OWO7XS4C.mjs";
10
+ import "../../chunk-M3OBSGHF.mjs";
11
11
  import "../../chunk-BVRVUIJB.mjs";
12
12
  import "../../chunk-ODICKSGZ.mjs";
13
13
  import "../../chunk-S5NWI5Z7.mjs";
@@ -21,8 +21,8 @@ import "../../chunk-Q42NNJFY.mjs";
21
21
  import "../../chunk-UOPIRTJX.mjs";
22
22
  import "../../chunk-HL2TTKF3.mjs";
23
23
  import "../../chunk-5DEV3QQU.mjs";
24
- import "../../chunk-CMYXMQUM.mjs";
25
- import "../../chunk-KJ2VDWNW.mjs";
24
+ import "../../chunk-MMYM63NH.mjs";
25
+ import "../../chunk-75RCH4ZX.mjs";
26
26
  import "../../chunk-ZNTCZK7J.mjs";
27
27
  import "../../chunk-IX5S3V47.mjs";
28
28
  import "../../chunk-BTEAZZKP.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/snaps-execution-environments",
3
- "version": "6.5.0",
3
+ "version": "6.6.1",
4
4
  "description": "Snap sandbox environments for executing SES javascript",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,14 +54,14 @@
54
54
  "@metamask/json-rpc-engine": "^9.0.0",
55
55
  "@metamask/object-multiplex": "^2.0.0",
56
56
  "@metamask/post-message-stream": "^8.1.0",
57
- "@metamask/providers": "^17.0.0",
58
- "@metamask/rpc-errors": "^6.2.1",
59
- "@metamask/snaps-sdk": "^6.0.0",
60
- "@metamask/snaps-utils": "^7.7.0",
61
- "@metamask/utils": "^8.3.0",
57
+ "@metamask/providers": "17.0.0",
58
+ "@metamask/rpc-errors": "^6.3.1",
59
+ "@metamask/snaps-sdk": "^6.1.0",
60
+ "@metamask/snaps-utils": "^7.8.0",
61
+ "@metamask/superstruct": "^3.1.0",
62
+ "@metamask/utils": "^9.1.0",
62
63
  "nanoid": "^3.1.31",
63
- "readable-stream": "^3.6.2",
64
- "superstruct": "^1.0.3"
64
+ "readable-stream": "^3.6.2"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@babel/core": "^7.23.2",