@metamask/snaps-simulation
Version:
A simulation framework for MetaMask Snaps, enabling headless testing of Snaps in a controlled environment
24 lines • 1.2 kB
text/typescript
import type { Json } from "@metamask/utils";
import type { RunSagaFunction } from "../../../store/index.mjs";
/**
* Get the implementation of the `getSnapState` hook.
*
* @param runSaga - The function to run a saga outside the usual Redux flow.
* @returns The implementation of the `getSnapState` hook.
*/
export declare function getPermittedGetSnapStateMethodImplementation(runSaga: RunSagaFunction): (encrypted: boolean) => Promise<any>;
/**
* Get the implementation of the `updateSnapState` hook.
*
* @param runSaga - The function to run a saga outside the usual Redux flow.
* @returns The implementation of the `updateSnapState` hook.
*/
export declare function getPermittedUpdateSnapStateMethodImplementation(runSaga: RunSagaFunction): (newState: Record<string, Json>, encrypted: boolean) => Promise<any>;
/**
* Get the implementation of the `clearSnapState` hook.
*
* @param runSaga - The function to run a saga outside the usual Redux flow.
* @returns The implementation of the `clearSnapState` hook.
*/
export declare function getPermittedClearSnapStateMethodImplementation(runSaga: RunSagaFunction): (encrypted: boolean) => Promise<void>;
//# sourceMappingURL=state.d.mts.map