@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 • 869 B
text/typescript
import type { JsonRpcRequest, PendingJsonRpcResponse } from "@metamask/utils";
import { type GetCapabilitiesHook } from "../types.mjs";
/**
* The RPC method handler middleware for `wallet_getCapabilities`
*
* @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.getCapabilities - Function that retrieves the capabilities for atomic transactions on specified chains.
*/
export declare function walletGetCapabilities(req: JsonRpcRequest, res: PendingJsonRpcResponse, { getAccounts, getCapabilities, }: {
getAccounts: (req: JsonRpcRequest) => Promise<string[]>;
getCapabilities?: GetCapabilitiesHook;
}): Promise<void>;
//# sourceMappingURL=wallet_getCapabilities.d.mts.map