Beta — This package, along with @alchemy/common, replaces @account-kit/infra. This is a low-level package. Most users should use @alchemy/wallet-apis unless you need to call bundler or paymaster RPCs directly via viem.
Alchemy Account Abstraction infrastructure utilities. Provides Rundler-specific fee estimation and RPC types for use with viem's bundler client.
npm install @alchemy/aa-infra @alchemy/common viemestimateFeesPerGas- Custom fee estimation using Alchemy'srundler_maxPriorityFeePerGasRPC method. Pass this asuserOperation.estimateFeesPerGaswhen creating a viemBundlerClientpointed at Alchemy's Rundler.RundlerClient/RundlerRpcSchema- TypeScript types extending viem'sBundlerClientwith Rundler-specific RPC methods
import { estimateFeesPerGas } from "@alchemy/aa-infra";
import { createBundlerClient } from "viem/account-abstraction";
import { sepolia } from "viem/chains";
import { alchemyTransport } from "@alchemy/common";
const bundlerClient = createBundlerClient({
chain: sepolia,
transport: alchemyTransport({ apiKey: "YOUR_API_KEY" }),
userOperation: {
estimateFeesPerGas,
},
});MIT
| Type Alias | Description |
|---|---|
| RundlerClient | - |
| RundlerRpcSchema | - |
| Function | Description |
|---|---|
| estimateFeesPerGas | A custom estimateFeesPerGas function for viem bundler clients to use rundler_getUserOperationGasPrice for fee estimation. |