account-kit/infra

Enumerations

EnumerationDescription
SimulateAssetType-
SimulateChangeType-

Interfaces

Type Aliases

Variables

VariableDescription
alchemyActionsProvides a set of actions for interacting with the Alchemy Smart Account client, including the ability to simulate user operations.
AlchemyChainSchema-
alchemyFeeEstimatorFunction 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-
arbitrumGoerli-
arbitrumNova-
arbitrumSepolia-
base-
baseGoerli-
baseSepolia-
beraChainBartio-
bobaMainnet-
bobaSepolia-
celoAlfajores-
celoMainnet-
fraxtal-
fraxtalSepolia-
gensynTestnet-
goerli-
inkMainnet-
inkSepolia-
mainnet-
mekong-
monadTestnet-
opbnbMainnet-
opbnbTestnet-
openlootSepolia-
optimism-
optimismGoerli-
optimismSepolia-
polygon-
polygonAmoy-
polygonMumbai-
riseTestnet-
sepolia-
shape-
shapeSepolia-
simulateUserOperationChangesSimulates user operation changes including asset changes for a specified user operation and returns the resulting state changes.
soneiumMainnet-
soneiumMinato-
storyAeneid-
storyMainnet-
teaSepolia-
unichainMainnet-
unichainSepolia-
worldChain-
worldChainSepolia-
zora-
zoraSepolia-

Functions

FunctionDescription
alchemyCreates 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.
alchemyGasAndPaymasterAndDataMiddlewarePaymaster 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.
alchemyGasManagerMiddlewarePaymaster middleware factory that uses Alchemy’s Gas Manager for sponsoring transactions. Adheres to the ERC-7677 standardized communication protocol.
alchemyUserOperationSimulatorA middleware function to be used during simulation of user operations which leverages Alchemy’s RPC uo simulation method.
convertHeadersToObject-
createAlchemyPublicRpcClientCreates 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.
createAlchemySmartAccountClientCreates an Alchemy smart account client using the provided configuration options, including account details, gas manager configuration, and custom middleware.
defineAlchemyChainDefines an Alchemy chain configuration by adding an Alchemy-specific RPC base URL to the chain’s RPC URLs.
getAlchemyPaymasterAddressRetrieves the Alchemy paymaster address for the given chain. Returns different addresses based on the chain ID.
getDefaultUserOperationFeeOptionsRetrieves the default user operation fee options for a given chain. Adjusts fees for specific chains like Arbitrum and Optimism.
getSignerTypeHeader-
headersUpdateUpdate the headers with the trace header and breadcrumb.
isAlchemySmartAccountClientChecks 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.
isAlchemyTransportA 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. *
mutateRemoveTrackingHeadersRemove 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.