@metamask/snaps-simulation
Version:
A simulation framework for MetaMask Snaps, enabling headless testing of Snaps in a controlled environment
23 lines • 1.24 kB
text/typescript
import type { SimulationOptions } from "../options.mjs";
/**
* Create a Redux store.
*
* @param options - The simulation options.
* @param options.state - The initial state for the Snap.
* @param options.unencryptedState - The initial unencrypted state for the Snap.
* @returns A Redux store with the default state.
*/
export declare function createStore({ state, unencryptedState }: SimulationOptions): {
store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<{
mocks: import("./mocks.mjs").MocksState;
notifications: import("./notifications.mjs").NotificationsState;
state: import("./state.mjs").State;
trackables: import("./trackables.mjs").TrackablesState;
ui: import("./ui.mjs").UiState;
}, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("redux-saga").SagaMiddleware<object>]>>;
runSaga: <S extends import("redux-saga").Saga>(saga: S, ...args: Parameters<S>) => import("redux-saga").Task<any>;
};
export type Store = ReturnType<typeof createStore>['store'];
export type ApplicationState = ReturnType<Store['getState']>;
export type RunSagaFunction = ReturnType<typeof createStore>['runSaga'];
//# sourceMappingURL=store.d.mts.map