@metamask/snaps-rpc-methods 11.1.0 → 11.2.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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
@@ -6,12 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
7
 
7
8
  ## [Unreleased]
8
9
 
10
+ ## [11.2.0]
11
+
12
+ ### Added
13
+
14
+ - Add support for `metamask:` schemed URLs ([#2719](https://github.com/MetaMask/snaps/pull/2719))
15
+ - Add support for JSX in `snap_notify` notifications ([#2706](https://github.com/MetaMask/snaps/pull/2706))
16
+
17
+ ## [11.1.1]
18
+
19
+ ### Fixed
20
+
21
+ - Fix invalid types in type declaration in some cases ([#2714](https://github.com/MetaMask/snaps/pull/2714))
22
+
9
23
  ## [11.1.0]
24
+
10
25
  ### Changed
26
+
11
27
  - Improve error messaging ([#2696](https://github.com/MetaMask/snaps/pull/2696))
12
28
  - Increase character limit for in-app notification messages ([#2684](https://github.com/MetaMask/snaps/pull/2684))
13
29
 
14
30
  ### Fixed
31
+
15
32
  - Fix ESM version of the package ([#2682](https://github.com/MetaMask/snaps/pull/2682))
16
33
  - This fixes the ESM version of the package to be fully compliant with the ESM
17
34
  standard.
@@ -19,85 +36,118 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
36
  - Bump other MetaMask dependencies ([#2703](https://github.com/MetaMask/snaps/pull/2703))
20
37
 
21
38
  ## [11.0.0]
39
+
22
40
  ### Added
41
+
23
42
  - **BREAKING:** Add `snap_getPreferences` ([#2607](https://github.com/MetaMask/snaps/pull/2607))
24
43
  - This is breaking because a `getPreferences` method hook is now required.
25
44
 
26
45
  ## [10.0.1]
46
+
27
47
  ### Changed
48
+
28
49
  - Bump `@metamask/json-rpc-engine` from `^9.0.0` to `^9.0.2` ([#2593](https://github.com/metamask/snaps/pull/2593))
29
50
  - Bump `@metamask/permission-controller` from `^10.0.1` to `^11.0.0` ([#2593](https://github.com/metamask/snaps/pull/2593))
30
51
  - Bump `@metamask/snaps-utils` from `^7.8.0` to `^7.8.1` ([#2595](https://github.com/MetaMask/snaps/pull/2595))
31
52
 
32
53
  ## [10.0.0]
54
+
33
55
  ### Added
56
+
34
57
  - **BREAKING:** `snap_dialog` now takes the `requestUserApproval` hook ([#2509](https://github.com/metamask/snaps/pull/2509))
35
58
  - It should bind to the `addAndShowRequest` method of the `ApprovalController`.
36
59
  - Add type `DialogApprovalTypes` and object `DIALOG_APPROVAL_TYPES`.
37
60
 
38
61
  ### Changed
62
+
39
63
  - Bump `@metamask/key-tree` from `^9.1.1` to `^9.1.2` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
40
64
  - Bump `@metamask/permission-controller` from `^10.0.0` to `^10.0.1` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
41
65
  - Bump `@metamask/rpc-errors` from `^6.2.1` to `^6.3.1` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
42
66
  - Bump `@metamask/utils` from `^8.3.0` to `^9.1.0` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
43
67
 
44
68
  ### Fixed
69
+
45
70
  - Replace `superstruct` with ESM-compatible `@metamask/superstruct` `^3.1.0` ([#2445](https://github.com/MetaMask/snaps/pull/2445))
46
71
  - This fixes the issue of this package being unusable by any TypeScript project that uses `Node16` or `NodeNext` as its `moduleResolution` option.
47
72
 
48
73
  ## [9.1.4]
74
+
49
75
  ### Changed
76
+
50
77
  - Bump MetaMask dependencies ([#2516](https://github.com/MetaMask/snaps/pull/2516))
51
78
 
52
79
  ## [9.1.3]
80
+
53
81
  ### Changed
82
+
54
83
  - Bump MetaMask dependencies ([#2460](https://github.com/MetaMask/snaps/pull/2460))
55
84
 
56
85
  ## [9.1.2]
86
+
57
87
  ### Fixed
88
+
58
89
  - Fix invalid `@metamask/snaps-sdk` imports ([#2452](https://github.com/MetaMask/snaps/pull/2452))
59
90
 
60
91
  ## [9.1.1]
92
+
61
93
  ### Changed
94
+
62
95
  - Bump `@metamask/key-tree` from `9.1.0` to `9.1.1` ([#2431](https://github.com/MetaMask/snaps/pull/2431))
63
96
 
64
97
  ## [9.1.0]
98
+
65
99
  ### Added
100
+
66
101
  - Add `context` field to `snap_createInterface` ([#2413](https://github.com/MetaMask/snaps/pull/2413))
67
102
 
68
103
  ## [9.0.0]
104
+
69
105
  ### Added
106
+
70
107
  - Add support for BIP-32-Ed25519 / CIP-3 key derivation ([#2408](https://github.com/MetaMask/snaps/pull/2408))
71
108
  - The `ed25519Bip32` curve is now supported for `snap_getBip32Entropy` and `snap_getBip32PublicKey`
72
109
 
73
110
  ### Changed
111
+
74
112
  - **BREAKING:** Use hooks in `wallet_invokeSnap` instead of remapping the request to `wallet_snap` ([#2406](https://github.com/MetaMask/snaps/pull/2406))
75
113
 
76
114
  ## [8.1.0]
115
+
77
116
  ### Added
117
+
78
118
  - Add JSX support for custom UI ([#2258](https://github.com/MetaMask/snaps/pull/2258))
79
119
 
80
120
  ## [8.0.0]
121
+
81
122
  ### Changed
123
+
82
124
  - **BREAKING:** Refactor to support changes to encryption ([#2316](https://github.com/MetaMask/snaps/pull/2316))
83
125
  - No longer expects `encrypt` or `decrypt`, instead expects `updateSnapState` and `getSnapState` to be asynchronous
84
126
 
85
127
  ## [7.0.2]
128
+
86
129
  ### Changed
130
+
87
131
  - Bump MetaMask dependencies ([#2270](https://github.com/MetaMask/snaps/pull/2270))
88
132
  - Bump @metamask/json-rpc-engine from 7.3.2 to 7.3.3 ([#2247](https://github.com/MetaMask/snaps/pull/2247))
89
133
 
90
134
  ## [7.0.1]
135
+
91
136
  ### Fixed
137
+
92
138
  - Fix minor build configuration problems ([#2220](https://github.com/MetaMask/snaps/pull/2220))
93
139
 
94
140
  ## [7.0.0]
141
+
95
142
  ### Changed
143
+
96
144
  - **BREAKING:** Update ESM build to be fully compliant with the ESM standard ([#2210](https://github.com/MetaMask/snaps/pull/2210))
97
145
  - Bump `@metamask/rpc-errors` to `^6.2.1` ([#2209](https://github.com/MetaMask/snaps/pull/2209))
98
146
 
99
147
  ## [6.0.0]
148
+
100
149
  ### Added
150
+
101
151
  - **BREAKING:** Add support for dynamic user interfaces ([#1465](https://github.com/MetaMask/snaps/pull/1465), [#2144](https://github.com/MetaMask/snaps/pull/2144), [#2143](https://github.com/MetaMask/snaps/pull/2143))
102
152
  - This adds the `snap_createInterface`, `snap_updateInterface`, and `snap_getInterfaceState` methods.
103
153
  - This is breaking because it changes the expected type of the `showDialog` RPC method hook.
@@ -106,102 +156,144 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
106
156
  - Add endowment permission specifications to this package ([#2155](https://github.com/MetaMask/snaps/pull/2155))
107
157
 
108
158
  ### Changed
159
+
109
160
  - Bump MetaMask dependencies ([#2129](https://github.com/MetaMask/snaps/pull/2129), [#2142](https://github.com/MetaMask/snaps/pull/2142))
110
161
 
111
162
  ## [5.0.0]
163
+
112
164
  ### Added
165
+
113
166
  - Add `snap_getClientStatus` ([#2051](https://github.com/MetaMask/snaps/pull/2051))
114
167
 
115
168
  ### Changed
169
+
116
170
  - **BREAKING:** Use origin bound hooks for `invokeKeyring` ([#2090](https://github.com/MetaMask/snaps/pull/2090))
117
171
  - Bump several MetaMask dependencies ([#2069](https://github.com/MetaMask/snaps/pull/2069), [#2100](https://github.com/MetaMask/snaps/pull/2100))
118
172
 
119
173
  ## [4.1.0]
174
+
120
175
  ### Added
176
+
121
177
  - Add `wallet_getAllSnaps` method to get all installed Snaps ([#2047](https://github.com/MetaMask/snaps/pull/2047))
122
178
 
123
179
  ### Changed
180
+
124
181
  - Bump several MetaMask dependencies ([#2064](https://github.com/MetaMask/snaps/pull/2064), [#2065](https://github.com/MetaMask/snaps/pull/2065))
125
182
 
126
183
  ## [4.0.3]
184
+
127
185
  ### Changed
186
+
128
187
  - Use prototype `startsWith` for RPC method middleware ([#2035](https://github.com/MetaMask/snaps/pull/2035))
129
188
 
130
189
  ## [4.0.2]
190
+
131
191
  ### Changed
192
+
132
193
  - Bump several MetaMask dependencies ([#1989](https://github.com/MetaMask/snaps/pull/1989))
133
194
 
134
195
  ## [4.0.1]
196
+
135
197
  ### Changed
198
+
136
199
  - Bump several MetaMask dependencies ([#1964](https://github.com/MetaMask/snaps/pull/1964), [#1968](https://github.com/MetaMask/snaps/pull/1968))
137
200
 
138
201
  ## [4.0.0]
202
+
139
203
  ### Changed
204
+
140
205
  - Use `@metamask/snaps-sdk` package ([#1930](https://github.com/MetaMask/snaps/pull/1930),
141
206
  [#1950](https://github.com/MetaMask/snaps/pull/1950), [#1954](https://github.com/MetaMask/snaps/pull/1954))
142
207
  - This package replaces the `@metamask/snaps-types` and
143
208
  - `@metamask/snaps-ui` packages.
144
209
 
145
210
  ### Removed
211
+
146
212
  - **BREAKING**: Remove `DialogType`, `ManageStateOperation`, and `NotificationType` enums ([#1930](https://github.com/MetaMask/snaps/pull/1930))
147
213
  - These are now defined in the `@metamask/snaps-sdk` package.
148
214
 
149
215
  ## [3.3.0]
216
+
150
217
  ### Added
218
+
151
219
  - Add support for unencrypted storage using `snap_manageState` ([#1902](https://github.com/MetaMask/snaps/pull/1902))
152
220
 
153
221
  ## [3.2.1]
222
+
154
223
  ### Fixed
224
+
155
225
  - Fix `assertLinksAreSafe` import ([#1908](https://github.com/MetaMask/snaps/pull/1908))
156
226
 
157
227
  ## [3.2.0]
228
+
158
229
  ### Added
230
+
159
231
  - Add support for links in custom UI and notifications ([#1814](https://github.com/MetaMask/snaps/pull/1814))
160
232
 
161
233
  ## [3.1.0]
234
+
162
235
  ### Changed
236
+
163
237
  - Rename package to `@metamask/snaps-rpc-methods` ([#1864](https://github.com/MetaMask/snaps/pull/1864))
164
238
  - Update multiple MetaMask dependencies ([#1841](https://github.com/MetaMask/snaps/pull/1841))
165
239
 
166
240
  ## [3.0.0]
241
+
167
242
  ### Added
243
+
168
244
  - Add keyring export and endowment ([#1787](https://github.com/MetaMask/snaps/pull/1787))
169
245
 
170
246
  ### Changed
247
+
171
248
  - **BREAKING:** Bump minimum Node.js version to `^18.16.0` ([#1741](https://github.com/MetaMask/snaps/pull/1741))
172
249
 
173
250
  ## [2.0.0]
251
+
174
252
  ### Changed
253
+
175
254
  - Initial stable release from main branch ([#1757](https://github.com/MetaMask/snaps/pull/1757))
176
255
 
177
256
  ## [0.38.3-flask.1]
257
+
178
258
  ### Changed
259
+
179
260
  - Bump `metamask/utils` and `metamask/snaps-registry` ([#1738](https://github.com/MetaMask/snaps/pull/1738))
180
261
 
181
262
  ## [0.38.2-flask.1]
263
+
182
264
  ### Changed
265
+
183
266
  - Remove business-logic callbacks from `manageAccounts` ([#1725](https://github.com/MetaMask/snaps/pull/1725))
184
267
  - Bump `@metamask/utils` and `@metamask/snaps-registry` ([#1694](https://github.com/MetaMask/snaps/pull/1694))
185
268
 
186
269
  ## [0.38.1-flask.1]
270
+
187
271
  ### Fixed
272
+
188
273
  - Make `manageAccounts` arguments extend `RestrictedMethodParameters` ([#1687](https://github.com/MetaMask/snaps/pull/1687))
189
274
 
190
275
  ## [0.38.0-flask.1]
276
+
191
277
  ### Added
278
+
192
279
  - Add `snap_getLocale` JSON-RPC method ([#1557](https://github.com/MetaMask/snaps/pull/1557))
193
280
  - This will let snaps get the user locale from the client.
194
281
 
195
282
  ### Fixed
283
+
196
284
  - Fix ed25519 public key derivation ([#1678](https://github.com/MetaMask/snaps/pull/1678))
197
285
 
198
286
  ## [0.37.2-flask.1]
287
+
199
288
  ### Changed
289
+
200
290
  - Release package independently ([#1600](https://github.com/MetaMask/snaps/pull/1600))
201
291
  - The version of the package no longer needs to match the version of all other
202
292
  MetaMask Snaps packages.
203
293
 
204
- [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-rpc-methods@11.1.0...HEAD
294
+ [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-rpc-methods@11.2.0...HEAD
295
+ [11.2.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-rpc-methods@11.1.1...@metamask/snaps-rpc-methods@11.2.0
296
+ [11.1.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-rpc-methods@11.1.0...@metamask/snaps-rpc-methods@11.1.1
205
297
  [11.1.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-rpc-methods@11.0.0...@metamask/snaps-rpc-methods@11.1.0
206
298
  [11.0.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-rpc-methods@10.0.1...@metamask/snaps-rpc-methods@11.0.0
207
299
  [10.0.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-rpc-methods@10.0.0...@metamask/snaps-rpc-methods@10.0.1
@@ -3,47 +3,47 @@ import { HandlerType } from "@metamask/snaps-utils";
3
3
  import type { Json } from "@metamask/utils";
4
4
  export declare const endowmentPermissionBuilders: {
5
5
  readonly "endowment:network-access": Readonly<{
6
- readonly targetName: import("./enum").SnapEndowments.NetworkAccess;
6
+ readonly targetName: import("./enum.cjs").SnapEndowments.NetworkAccess;
7
7
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
8
8
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
9
- targetName: import("./enum").SnapEndowments.NetworkAccess;
9
+ targetName: import("./enum.cjs").SnapEndowments.NetworkAccess;
10
10
  endowmentGetter: (_options?: any) => ["fetch", "Request", "Headers", "Response"];
11
11
  allowedCaveats: null;
12
12
  }>;
13
13
  }>;
14
14
  readonly "endowment:transaction-insight": Readonly<{
15
- readonly targetName: import("./enum").SnapEndowments.TransactionInsight;
15
+ readonly targetName: import("./enum.cjs").SnapEndowments.TransactionInsight;
16
16
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
17
17
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
18
- targetName: import("./enum").SnapEndowments.TransactionInsight;
18
+ targetName: import("./enum.cjs").SnapEndowments.TransactionInsight;
19
19
  endowmentGetter: (_options?: import("@metamask/permission-controller").EndowmentGetterParams | undefined) => null;
20
20
  allowedCaveats: readonly [string, ...string[]] | null;
21
21
  validator: import("@metamask/permission-controller").PermissionValidatorConstraint;
22
22
  }>;
23
23
  }>;
24
24
  readonly "endowment:cronjob": Readonly<{
25
- readonly targetName: import("./enum").SnapEndowments.Cronjob;
25
+ readonly targetName: import("./enum.cjs").SnapEndowments.Cronjob;
26
26
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
27
27
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
28
- targetName: import("./enum").SnapEndowments.Cronjob;
28
+ targetName: import("./enum.cjs").SnapEndowments.Cronjob;
29
29
  endowmentGetter: (_options?: any) => null;
30
30
  allowedCaveats: readonly [string, ...string[]] | null;
31
31
  }>;
32
32
  }>;
33
33
  readonly "endowment:ethereum-provider": Readonly<{
34
- readonly targetName: import("./enum").SnapEndowments.EthereumProvider;
34
+ readonly targetName: import("./enum.cjs").SnapEndowments.EthereumProvider;
35
35
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
36
36
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
37
- targetName: import("./enum").SnapEndowments.EthereumProvider;
37
+ targetName: import("./enum.cjs").SnapEndowments.EthereumProvider;
38
38
  endowmentGetter: (_options?: any) => ["ethereum"];
39
39
  allowedCaveats: null;
40
40
  }>;
41
41
  }>;
42
42
  readonly "endowment:rpc": Readonly<{
43
- readonly targetName: import("./enum").SnapEndowments.Rpc;
43
+ readonly targetName: import("./enum.cjs").SnapEndowments.Rpc;
44
44
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, {}, {
45
45
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
46
- targetName: import("./enum").SnapEndowments.Rpc;
46
+ targetName: import("./enum.cjs").SnapEndowments.Rpc;
47
47
  endowmentGetter: (_options?: any) => null;
48
48
  allowedCaveats: readonly [string, ...string[]] | null;
49
49
  validator: import("@metamask/permission-controller").PermissionValidatorConstraint;
@@ -51,38 +51,38 @@ export declare const endowmentPermissionBuilders: {
51
51
  }>;
52
52
  }>;
53
53
  readonly "endowment:webassembly": Readonly<{
54
- readonly targetName: import("./enum").SnapEndowments.WebAssemblyAccess;
54
+ readonly targetName: import("./enum.cjs").SnapEndowments.WebAssemblyAccess;
55
55
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
56
56
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
57
- targetName: import("./enum").SnapEndowments.WebAssemblyAccess;
57
+ targetName: import("./enum.cjs").SnapEndowments.WebAssemblyAccess;
58
58
  endowmentGetter: (_options?: any) => ["WebAssembly"];
59
59
  allowedCaveats: null;
60
60
  }>;
61
61
  }>;
62
62
  readonly "endowment:name-lookup": Readonly<{
63
- readonly targetName: import("./enum").SnapEndowments.NameLookup;
63
+ readonly targetName: import("./enum.cjs").SnapEndowments.NameLookup;
64
64
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
65
65
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
66
- targetName: import("./enum").SnapEndowments.NameLookup;
66
+ targetName: import("./enum.cjs").SnapEndowments.NameLookup;
67
67
  endowmentGetter: (_options?: import("@metamask/permission-controller").EndowmentGetterParams | undefined) => null;
68
68
  allowedCaveats: readonly [string, ...string[]] | null;
69
69
  validator: import("@metamask/permission-controller").PermissionValidatorConstraint;
70
70
  }>;
71
71
  }>;
72
72
  readonly "endowment:lifecycle-hooks": Readonly<{
73
- readonly targetName: import("./enum").SnapEndowments.LifecycleHooks;
73
+ readonly targetName: import("./enum.cjs").SnapEndowments.LifecycleHooks;
74
74
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
75
75
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
76
- targetName: import("./enum").SnapEndowments.LifecycleHooks;
76
+ targetName: import("./enum.cjs").SnapEndowments.LifecycleHooks;
77
77
  endowmentGetter: (_options?: import("@metamask/permission-controller").EndowmentGetterParams | undefined) => null;
78
78
  allowedCaveats: readonly [string, ...string[]] | null;
79
79
  }>;
80
80
  }>;
81
81
  readonly "endowment:keyring": Readonly<{
82
- readonly targetName: import("./enum").SnapEndowments.Keyring;
82
+ readonly targetName: import("./enum.cjs").SnapEndowments.Keyring;
83
83
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
84
84
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
85
- targetName: import("./enum").SnapEndowments.Keyring;
85
+ targetName: import("./enum.cjs").SnapEndowments.Keyring;
86
86
  endowmentGetter: (_options?: import("@metamask/permission-controller").EndowmentGetterParams | undefined) => null;
87
87
  allowedCaveats: readonly [string, ...string[]] | null;
88
88
  validator: import("@metamask/permission-controller").PermissionValidatorConstraint;
@@ -90,19 +90,19 @@ export declare const endowmentPermissionBuilders: {
90
90
  }>;
91
91
  }>;
92
92
  readonly "endowment:page-home": Readonly<{
93
- readonly targetName: import("./enum").SnapEndowments.HomePage;
93
+ readonly targetName: import("./enum.cjs").SnapEndowments.HomePage;
94
94
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
95
95
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
96
- targetName: import("./enum").SnapEndowments.HomePage;
96
+ targetName: import("./enum.cjs").SnapEndowments.HomePage;
97
97
  endowmentGetter: (_options?: import("@metamask/permission-controller").EndowmentGetterParams | undefined) => null;
98
98
  allowedCaveats: readonly [string, ...string[]] | null;
99
99
  }>;
100
100
  }>;
101
101
  readonly "endowment:signature-insight": Readonly<{
102
- readonly targetName: import("./enum").SnapEndowments.SignatureInsight;
102
+ readonly targetName: import("./enum.cjs").SnapEndowments.SignatureInsight;
103
103
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
104
104
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
105
- targetName: import("./enum").SnapEndowments.SignatureInsight;
105
+ targetName: import("./enum.cjs").SnapEndowments.SignatureInsight;
106
106
  endowmentGetter: (_options?: import("@metamask/permission-controller").EndowmentGetterParams | undefined) => null;
107
107
  allowedCaveats: readonly [string, ...string[]] | null;
108
108
  validator: import("@metamask/permission-controller").PermissionValidatorConstraint;
@@ -3,47 +3,47 @@ import { HandlerType } from "@metamask/snaps-utils";
3
3
  import type { Json } from "@metamask/utils";
4
4
  export declare const endowmentPermissionBuilders: {
5
5
  readonly "endowment:network-access": Readonly<{
6
- readonly targetName: import("./enum").SnapEndowments.NetworkAccess;
6
+ readonly targetName: import("./enum.mjs").SnapEndowments.NetworkAccess;
7
7
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
8
8
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
9
- targetName: import("./enum").SnapEndowments.NetworkAccess;
9
+ targetName: import("./enum.mjs").SnapEndowments.NetworkAccess;
10
10
  endowmentGetter: (_options?: any) => ["fetch", "Request", "Headers", "Response"];
11
11
  allowedCaveats: null;
12
12
  }>;
13
13
  }>;
14
14
  readonly "endowment:transaction-insight": Readonly<{
15
- readonly targetName: import("./enum").SnapEndowments.TransactionInsight;
15
+ readonly targetName: import("./enum.mjs").SnapEndowments.TransactionInsight;
16
16
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
17
17
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
18
- targetName: import("./enum").SnapEndowments.TransactionInsight;
18
+ targetName: import("./enum.mjs").SnapEndowments.TransactionInsight;
19
19
  endowmentGetter: (_options?: import("@metamask/permission-controller").EndowmentGetterParams | undefined) => null;
20
20
  allowedCaveats: readonly [string, ...string[]] | null;
21
21
  validator: import("@metamask/permission-controller").PermissionValidatorConstraint;
22
22
  }>;
23
23
  }>;
24
24
  readonly "endowment:cronjob": Readonly<{
25
- readonly targetName: import("./enum").SnapEndowments.Cronjob;
25
+ readonly targetName: import("./enum.mjs").SnapEndowments.Cronjob;
26
26
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
27
27
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
28
- targetName: import("./enum").SnapEndowments.Cronjob;
28
+ targetName: import("./enum.mjs").SnapEndowments.Cronjob;
29
29
  endowmentGetter: (_options?: any) => null;
30
30
  allowedCaveats: readonly [string, ...string[]] | null;
31
31
  }>;
32
32
  }>;
33
33
  readonly "endowment:ethereum-provider": Readonly<{
34
- readonly targetName: import("./enum").SnapEndowments.EthereumProvider;
34
+ readonly targetName: import("./enum.mjs").SnapEndowments.EthereumProvider;
35
35
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
36
36
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
37
- targetName: import("./enum").SnapEndowments.EthereumProvider;
37
+ targetName: import("./enum.mjs").SnapEndowments.EthereumProvider;
38
38
  endowmentGetter: (_options?: any) => ["ethereum"];
39
39
  allowedCaveats: null;
40
40
  }>;
41
41
  }>;
42
42
  readonly "endowment:rpc": Readonly<{
43
- readonly targetName: import("./enum").SnapEndowments.Rpc;
43
+ readonly targetName: import("./enum.mjs").SnapEndowments.Rpc;
44
44
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, {}, {
45
45
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
46
- targetName: import("./enum").SnapEndowments.Rpc;
46
+ targetName: import("./enum.mjs").SnapEndowments.Rpc;
47
47
  endowmentGetter: (_options?: any) => null;
48
48
  allowedCaveats: readonly [string, ...string[]] | null;
49
49
  validator: import("@metamask/permission-controller").PermissionValidatorConstraint;
@@ -51,38 +51,38 @@ export declare const endowmentPermissionBuilders: {
51
51
  }>;
52
52
  }>;
53
53
  readonly "endowment:webassembly": Readonly<{
54
- readonly targetName: import("./enum").SnapEndowments.WebAssemblyAccess;
54
+ readonly targetName: import("./enum.mjs").SnapEndowments.WebAssemblyAccess;
55
55
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
56
56
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
57
- targetName: import("./enum").SnapEndowments.WebAssemblyAccess;
57
+ targetName: import("./enum.mjs").SnapEndowments.WebAssemblyAccess;
58
58
  endowmentGetter: (_options?: any) => ["WebAssembly"];
59
59
  allowedCaveats: null;
60
60
  }>;
61
61
  }>;
62
62
  readonly "endowment:name-lookup": Readonly<{
63
- readonly targetName: import("./enum").SnapEndowments.NameLookup;
63
+ readonly targetName: import("./enum.mjs").SnapEndowments.NameLookup;
64
64
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
65
65
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
66
- targetName: import("./enum").SnapEndowments.NameLookup;
66
+ targetName: import("./enum.mjs").SnapEndowments.NameLookup;
67
67
  endowmentGetter: (_options?: import("@metamask/permission-controller").EndowmentGetterParams | undefined) => null;
68
68
  allowedCaveats: readonly [string, ...string[]] | null;
69
69
  validator: import("@metamask/permission-controller").PermissionValidatorConstraint;
70
70
  }>;
71
71
  }>;
72
72
  readonly "endowment:lifecycle-hooks": Readonly<{
73
- readonly targetName: import("./enum").SnapEndowments.LifecycleHooks;
73
+ readonly targetName: import("./enum.mjs").SnapEndowments.LifecycleHooks;
74
74
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
75
75
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
76
- targetName: import("./enum").SnapEndowments.LifecycleHooks;
76
+ targetName: import("./enum.mjs").SnapEndowments.LifecycleHooks;
77
77
  endowmentGetter: (_options?: import("@metamask/permission-controller").EndowmentGetterParams | undefined) => null;
78
78
  allowedCaveats: readonly [string, ...string[]] | null;
79
79
  }>;
80
80
  }>;
81
81
  readonly "endowment:keyring": Readonly<{
82
- readonly targetName: import("./enum").SnapEndowments.Keyring;
82
+ readonly targetName: import("./enum.mjs").SnapEndowments.Keyring;
83
83
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
84
84
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
85
- targetName: import("./enum").SnapEndowments.Keyring;
85
+ targetName: import("./enum.mjs").SnapEndowments.Keyring;
86
86
  endowmentGetter: (_options?: import("@metamask/permission-controller").EndowmentGetterParams | undefined) => null;
87
87
  allowedCaveats: readonly [string, ...string[]] | null;
88
88
  validator: import("@metamask/permission-controller").PermissionValidatorConstraint;
@@ -90,19 +90,19 @@ export declare const endowmentPermissionBuilders: {
90
90
  }>;
91
91
  }>;
92
92
  readonly "endowment:page-home": Readonly<{
93
- readonly targetName: import("./enum").SnapEndowments.HomePage;
93
+ readonly targetName: import("./enum.mjs").SnapEndowments.HomePage;
94
94
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
95
95
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
96
- targetName: import("./enum").SnapEndowments.HomePage;
96
+ targetName: import("./enum.mjs").SnapEndowments.HomePage;
97
97
  endowmentGetter: (_options?: import("@metamask/permission-controller").EndowmentGetterParams | undefined) => null;
98
98
  allowedCaveats: readonly [string, ...string[]] | null;
99
99
  }>;
100
100
  }>;
101
101
  readonly "endowment:signature-insight": Readonly<{
102
- readonly targetName: import("./enum").SnapEndowments.SignatureInsight;
102
+ readonly targetName: import("./enum.mjs").SnapEndowments.SignatureInsight;
103
103
  readonly specificationBuilder: import("@metamask/permission-controller").PermissionSpecificationBuilder<import("@metamask/permission-controller").PermissionType.Endowment, any, {
104
104
  permissionType: import("@metamask/permission-controller").PermissionType.Endowment;
105
- targetName: import("./enum").SnapEndowments.SignatureInsight;
105
+ targetName: import("./enum.mjs").SnapEndowments.SignatureInsight;
106
106
  endowmentGetter: (_options?: import("@metamask/permission-controller").EndowmentGetterParams | undefined) => null;
107
107
  allowedCaveats: readonly [string, ...string[]] | null;
108
108
  validator: import("@metamask/permission-controller").PermissionValidatorConstraint;
@@ -44,7 +44,13 @@ declare const CreateInterfaceParametersStruct: import("@metamask/superstruct").S
44
44
  type: import("@metamask/snaps-sdk").NodeType.Address;
45
45
  value: `0x${string}`;
46
46
  };
47
- label: string;
47
+ label: string; /**
48
+ * Validate the createInterface method `params` and returns them cast to the correct
49
+ * type. Throws if validation fails.
50
+ *
51
+ * @param params - The unvalidated params object from the method request.
52
+ * @returns The validated createInterface method parameter object.
53
+ */
48
54
  variant?: "default" | "warning" | "critical" | undefined;
49
55
  } | {
50
56
  type: import("@metamask/snaps-sdk").NodeType.Input;
@@ -127,7 +133,13 @@ declare const CreateInterfaceParametersStruct: import("@metamask/superstruct").S
127
133
  type: import("@metamask/snaps-sdk").NodeType.Address;
128
134
  value: `0x${string}`;
129
135
  };
130
- label: string;
136
+ label: string; /**
137
+ * Validate the createInterface method `params` and returns them cast to the correct
138
+ * type. Throws if validation fails.
139
+ *
140
+ * @param params - The unvalidated params object from the method request.
141
+ * @returns The validated createInterface method parameter object.
142
+ */
131
143
  variant?: "default" | "warning" | "critical" | undefined;
132
144
  } | {
133
145
  type: import("@metamask/snaps-sdk").NodeType.Input;
@@ -1 +1 @@
1
- {"version":3,"file":"createInterface.d.cts","sourceRoot":"","sources":["../../src/permitted/createInterface.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,wCAAwC;AAE9E,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EAErB,kBAAkB,EAClB,gBAAgB,EACjB,4BAA4B;AAK7B,OAAO,EAAE,KAAK,aAAa,EAAE,8BAA8B;AAU3D,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,eAAe,EAAE,CACf,EAAE,EAAE,kBAAkB,EACtB,OAAO,CAAC,EAAE,gBAAgB,KACvB,OAAO,CAAC,MAAM,CAAC,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,sBAAsB,CACzD,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,CAKtB,CAAC;AAEF,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGnC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,aAAa,CACnD,OAAO,+BAA+B,EACtC,qBAAqB,CACtB,CAAC"}
1
+ {"version":3,"file":"createInterface.d.cts","sourceRoot":"","sources":["../../src/permitted/createInterface.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,wCAAwC;AAE9E,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EAErB,kBAAkB,EAClB,gBAAgB,EACjB,4BAA4B;AAK7B,OAAO,EAAE,KAAK,aAAa,EAAE,8BAA8B;AAU3D,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,eAAe,EAAE,CACf,EAAE,EAAE,kBAAkB,EACtB,OAAO,CAAC,EAAE,gBAAgB,KACvB,OAAO,CAAC,MAAM,CAAC,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,sBAAsB,CACzD,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,CAKtB,CAAC;AAEF,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA4CrC;;;;;;WAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBANH;;;;;;WAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA/CD,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,aAAa,CACnD,OAAO,+BAA+B,EACtC,qBAAqB,CACtB,CAAC"}
@@ -44,7 +44,13 @@ declare const CreateInterfaceParametersStruct: import("@metamask/superstruct").S
44
44
  type: import("@metamask/snaps-sdk").NodeType.Address;
45
45
  value: `0x${string}`;
46
46
  };
47
- label: string;
47
+ label: string; /**
48
+ * Validate the createInterface method `params` and returns them cast to the correct
49
+ * type. Throws if validation fails.
50
+ *
51
+ * @param params - The unvalidated params object from the method request.
52
+ * @returns The validated createInterface method parameter object.
53
+ */
48
54
  variant?: "default" | "warning" | "critical" | undefined;
49
55
  } | {
50
56
  type: import("@metamask/snaps-sdk").NodeType.Input;
@@ -127,7 +133,13 @@ declare const CreateInterfaceParametersStruct: import("@metamask/superstruct").S
127
133
  type: import("@metamask/snaps-sdk").NodeType.Address;
128
134
  value: `0x${string}`;
129
135
  };
130
- label: string;
136
+ label: string; /**
137
+ * Validate the createInterface method `params` and returns them cast to the correct
138
+ * type. Throws if validation fails.
139
+ *
140
+ * @param params - The unvalidated params object from the method request.
141
+ * @returns The validated createInterface method parameter object.
142
+ */
131
143
  variant?: "default" | "warning" | "critical" | undefined;
132
144
  } | {
133
145
  type: import("@metamask/snaps-sdk").NodeType.Input;
@@ -1 +1 @@
1
- {"version":3,"file":"createInterface.d.mts","sourceRoot":"","sources":["../../src/permitted/createInterface.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,wCAAwC;AAE9E,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EAErB,kBAAkB,EAClB,gBAAgB,EACjB,4BAA4B;AAK7B,OAAO,EAAE,KAAK,aAAa,EAAE,8BAA8B;AAU3D,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,eAAe,EAAE,CACf,EAAE,EAAE,kBAAkB,EACtB,OAAO,CAAC,EAAE,gBAAgB,KACvB,OAAO,CAAC,MAAM,CAAC,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,sBAAsB,CACzD,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,CAKtB,CAAC;AAEF,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGnC,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,aAAa,CACnD,OAAO,+BAA+B,EACtC,qBAAqB,CACtB,CAAC"}
1
+ {"version":3,"file":"createInterface.d.mts","sourceRoot":"","sources":["../../src/permitted/createInterface.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,wCAAwC;AAE9E,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EAErB,kBAAkB,EAClB,gBAAgB,EACjB,4BAA4B;AAK7B,OAAO,EAAE,KAAK,aAAa,EAAE,8BAA8B;AAU3D,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,eAAe,EAAE,CACf,EAAE,EAAE,kBAAkB,EACtB,OAAO,CAAC,EAAE,gBAAgB,KACvB,OAAO,CAAC,MAAM,CAAC,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,sBAAsB,CACzD,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,CAKtB,CAAC;AAEF,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA4CrC;;;;;;WAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBANH;;;;;;WAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA/CD,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,aAAa,CACnD,OAAO,+BAA+B,EACtC,qBAAqB,CACtB,CAAC"}