- Circle Smart Accounts: Smart accounts leverage passkey signing for seamless Web3 integration and support advanced use cases through modules.
- Send a Transaction. Enable blockchain operations without requiring users to send a transaction directly.
- Send a Gasless Transaction. Enables developers to cover network fees on behalf of users, simplifying blockchain interactions.
- Batch Processing. Combine multiple transactions into a single call for efficiency.
- Parallel Execution. Execute independent transactions simultaneously using 2D nonces.
- Secure Signing and Verification. Perform secure operations like signing messages and verifying signatures.
Circle Smart Accounts
Circle Smart Accounts allow users to set up passkeys and utilize biometrics verification for signing, which provides a seamless Web3 experience. Smart Accounts are built on top of Viem and adhere to the ERC-6900 and ERC-4337 (v0.7) standards. Advanced use cases are supported through modules.Send a Transaction
The sample code below demonstrates how to send a transaction, also known as a User Operation (userOp) in the context of Account Abstraction (AA), to the Bundler.Send a Gasless Transaction
Gasless transactions, in the context of Account Abstraction (AA), allow users to perform blockchain operations without needing to hold native tokens for gas fees. Circle provides the Gas Station service, enabling developers to sponsor network fees on behalf of users. This feature addresses the common challenge of requiring native tokens for onchain activities, simplifying blockchain interactions for end users by eliminating the need to manage token balances.Info:To use Gas Station on the mainnet:
- Set up a policy in the Circle Console.
- Sponsored fees are charged to the payment method on file.
paymaster parameter to true when
invoking any applicable *userOperation*() method. See sample code below that
sponsors gas fees.Batch Processing
Modular wallets support sending multiple transactions into a single call. This approach simplifies the user experience and improves gas efficiency. For instance, users can approve multiple transfers or swaps with a single signature. See the sample code below for sending batch transactions.Parallel Execution
Traditional Externally Owned Accounts (EOA) process transactions sequentially using a linear nonce (e.g., 1, 2, 3). This requires each transaction to complete before the next begins. In contrast, smart accounts support 2D nonces, which consist of:- Nonce key
- Nonce value
Example Scenario
A user wants to execute three trades:- Swap 100 USDT for DAI (transaction 1)
- Swap 100 DAI for USDC (transaction 2)
- Swap 1 WETH for USDC (transaction 3)
Info:To enable parallel transactions:
- Ensure the
nonceKeyis greater than 0; anonceKeyof 0 defaults to linear nonces. - Avoid dependencies between
userOps. - Don’t wait for each
userOpto execute, as this negates the benefits of parallelism.
userOps, use “nonce keys” to compute a
nonce. See sample code below.
Secure Signing and Verification
Circle Smart Accounts enable signing and verifying various data types:- Message. Signs a message using a passkey, generating an Ethereum-specific EIP-191 signature.
- Typed Data. Signs typed data using a passkey, generating an Ethereum-specific EIP-712 signature.
EIP-1193
The modular wallets SDK can also function as a provider, enabling third-party wallet SDKs to connect to Circle’s services. The following example demonstrates an EIP-1193 provider implementation for the Web SDK.Javascript