@metamask/snaps-rpc-methods
Version:
MetaMask Snaps JSON-RPC method implementations
25 lines • 1.06 kB
text/typescript
import type { PermittedHandlerExport } from "@metamask/permission-controller";
import type { EntropySource, ListEntropySourcesParams, ListEntropySourcesResult } from "@metamask/snaps-sdk";
export type ListEntropySourcesHooks = {
/**
* Check if the requesting origin has a given permission.
*
* @param permissionName - The name of the permission to check.
* @returns Whether the origin has the permission.
*/
hasPermission: (permissionName: string) => boolean;
/**
* Get the entropy sources from the client.
*
* @returns The entropy sources.
*/
getEntropySources: () => EntropySource[];
/**
* Wait for the extension to be unlocked.
*
* @returns A promise that resolves once the extension is unlocked.
*/
getUnlockPromise: (shouldShowUnlockRequest: boolean) => Promise<void>;
};
export declare const listEntropySourcesHandler: PermittedHandlerExport<ListEntropySourcesHooks, ListEntropySourcesParams, ListEntropySourcesResult>;
//# sourceMappingURL=listEntropySources.d.mts.map