@metamask/eip-5792-middleware
Version:
Implements the JSON-RPC methods for sending multiple calls from the user's wallet, and checking their status, as referenced in EIP-5792
16 lines • 841 B
text/typescript
import type { JsonRpcRequest, PendingJsonRpcResponse } from "@metamask/utils";
import { type ProcessSendCallsHook } from "../types.cjs";
/**
* The RPC method handler middleware for `wallet_sendCalls`
*
* @param req - The JSON RPC request's end callback.
* @param res - The JSON RPC request's pending response object.
* @param hooks - The hooks object.
* @param hooks.getAccounts - Function that retrieves available accounts.
* @param hooks.processSendCalls - Function that processes a sendCalls request for EIP-5792 transactions.
*/
export declare function walletSendCalls(req: JsonRpcRequest, res: PendingJsonRpcResponse, { getAccounts, processSendCalls, }: {
getAccounts: (req: JsonRpcRequest) => Promise<string[]>;
processSendCalls?: ProcessSendCallsHook;
}): Promise<void>;
//# sourceMappingURL=wallet_sendCalls.d.cts.map