import type { CryptographicFunctions } from "@metamask/key-tree"; import type { GenericPermissionController, PermissionSpecificationConstraint, PermissionSpecificationMap } from "@metamask/permission-controller"; import type { SnapId } from "@metamask/snaps-sdk"; import type { RootControllerMessenger } from "../controllers.cjs"; import type { SimulationOptions } from "../options.cjs"; export type PermissionSpecificationsHooks = { /** * Get the cryptographic functions to use for the client. This may return an * empty object to fall back to the default cryptographic functions. * * @returns The cryptographic functions to use for the client. */ getClientCryptography: () => CryptographicFunctions; }; export type GetPermissionSpecificationsOptions = { controllerMessenger: RootControllerMessenger; hooks: PermissionSpecificationsHooks; options: SimulationOptions; }; /** * Get a function which resolves with the specified result. * * @param result - The result to return. * @returns The function implementation. */ export declare function resolve(result: unknown): () => unknown; /** * Get a function which resolves with the specified result. * * @param result - The result to return. If not specified, the function will * resolve with `undefined`. * @returns The function implementation. */ export declare function asyncResolve(result?: Type): () => Promise; /** * Get the permission specifications for the Snap. * * @param options - The options. * @param options.controllerMessenger - The controller messenger. * @param options.hooks - The hooks. * @param options.options - The simulation options. * @returns The permission specifications for the Snap. */ export declare function getPermissionSpecifications({ controllerMessenger, hooks, options, }: GetPermissionSpecificationsOptions): PermissionSpecificationMap; /** * Get the endowments for the Snap. * * @param permissionController - The permission controller. * @param snapId - The ID of the Snap. * @returns The endowments for the Snap. */ export declare function getEndowments(permissionController: GenericPermissionController, snapId: SnapId): Promise; //# sourceMappingURL=specifications.d.cts.map