Skip to main content
Particle’s AA SDK brings ERC-4337 to web apps: construct and send UserOperations, sponsor gas (gasless), pay in ERC-20 via token paymasters.
This guide assumes you already have an EIP-1193 provider (e.g., window.ethereum from a wallet extension, WalletConnect, or a custom provider).Check the Quickstart page for a step-by-step guide to integrate the AA SDK with Particle Authkit.

General integration steps

The following steps outline the general process for integrating the AA SDK into your web application:
1

Acquire a provider

Connect to a user’s existing wallet through window.ethereum, WalletConnect, or another compatible provider.
2

Create a Smart Account

Initialize a Smart Account and configure your desired contract options.
3

Configure gas payment options

Wrap your Smart Account with a provider adapter and choose how transaction gas will be paid - gasless (sponsored), user-paid with native tokens.
4

Use with your favorite web3 library

The wrapper automatically converts regular transactions into UserOperations, allowing you to use familiar libraries like ethers.js or viem with Account Abstraction.
The Particle AA SDK is open source, available at Particle-Network/aa-sdk.

Prerequisites

To integrate the Particle AA SDK into your web application, you’ll need to:
  1. Install the SDK packages in your project
  2. Configure your project credentials from the Particle Dashboard

Installation

Install the SDK in your project:

Project setup

The AA SDK requires Particle project credentials from the Particle Dashboard. To retrieve those values for configuration within your application, follow these steps:
Sign up or Log in into the Particle dashboard
Login into Particle.
Create Particle project.
Create web app.
Find app's credentials.

Particle Paymaster

Particle Network includes a Verifying Omnichain Paymaster to sponsor gas fees:
  • Testnet use: gasless transactions are automatically sponsored (no setup, no deposits).
  • Mainnet use: deposit USDT on Ethereum or BNB in the dashboard. The deposit is auto-converted into the native token of whichever chain your users transact on.
If you prefer to use Biconomy’s Verifying Paymaster instead, create one on the Biconomy dashboard and set its paymasterApiKeys in your aaOptions.
  • For ERC-20 gas payments (Token Paymaster), you can rely on Biconomy’s Token Paymaster. Simply pass the feeQuote you receive from getFeeQuotes, and the SDK will handle the ERC-20 settlement.

Initialization

The first step is to initialize the Smart Account instance. You can do this by creating a new instance of the SmartAccount class and passing in the provider and configuration options.
Find an updated list of smart account available and their chain compatibility in Network Coverage.

Using an EIP-1193 provider

You can easily use any EIP-1193 provider with the smart account by wrapping it with AAWrapProvider and choosing how gas is paid. Gas modes
  • SendTransactionMode.Gasless: sponsored when eligible
  • SendTransactionMode.UserPaidNative: user pays native gas

ethers.js example

The following example shows how to use the smart account with ethers.js.
ethers.js
You can find a more complete example in this demo repository.

Direct AA usage (no wrapper)

If you want to manage UserOps yourself, you have various options using the smart account instance directly.

Smart account info

Fetch the smart account address, owner, and account info.

Quote fees (single tx or batch)

Fetch the fee quotes for a single transaction or batch of transactions.
ts

Build & send UserOperation

Build and send a UserOperation for a single transaction or batch of transactions. Here’s a complete example of sending a gasless transfer transaction using the SDK to build a userOp:
SDK example
You can find a more complete example in this demo repository.

Deployment control

Check if the smart account is deployed and deploy it if not.

Use the AA SDK in a backend environment (server-owned EOA)

You can use the SDK in a backend environment to send transactions on behalf of the smart account. The following example shows how to use the SDK with viem to create a wallet client from a private key, expose it as an EIP-1193 provider to the AA SDK, then route writes through the AA wrapper.
When using the SDK in a node environment, you need to import the package as follows:
Node Imports
Node Example
You can find a complete implementation in this demo repository using the AA SDK to interacti with Circle Gateway.

Master reference

The following table is a method-level reference for the SmartAccount class. Use it when you need exact signatures or want to explore functionality beyond the common flows shown earlier (initialization, fee quotes, sending transactions). Most methods follow the same input/output patterns as the examples above, so you can usually adapt them directly into your own code.