Introducing AA SDK v3.0

Introducing AA SDK v3.0

Published on February 21, 20243 min read

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.

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.

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.

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.

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.

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.

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:

  • SmartAccountProvider is now SmartAccountClient to extend viem’s Client

  • The with* middleware override functions moved to the SmartAccountClient creator

  • Almost all methods on the SmartAccountClient now have an optional param for account and have been converted into single argument functions that take an object with their properties.

  • Replaced BaseSmartContractAccount with SmartContractAccount type which is extended from viem's Account

  • 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 with SmartAccountClient

  • index is now called salt for SimpleAccount and LightAccount initialization params

  • chain and transport have been added to the constructor and rpcClient has been removed from SimpleAccount and NaniAccount initialization params

The signTypedData method found on SmartAccountSigner has been updated to match the signature found on SmartContractAccount and viem's Account.

  • Removed the with* and connect methods

  • Renamed getPublicErc4337Client to getBundlerClient

  • AccountSigner now takes in a SmartContractAccount 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.

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:

Section background image

Build blockchain magic

Alchemy combines the most powerful web3 developer products and tools with resources, community and legendary support.

Get your API key