@alchemy/aa-infra
v5.1.1
Published
Alchemy Account Abstraction Infrastructure
Readme
@alchemy/aa-infra
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.
Installation
npm install @alchemy/aa-infra @alchemy/common viemKey Exports
estimateFeesPerGas- 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
Usage
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,
},
});License
MIT
