getUserOperationByHash
calls eth_getUserOperationByHash
and returns the UserOperationResponse
if found
Usage
ts
import { client } from "./client";
const uo = await client.getUserOperationByHash("0xUserOperationHash");
ts
import { createBundlerClient, mainnet } from "@alchemy/aa-core";
import { http } from "viem";
export const client = createBundlerClient({
chain: mainnet,
transport: http("https://eth-mainnet.g.alchemy.com/v2/demo"),
});
Returns
Promise<UserOperationResponse | null>
The User Operation if found, otherwise null
Parameters
hash: Hash
The hash of the User Operation to fetch