smartWallet
Creates a ERC4337 smart wallet based on a admin account.
Smart wallets are smart contract wallets that enable multiple benefits for users:
Sponsor gas fees for transactions
Multiple owners
Session keys
Batch transactions
Predictable addresses
Programmable features
Learn more about account abstraction
Connect to a smart wallet
To connect to a smart wallet, you need to provide an admin account as the personalAccount
option.
Any wallet can be used as an admin account, including an in-app wallets.
The sponsorGas
option is used to enable sponsored gas for transactions automatically.
Configuring the smart wallet
You can pass options to the smartWallet
function to configure the smart wallet.
Refer to SmartWalletOptions for more details.