# account-kit/infra

> Overview of account-kit/infra

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

> **Note:** This package is being replaced by [`@alchemy/common`](https://www.npmjs.com/package/@alchemy/common) and [`@alchemy/aa-infra`](https://www.npmjs.com/package/@alchemy/aa-infra), which are currently in beta. Start new integrations with those packages instead.

Infrastructure utilities including transport, gas manager middleware, and fee estimation.

## Getting started

```bash
npm i @account-kit/infra
```

## Enumerations

| Enumeration                                                                                | Description |
| :----------------------------------------------------------------------------------------- | :---------- |
| [SimulateAssetType](/wallets/reference/account-kit/infra/enumerations/SimulateAssetType)   | -           |
| [SimulateChangeType](/wallets/reference/account-kit/infra/enumerations/SimulateChangeType) | -           |

## Interfaces

| Interface                                                                                              | Description |
| :----------------------------------------------------------------------------------------------------- | :---------- |
| [SimulateAssetChange](/wallets/reference/account-kit/infra/interfaces/SimulateAssetChange)             | -           |
| [SimulateAssetChangesError](/wallets/reference/account-kit/infra/interfaces/SimulateAssetChangesError) | -           |

## Type Aliases

| Type Alias                                                                                                                               | Description |
| :--------------------------------------------------------------------------------------------------------------------------------------- | :---------- |
| [AlchemyChainConfig](/wallets/reference/account-kit/infra/type-aliases/AlchemyChainConfig)                                               | -           |
| [AlchemyRpcSchema](/wallets/reference/account-kit/infra/type-aliases/AlchemyRpcSchema)                                                   | -           |
| [AlchemySmartAccountClient](/wallets/reference/account-kit/infra/type-aliases/AlchemySmartAccountClient)                                 | -           |
| [AlchemySmartAccountClient_Base](/wallets/reference/account-kit/infra/type-aliases/AlchemySmartAccountClient_Base)                       | -           |
| [AlchemySmartAccountClientActions](/wallets/reference/account-kit/infra/type-aliases/AlchemySmartAccountClientActions)                   | -           |
| [AlchemySmartAccountClientConfig](/wallets/reference/account-kit/infra/type-aliases/AlchemySmartAccountClientConfig)                     | -           |
| [AlchemyTransport](/wallets/reference/account-kit/infra/type-aliases/AlchemyTransport)                                                   | -           |
| [AlchemyTransportConfig](/wallets/reference/account-kit/infra/type-aliases/AlchemyTransportConfig)                                       | -           |
| [BaseAlchemyActions](/wallets/reference/account-kit/infra/type-aliases/BaseAlchemyActions)                                               | -           |
| [ClientWithAlchemyMethods](/wallets/reference/account-kit/infra/type-aliases/ClientWithAlchemyMethods)                                   | -           |
| [PaymasterContext](/wallets/reference/account-kit/infra/type-aliases/PaymasterContext)                                                   | -           |
| [PolicyToken](/wallets/reference/account-kit/infra/type-aliases/PolicyToken)                                                             | -           |
| [RequestGasAndPaymasterAndDataRequest](/wallets/reference/account-kit/infra/type-aliases/RequestGasAndPaymasterAndDataRequest)           | -           |
| [RequestGasAndPaymasterAndDataResponse](/wallets/reference/account-kit/infra/type-aliases/RequestGasAndPaymasterAndDataResponse)         | -           |
| [RequestPaymasterTokenQuoteRequest](/wallets/reference/account-kit/infra/type-aliases/RequestPaymasterTokenQuoteRequest)                 | -           |
| [RequestPaymasterTokenQuoteResponse](/wallets/reference/account-kit/infra/type-aliases/RequestPaymasterTokenQuoteResponse)               | -           |
| [SimulateUserOperationAssetChangesRequest](/wallets/reference/account-kit/infra/type-aliases/SimulateUserOperationAssetChangesRequest)   | -           |
| [SimulateUserOperationAssetChangesResponse](/wallets/reference/account-kit/infra/type-aliases/SimulateUserOperationAssetChangesResponse) | -           |

## Variables

| Variable                                                                                                    | Description                                                                                                                                                                                                    |
| :---------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [alchemyActions](/wallets/reference/account-kit/infra/variables/alchemyActions)                             | Provides a set of actions for interacting with the Alchemy Smart Account client, including the ability to simulate user operations.                                                                            |
| [AlchemyChainSchema](/wallets/reference/account-kit/infra/variables/AlchemyChainSchema)                     | -                                                                                                                                                                                                              |
| [alchemyFeeEstimator](/wallets/reference/account-kit/infra/variables/alchemyFeeEstimator)                   | Function that estimates the transaction fees using Alchemy methods for a given client. It fetches the latest block and estimates the max priority fee per gas, applying any overrides or fee options provided. |
| [arbitrum](/wallets/reference/account-kit/infra/variables/arbitrum)                                         | -                                                                                                                                                                                                              |
| [arbitrumGoerli](/wallets/reference/account-kit/infra/variables/arbitrumGoerli)                             | -                                                                                                                                                                                                              |
| [arbitrumSepolia](/wallets/reference/account-kit/infra/variables/arbitrumSepolia)                           | -                                                                                                                                                                                                              |
| [base](/wallets/reference/account-kit/infra/variables/base)                                                 | -                                                                                                                                                                                                              |
| [baseGoerli](/wallets/reference/account-kit/infra/variables/baseGoerli)                                     | -                                                                                                                                                                                                              |
| [baseSepolia](/wallets/reference/account-kit/infra/variables/baseSepolia)                                   | -                                                                                                                                                                                                              |
| [beraChainBartio](/wallets/reference/account-kit/infra/variables/beraChainBartio)                           | -                                                                                                                                                                                                              |
| [bobaMainnet](/wallets/reference/account-kit/infra/variables/bobaMainnet)                                   | -                                                                                                                                                                                                              |
| [bobaSepolia](/wallets/reference/account-kit/infra/variables/bobaSepolia)                                   | -                                                                                                                                                                                                              |
| [bsc](/wallets/reference/account-kit/infra/variables/bsc)                                                   | -                                                                                                                                                                                                              |
| [bscTestnet](/wallets/reference/account-kit/infra/variables/bscTestnet)                                     | -                                                                                                                                                                                                              |
| [celoMainnet](/wallets/reference/account-kit/infra/variables/celoMainnet)                                   | -                                                                                                                                                                                                              |
| [celoSepolia](/wallets/reference/account-kit/infra/variables/celoSepolia)                                   | -                                                                                                                                                                                                              |
| [cronos](/wallets/reference/account-kit/infra/variables/cronos)                                             | -                                                                                                                                                                                                              |
| [cronosTestnet](/wallets/reference/account-kit/infra/variables/cronosTestnet)                               | -                                                                                                                                                                                                              |
| [edgeMainnet](/wallets/reference/account-kit/infra/variables/edgeMainnet)                                   | -                                                                                                                                                                                                              |
| [fraxtal](/wallets/reference/account-kit/infra/variables/fraxtal)                                           | -                                                                                                                                                                                                              |
| [fraxtalSepolia](/wallets/reference/account-kit/infra/variables/fraxtalSepolia)                             | -                                                                                                                                                                                                              |
| [gensynTestnet](/wallets/reference/account-kit/infra/variables/gensynTestnet)                               | -                                                                                                                                                                                                              |
| [goerli](/wallets/reference/account-kit/infra/variables/goerli)                                             | -                                                                                                                                                                                                              |
| [hyperliquid](/wallets/reference/account-kit/infra/variables/hyperliquid)                                   | -                                                                                                                                                                                                              |
| [hyperliquidEvmTestnet](/wallets/reference/account-kit/infra/variables/hyperliquidEvmTestnet)               | -                                                                                                                                                                                                              |
| [inkMainnet](/wallets/reference/account-kit/infra/variables/inkMainnet)                                     | -                                                                                                                                                                                                              |
| [inkSepolia](/wallets/reference/account-kit/infra/variables/inkSepolia)                                     | -                                                                                                                                                                                                              |
| [mainnet](/wallets/reference/account-kit/infra/variables/mainnet)                                           | -                                                                                                                                                                                                              |
| [mekong](/wallets/reference/account-kit/infra/variables/mekong)                                             | -                                                                                                                                                                                                              |
| [monadMainnet](/wallets/reference/account-kit/infra/variables/monadMainnet)                                 | -                                                                                                                                                                                                              |
| [monadTestnet](/wallets/reference/account-kit/infra/variables/monadTestnet)                                 | -                                                                                                                                                                                                              |
| [mythosMainnet](/wallets/reference/account-kit/infra/variables/mythosMainnet)                               | -                                                                                                                                                                                                              |
| [opbnbMainnet](/wallets/reference/account-kit/infra/variables/opbnbMainnet)                                 | -                                                                                                                                                                                                              |
| [opbnbTestnet](/wallets/reference/account-kit/infra/variables/opbnbTestnet)                                 | -                                                                                                                                                                                                              |
| [openlootSepolia](/wallets/reference/account-kit/infra/variables/openlootSepolia)                           | -                                                                                                                                                                                                              |
| [optimism](/wallets/reference/account-kit/infra/variables/optimism)                                         | -                                                                                                                                                                                                              |
| [optimismGoerli](/wallets/reference/account-kit/infra/variables/optimismGoerli)                             | -                                                                                                                                                                                                              |
| [optimismSepolia](/wallets/reference/account-kit/infra/variables/optimismSepolia)                           | -                                                                                                                                                                                                              |
| [polygon](/wallets/reference/account-kit/infra/variables/polygon)                                           | -                                                                                                                                                                                                              |
| [polygonAmoy](/wallets/reference/account-kit/infra/variables/polygonAmoy)                                   | -                                                                                                                                                                                                              |
| [polygonMumbai](/wallets/reference/account-kit/infra/variables/polygonMumbai)                               | -                                                                                                                                                                                                              |
| [riseTestnet](/wallets/reference/account-kit/infra/variables/riseTestnet)                                   | -                                                                                                                                                                                                              |
| [sepolia](/wallets/reference/account-kit/infra/variables/sepolia)                                           | -                                                                                                                                                                                                              |
| [shape](/wallets/reference/account-kit/infra/variables/shape)                                               | -                                                                                                                                                                                                              |
| [shapeSepolia](/wallets/reference/account-kit/infra/variables/shapeSepolia)                                 | -                                                                                                                                                                                                              |
| [simulateUserOperationChanges](/wallets/reference/account-kit/infra/variables/simulateUserOperationChanges) | Simulates user operation changes including asset changes for a specified user operation and returns the resulting state changes.                                                                               |
| [soneiumMainnet](/wallets/reference/account-kit/infra/variables/soneiumMainnet)                             | -                                                                                                                                                                                                              |
| [soneiumMinato](/wallets/reference/account-kit/infra/variables/soneiumMinato)                               | -                                                                                                                                                                                                              |
| [stableMainnet](/wallets/reference/account-kit/infra/variables/stableMainnet)                               | -                                                                                                                                                                                                              |
| [storyAeneid](/wallets/reference/account-kit/infra/variables/storyAeneid)                                   | -                                                                                                                                                                                                              |
| [storyMainnet](/wallets/reference/account-kit/infra/variables/storyMainnet)                                 | -                                                                                                                                                                                                              |
| [teaSepolia](/wallets/reference/account-kit/infra/variables/teaSepolia)                                     | -                                                                                                                                                                                                              |
| [unichainMainnet](/wallets/reference/account-kit/infra/variables/unichainMainnet)                           | -                                                                                                                                                                                                              |
| [unichainSepolia](/wallets/reference/account-kit/infra/variables/unichainSepolia)                           | -                                                                                                                                                                                                              |
| [worldChain](/wallets/reference/account-kit/infra/variables/worldChain)                                     | -                                                                                                                                                                                                              |
| [worldChainSepolia](/wallets/reference/account-kit/infra/variables/worldChainSepolia)                       | -                                                                                                                                                                                                              |
| [worldl3devnet](/wallets/reference/account-kit/infra/variables/worldl3devnet)                               | -                                                                                                                                                                                                              |
| [zora](/wallets/reference/account-kit/infra/variables/zora)                                                 | -                                                                                                                                                                                                              |
| [zoraSepolia](/wallets/reference/account-kit/infra/variables/zoraSepolia)                                   | -                                                                                                                                                                                                              |

## Functions

| Function                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                             |
| :-------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [alchemy](/wallets/reference/account-kit/infra/functions/alchemy)                                                                 | Creates an Alchemy transport with the specified configuration options. When sending all traffic to Alchemy, you must pass in one of rpcUrl, apiKey, or jwt. If you want to send Bundler and Paymaster traffic to Alchemy and Node traffic to a different RPC, you must pass in alchemyConnection and nodeRpcUrl.                                                        |
| [alchemyGasAndPaymasterAndDataMiddleware](/wallets/reference/account-kit/infra/functions/alchemyGasAndPaymasterAndDataMiddleware) | Paymaster middleware factory that uses Alchemy's Gas Manager for sponsoring transactions. Uses Alchemy's custom `alchemy_requestGasAndPaymasterAndData` method instead of conforming to the standard ERC-7677 interface. Note that if you use `createAlchemySmartAccountClient`, this middleware is already used by default and you do not need to manually include it. |
| [alchemyGasManagerMiddleware](/wallets/reference/account-kit/infra/functions/alchemyGasManagerMiddleware)                         | Paymaster middleware factory that uses Alchemy's Gas Manager for sponsoring transactions. Adheres to the ERC-7677 standardized communication protocol.                                                                                                                                                                                                                  |
| [alchemyUserOperationSimulator](/wallets/reference/account-kit/infra/functions/alchemyUserOperationSimulator)                     | A middleware function to be used during simulation of user operations which leverages Alchemy's RPC uo simulation method.                                                                                                                                                                                                                                               |
| [convertHeadersToObject](/wallets/reference/account-kit/infra/functions/convertHeadersToObject)                                   | -                                                                                                                                                                                                                                                                                                                                                                       |
| [createAlchemyPublicRpcClient](/wallets/reference/account-kit/infra/functions/createAlchemyPublicRpcClient)                       | Creates an Alchemy public RPC client with the provided chain, connection configuration, and optional fetch options. The client has alchemy methods and can dynamically update HTTP headers.                                                                                                                                                                             |
| [createAlchemySmartAccountClient](/wallets/reference/account-kit/infra/functions/createAlchemySmartAccountClient)                 | Creates an Alchemy smart account client using the provided configuration options, including account details, gas manager configuration, and custom middleware.                                                                                                                                                                                                          |
| [defineAlchemyChain](/wallets/reference/account-kit/infra/functions/defineAlchemyChain)                                           | Defines an Alchemy chain configuration by adding an Alchemy-specific RPC base URL to the chain's RPC URLs.                                                                                                                                                                                                                                                              |
| [getAlchemyPaymasterAddress](/wallets/reference/account-kit/infra/functions/getAlchemyPaymasterAddress)                           | Retrieves the Alchemy paymaster address for the given chain. Returns different addresses based on the chain ID.                                                                                                                                                                                                                                                         |
| [getDefaultUserOperationFeeOptions](/wallets/reference/account-kit/infra/functions/getDefaultUserOperationFeeOptions)             | Retrieves the default user operation fee options for a given chain. Adjusts fees for specific chains like Arbitrum and Optimism.                                                                                                                                                                                                                                        |
| [getSignerTypeHeader](/wallets/reference/account-kit/infra/functions/getSignerTypeHeader)                                         | -                                                                                                                                                                                                                                                                                                                                                                       |
| [headersUpdate](/wallets/reference/account-kit/infra/functions/headersUpdate)                                                     | Update the headers with the trace header and breadcrumb.                                                                                                                                                                                                                                                                                                                |
| [isAlchemySmartAccountClient](/wallets/reference/account-kit/infra/functions/isAlchemySmartAccountClient)                         | Checks if a given client is an Alchemy Smart Account Client. The goal of this check is to ensure that the client supports certain RPC methods.                                                                                                                                                                                                                          |
| [isAlchemyTransport](/wallets/reference/account-kit/infra/functions/isAlchemyTransport)                                           | A type guard for the transport to determine if it is an Alchemy transport. Used in cases where we would like to do switching depending on the transport, where there used to be two clients for an alchemy and a non-alchemy, and with this switch we don't need the two seperate clients. \*                                                                           |
| [mutateRemoveTrackingHeaders](/wallets/reference/account-kit/infra/functions/mutateRemoveTrackingHeaders)                         | Remove the tracking headers. This is used in our split transport to ensure that we remove the headers that are not used by the other systems.                                                                                                                                                                                                                           |