Required SDK version: ^v4.59.1
The @account-kit/infra library enables direct interaction with Alchemy's ERC-4337 bundler for advanced UserOperation management. The alchemyFeeEstimator function leverages underlying APIs, including rundler_maxPriorityFeePerGas and eth_estimateUserOperation, to estimate gas fees for UserOperations. Below are examples demonstrating how to estimate and send a UserOperation and how to retrieve a UserOperation by its hash using low-level Bundler APIs.
import { alchemy, sepolia } from "@account-kit/infra";
const YOUR_API_KEY = "<YOUR_API_KEY>";
export const YOUR_PRIVATE_KEY = "<YOUR_PRIVATE_KEY>";
export const chain = sepolia;
export const transport = alchemy({
apiKey: YOUR_API_KEY,
});Make sure that you environment is set with your correct ALCHEMY_API_KEY and
PRIVATE_KEY. These examples assume familiarity with ERC-4337 and proper
configuration of the EntryPoint contract (entryPoint07Address).