UNPKG

@metamask/snaps-simulation

Version:

A simulation framework for MetaMask Snaps, enabling headless testing of Snaps in a controlled environment

20 lines 1.06 kB
import type { JsonRpcEngineEndCallback, JsonRpcEngineNextCallback } from "@metamask/json-rpc-engine"; import type { JsonRpcRequest, PendingJsonRpcResponse } from "@metamask/utils"; export type GetAccountsHandlerHooks = { getMnemonic: () => Promise<Uint8Array>; }; /** * A mock handler for account related methods that always returns the first * address for the selected secret recovery phrase. * * @param _request - Incoming JSON-RPC request. This is ignored for this * specific handler. * @param response - The outgoing JSON-RPC response, modified to return the * result. * @param _next - The `json-rpc-engine` middleware next handler. * @param end - The `json-rpc-engine` middleware end handler. * @param hooks - Any hooks required by this handler. * @returns The JSON-RPC response. */ export declare function getAccountsHandler(_request: JsonRpcRequest, response: PendingJsonRpcResponse, _next: JsonRpcEngineNextCallback, end: JsonRpcEngineEndCallback, hooks: GetAccountsHandlerHooks): Promise<void>; //# sourceMappingURL=accounts.d.mts.map