Skip to content

getUserOperationReceipt

calls eth_getUserOperationReceipt and returns UserOperationReceipt if found otherwise null

Usage

ts
import { client } from "./client";

const receipt = await client.getUserOperationReceipt("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<UserOperationReceipt | null>

The User Operation Receipt if found, otherwise null

Parameters

hash: Hash

The hash of the User Operation to fetch