For a complete working app, see the Circle Smart Account
example
in the modular wallets web SDK repository.
Prerequisites
Before you begin this tutorial, ensure that you’ve:-
Created a Circle Console account and
configured:
- A client key for the modular wallets SDK: Console → Keys → Create a key → Client Key
- A passkey domain matching the client key’s web domain: Console → Wallets → Modular Wallets → Passkey
- Installed Node.js 22+ (web), Xcode (iOS), or Android Studio (Android).
-
Installed the modular wallets SDK for your platform:
Web,
iOS, or
Android.
For iOS and Android apps, passkeys are bound to a web domain. Publish an Apple associated domains file or Android Digital Asset Links file at your domain root so your native app can use the passkey.
Step 1. Configure your client key and backend URL
Make your client key and the modular wallets backend URL available to your app. The backend URL is the same for every app:https://modular-sdk.circle.com/v1/rpc/w3s/buidl.
Step 2. Register a passkey for the user
Create a passkey transport, then register a new passkey credential. The credential becomes the wallet’s signer. To sign a returning user back in, passWebAuthnMode.Login instead of Register.
Step 3. Create a transport
The modular transport routes user operations through Circle’s bundler and paymaster for the blockchain you target. The example below uses Arc Testnet. For other options, see supported blockchains and the URL format documented intoModularTransport.
Step 4. Create the bundler client and smart account
The bundler client submits user operations through Circle’s bundler. The smart account is the user’s MSCA, with the passkey credential as its signer. Its address is deterministic, so you can read it before the account is deployed onchain.Next steps
- Set up passkey recovery so the user can restore access if they lose their passkey. Strongly recommended before shipping to production.
- Transfer tokens from the modular wallet with gas sponsored by Circle’s paymaster.
- Sign and verify messages for Sign-In With Ethereum (SIWE) or EIP-712 typed data.