Low-level Infrastructure Overview

Lower Level Infra Overview

Smart Wallets is composed of some lower-level libraries if you’re looking for further customization of your stack or want more control over how you build your application and use third party providers. One of these libraries is @account-kit/infra which allows you to interact with our infrastructure directly, while bringing your own smart contracts or signer.

If you do not need customization, we highly recommend that you use our Wallet APIs to simplify development.

What is the Bundler API?

The Bundler APIs are a collection of ERC-4337 compliant JSON-RPC endpoints which makes it possible for users to work with user operations. Below are the Bundler API endpoints available and the corresponding docs for each of them.

MethodDescription
eth_sendUserOperationSubmits a user operation to a Bundler. If the request is successful, the endpoint will return a user operation hash that the caller can use to look up the status of the user operation. If it fails, or another error occurs, an error code and description will be returned.
eth_estimateUserOperationGasEstimates the gas values for a user operation. It returns the [preVerificationGas], [verificationGasLimit], and [callGasLimit] values associated with the provided user operation.
eth_getUserOperationByHashReturns a user operation based on the given user operation hash. It returns the user operation along with extra information including what block/transaction it was included in. If the operation has not yet been included, it will return [null].
eth_getUserOperationReceiptReturns a user operation receipt ( metadata associated with the given user operation ) based on the given user operation hash. It returns [null] if the user operation has not yet been included.
rundler_maxPriorityFeePerGasReturns a fee per gas that is an estimate of how much users should set as a priority fee in UOs for Rundler endpoints.
eth_supportedEntryPointsReturns a list of Entrypoint contract addresses supported by the bundler endpoints.

What are Gas Manager Admin APIs?

The Gas Manager Admin APIs allow you to programmatically manage gas sponsorship policies. Developers can define and manage policies governing gas sponsorship behavior—such as spending limits and eligibility. Below are the Gas Manager Admin API endpoints available and the corresponding docs for each of them.

MethodDescription
create-policyCreates a new gas manager policy with the specified rules.
get-policyReturns a policy by id.
replace-policyReplaces all rules in an existing policy by id.
delete-policyDeletes a policy by id.
get-all-policiesReturns all policies. The results are paginated.
update-policy-statusModifies the status of a policy to either “active” or “inactive”.
get-policy-statsReturns stats about a policy specified by ID.
get-sponsorshipsReturns a list of sponsorships associated with the specified policy ID. The results are paginated.

What are Gas Coverage API Endpoints?

The Gas Coverage API is a set of methods that allow you to sponsor gas for your users’ transactions, abstracting away the concept of “gas” from them. Below are the Gas Manager Admin API endpoints available and the corresponding docs for each of them.

MethodDescription
alchemy_requestGasAndPaymasterAndData[Start here / Recommended] Requests gas sponsorship and gas estimates for a UserOperation on EVM networks. If approved, returns: 1. paymaster and paymasterData 2. gas and fee estimates.
alchemy_requestPaymasterAndData[To be deprecated] Requests gas sponsorship for a UserOperation on EVM networks. If approved, returnspaymaster and paymasterData.
pm_getPaymasterStubDataReturns stub values to be used in paymaster-related fields of an unsigned user operation for gas estimation on EVM networks.
pm_getPaymasterDataReturns values to be used in paymaster-related fields of a signed user operation on EVM networks. These are not stub values and will be included in a signed user operation as part of an eth_sendUserOperation call.
alchemy_requestFeePayerRequest gas sponsorship for a transaction on Solana. Returns the serializedTransaction, including the feePayer signature.
alchemy_requestPaymasterTokenQuoteRequests ERC20 fee quote for a UserOperation. Optionally accepts fee parameter overrides to be used in the UserOperation