Implementing Particle’s Modular AA Stack within Web Applications
Although Wallet-as-a-Service extends the flexibility of EOAs, Particle Network recently decided to focus on account abstraction as the primary means of interaction within applications, facilitated by Wallet-as-a-Service. Thus, Particle has recently released its modular AA stack, a collection of technologies and SDKs natively compatible with Wallet-as-a-Service. This release happened alongside any other wallet that exposes an EIP-1193 provider, or any application leveraged account abstraction through alternative means. Specifically, this stack includes:- The Particle Bundler: Particle Network’s in-house, open-source Bundler, responsible for almost 1 million UserOperations.
- Particle’s Omnichain Paymaster: Facilitates multi-chain USDT-based gas sponsorships from a single deposit.
- Particle’s AA SDKs: These streamline the implementation of AA natively with Particle’s Wallet-as-a-Service.
Installing and configuring the AA SDK
Particle currently categorizes its various AA SDKs by platform. Thus, for desktop, everything is unified into a single SDK,@particle-network/aa
.
The AA SDK is open-source on Particle Network’s GitHub.
BICONOMY
), CyberConnect (CYBERCONNECT
), or SimpleAccount (SIMPLE
) instance. In this same configuration, you’ll be able to define the usage of either Particle Network’s native Paymaster (will be active if paymasterApiKeys
is left blank), or Biconomy’s paymaster (only active if paymasterApiKeys
is defined). An example of this configuration is below:
TypeScript
smartAccount
object, or through a traditional Web3 library such as ethers or Web3.js; the latter is done through the construction of an 1193 provider object, AAWrapProvider
.
TypeScript
Master reference
For a complete reference of each method available onsmartAccount
, see the table below, or for more usage information, take a look at the AA Web SDK rundown at AA Web SDK.
Class | Methods | Parameters (* indicates optional) |
---|---|---|
SmartAccount | constructor | provider, config |
SmartAccount | setSmartAccountContract | contract |
SmartAccount | getChainId | |
SmartAccount | getAccountConfig | |
SmartAccount | getPaymasterApiKey | |
SmartAccount | getFeeQuotes | tx |
SmartAccount | buildUserOperation | tx, feeQuote, tokenPaymasterAddress |
SmartAccount | signUserOperation | userOpHash, userOp |
SmartAccount | sendUserOperation | userOpHash, userOp |
SmartAccount | sendSignedUserOperation | userOp, sessionDataParams* |
SmartAccount | sendTransaction | tx, feeQuote, tokenPaymasterAddress |
SmartAccount | getAccount | |
SmartAccount | getAddress | |
SmartAccount | getOwner | |
SmartAccount | isDeployed | |
SmartAccount | deployWalletContract | |
SmartAccount | sendRpc | arg |
SmartAccount | createSessions | options |
SmartAccount | validateSession | targetSession, sessions |