3rd Party Paymasters
The SmartAccountClient
within @aa-sdk/core
is unopinionated about which paymaster you use, so you can connect to any paymaster really simply. Configuration is done using the paymasterAndData
config option when you call createSmartAccountClient
.
Usage
ERC-7677 Paymaster
If your paymaster supports the ERC-7677 standard, you can use the erc7677Middleware
to interact with it.
Usage with single RPC provider
If you’re using the same RPC provider for your Paymaster, Bundler, and Node RPC traffic, then you can do the following:
Usage with multiple RPC providers
If you’re using a separate RPC provider for your Paymaster, you can can use the split
transport to route your ERC-7677 traffic to a different provider:
ERC-20 Gas Sponsorship
We are working on building support for an ERC-20 paymaster!
In the meantime, you could use a third-party paymaster, such as Stackup, to sponsor ERC-20 gas. Here’s an example using Stackup with the Alchemy SDK: