function alchemyGasManagerMiddleware(
policyId,
policyToken?,
webhookData?,
): Required<
Pick<ClientMiddlewareConfig, "dummyPaymasterAndData" | "paymasterAndData">
>;Defined in: account-kit/infra/src/middleware/gasManager.ts:92
Paymaster middleware factory that uses Alchemy's Gas Manager for sponsoring transactions. Adheres to the ERC-7677 standardized communication protocol.
import { sepolia, alchemyGasManagerMiddleware } from "@account-kit/infra";
import { http } from "viem";
const client = createSmartAccountClient({
transport: http("rpc-url"),
chain: sepolia,
...alchemyGasManagerMiddleware("policyId"),
});| Parameter | Type | Description |
|---|---|---|
|
| The policyId (or list of policyIds) for Alchemy's gas manager |
| The policy token configuration | |
|
| The webhook data to include in the request |
Required<Pick<ClientMiddlewareConfig, "dummyPaymasterAndData" | "paymasterAndData">>
Partial client middleware configuration containing dummyPaymasterAndData and paymasterAndData