We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dbc1ec commit b843d1dCopy full SHA for b843d1d
packages/snaps-simulation/src/simulation.ts
@@ -141,6 +141,14 @@ export type RestrictedMiddlewareHooks = {
141
* @returns The cryptographic functions to use for the client.
142
*/
143
getClientCryptography: () => CryptographicFunctions;
144
+
145
+ /**
146
+ * A hook that returns metadata about a given Snap.
147
+ *
148
+ * @param snapId - The ID of a Snap.
149
+ * @returns The metadata for the given Snap.
150
+ */
151
+ getSnap: (snapId: string) => Snap;
152
};
153
154
export type PermittedMiddlewareHooks = {
@@ -450,6 +458,7 @@ export function getRestrictedHooks(
450
458
),
451
459
getIsLocked: () => false,
452
460
getClientCryptography: () => ({}),
461
+ getSnap: getGetSnapImplementation(true),
453
462
454
463
}
455
464
0 commit comments