Introducing AA SDK v3.0
Authors: Michael Moldoveanu, Dennis Won, Ajay Vasisht, Rohan Thomare
The Account Abstraction SDK v3.0 is the most feature-complete developer kit for builders creating applications and wallets compatible with ERC-4337 and ERC-6900 on Ethereum and Layer 2 blockchains like Arbitrum, Optimism, Polygon, and Base.
The AA-SDK v3.0 introduces a number of key developer quality of life improvements:
Full support for Modular Account
Multi-owner and Session Key plugins
Extending the viem client mechanism
This article will cover the key changes in the AA SDK as well as breaking changes for developers. If you want to get started, visit the AA-SDK on Github and explore the quickstart guide on the Account Kit docs.
AA SDK v3.0 Improvements
Account Abstraction aims to make web3 easier and safer for the next generation of web3 users by adding support for email and passkey-based account creation, as well as more robust security and permission models to increase user safety.
After months of community-led development of the ERC-6900 standard, and the launch of Modular Account, the AA-SDK v3.0 unites everything in a single library to make building apps and wallets compatible with ERC-4337 and ERC-6900 as simple as possible.
1. Full Support for Alchemy's Modular Account
Alchemy’s Modular Account is an enterprise-grade, twice-audited implementation of the ERC-6900 modular account standard and is fully supported in the AA-SDK v3.0 release.
Developers can deploy a Modular Account, integrate custom signers like Magic and Turnkey, create and install ERC-6900 plugins, and easily upgrade to a Modular Account from their current account implementation (e.g. Light Account, Kernel, etc.).
Reports for Alchemy's Modular Account security audits from Spearbit and Quantsamp can be found in the Modular Account repo on Github.
Is Modular Account compatible with older versions of the AA-SDK?
No, modular account code that is in previous versions of the AA-SDK are not meant for public use. There's no documentation, and all of it references old deployments. The purpose of this original code was to have something testable during the alpha phase.
If you want to use modular accounts, you should migrate to version 3.0 of the AA-SDK to get all of the latest deployment addresses, documentation, and a more ergonomic development experience for working with modular accounts and plugins.
2. Modular Account Plugin Support
One primary benefit of modular smart contract accounts and the ERC-6900 standards is the ability for developers to create and install plugins that add customizable wallet functionality using any compliant modular account implementation.
The AA-SDK v3.0 provides two plugins for immediate use — a Multi-owner plugin for having one or more ECDSA or SCA owners on your account, and a Session Key plugin for adding additional signers to your account with specific permissions — as well as easy methods for creating and installing/uninstalling ERC-6900 plugins.
3. Extending the Viem Client Mechanism
We updated our dependency to viem v2.x.x, which means you will need to update your project to use >= v2.5.0 of viem. We also extended viem so the AA-SDK can be more ergonomic.
The most significant change between this version and the old version is that providers
are now called clients
. This is to match viem's terminology. Before we were wrapping viem
in our provider
class, and now we just extended viem's underlying Client
mechanism.
That is now used in conjunction with SmartContractAccount
which extends viem's Account
concept. In viem
, clients are connected to accounts, either by passing them explicitly, or exposing them on different methods. This all works with the viem ecosystem one-to-one.
Breaking Changes
While the surface area for v3.0 is large, the number of breaking changes for developers using older versions of the SDK are relatively small. Here is a quick list of the breaking changes across the client, account, signer, and Ethers surface areas:
Client Changes
SmartAccountProvider
is nowSmartAccountClient
to extendviem
’sClient
The
with*
middleware override functions moved to theSmartAccountClient
creatorAlmost all methods on the
SmartAccountClient
now have an optional param foraccount
and have been converted into single argument functions that take an object with their properties.
Account Changes
Replaced
BaseSmartContractAccount
withSmartContractAccount
type which is extended fromviem
'sAccount
You can now keep providers and smart accounts disconnected and pass the account to the client methods directly or hoist the account so you don't have to pass the account to every method.
You can use
toSmartContractAccount
to use any account withSmartAccountClient
index
is now calledsalt
for SimpleAccount and LightAccount initialization paramschain
andtransport
have been added to the constructor andrpcClient
has been removed from SimpleAccount and NaniAccount initialization params
Signer Changes
The signTypedData
method found on SmartAccountSigner
has been updated to match the signature found on SmartContractAccount
and viem's Account
.
Ethers Changes
Removed the
with*
andconnect
methodsRenamed
getPublicErc4337Client
togetBundlerClient
AccountSigner
now takes in aSmartContractAccount
as a param in its constructor
For more details on each of these breaking changes and how to implement fixes, read the AA-SDK v3.0 migration guide on the Account Kids documentation.
How to Contribute
We would love to hear feedback from the developer community about ways we can improve the AA-SDK’s utilities for interacting with modular accounts, support more enhanced features, and ideas for making ERC-6900 plugin development easier.
To provide feedback, please contact us here:
Modular Accounts Telegram: https://t.me/modular_account_standards
ERC-4337 Mafia Telegram: https://t.me/+64-YF36JRHkyNzUx
Alchemy Discord: https://discord.com/invite/alchemyplatform
Github Issues: https://github.com/alchemyplatform/aa-sdk/issues
Bug Bounty Program: https://hackerone.com/alchemyplatform
For customers: VIP Slack and Telegram groups
Related articles
Node API is now 50% cheaper
Key Node API methods are now 50% cheaper with some builders even seeing up to 98% savings.
Up to 40% Cheaper Data APIs
As part of our mission to bring 1 billion users onchain, we're reducing Compute Unit costs for our NFT API, Token API and Transfers API starting today.
Introducing Geist: the Members-Only Blockchain
Geist Mainnet, the first members-only blockchain built for gaming, is finally here!