use-modular-wallets

Build passkey-authenticated smart contract wallets with gasless transactions using Circle Modular Wallets SDK.

3|1|Updated May 17, 2026
One-click install
npx skills add https://github.com/levantuy/arc-quantum --skill use-modular-wallets-levantuy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-modular-wallets
Source: https://github.com/levantuy/arc-quantum/tree/main/.agents/skills/use-modular-wallets
Command: npx skills add https://github.com/levantuy/arc-quantum --skill use-modular-wallets-levantuy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @circle-fin/modular-wallets-core, viem, bip39, and includes references (resource) components.

What problem does it solve? Building crypto wallets with modern UX requires handling WebAuthn passkeys, account abstraction, gas sponsorship, and recovery flows. This Skill provides the implementation patterns and reference code to build modular smart contract accounts (MSCAs) with the Circle Modular Wallets SDK without deep ERC-4337 expertise. ## Core Features & Use Cases - Passkey Authentication: Register and log in users with WebAuthn passkeys via toPasskeyTransport and toWebAuthnCredential, then create smart accounts with toCircleSmartAccount. - Gasless & Batch Transactions: Sponsor gas with Circle Gas Station paymaster and batch multiple calls into a single user operation via sendUserOperation. - Passkey Recovery: Implement BIP-39 mnemonic-based recovery to replace lost passkeys using registerRecoveryAddress and executeRecovery. - Use Case: Build a consumer app where users sign up with a fingerprint, receive a self-custody wallet on Polygon or Base, and send USDC without ever paying gas fees. ## Quick Start Ask the AI to create a Circle smart account with passkey registration and send a gasless USDC transfer on a supported testnet such as Polygon Amoy.

Frequently Asked Questions about use-modular-wallets

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a smart account with passkey authentication using Circle Modular Wallets?

Register a passkey with toWebAuthnCredential using WebAuthnMode.Register, then call toCircleSmartAccount with toWebAuthnAccount as the owner. Persist the P256Credential so the session survives reloads, and use toModularTransport with the chain-specific URL path.

How do I send gasless USDC transactions with a paymaster?

Pass paymaster: true in sendUserOperation to sponsor gas through Circle Gas Station. Encode the transfer with encodeTransfer and use parseUnits with 6 decimals for USDC amounts, then await confirmation with waitForUserOperationReceipt.

Which blockchains support Circle Modular Smart Contract Accounts?

MSCAs are supported on Arbitrum, Avalanche, Base, Monad, Optimism, Polygon, and Unichain, plus Arc Testnet. They are not available on Ethereum mainnet, Solana, Aptos, or NEAR.

How do I recover a wallet when the user loses their passkey?

During setup, generate a BIP-39 mnemonic and register its derived EOA as the recovery address on-chain. When the passkey is lost, validate the mnemonic, register a new passkey, and call executeRecovery to swap the account owner.

Why does my user operation fail with AA21 or error 155203?

AA21 means the sender did not pay prefund, so set paymaster: true or fund the account with native tokens. Error 155203 occurs when sending a nonzero nonce before deployment; the first user operation must use nonce 0 since MSCAs deploy lazily.

When should I use modular wallets instead of user-controlled wallets?

Use modular wallets when you need passkey-based authentication, gas sponsorship, and extensible on-chain modules like multisig or session keys. Choose user-controlled wallets when end users should custody keys via social login, email OTP, or PIN instead.