use-modular-wallets

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

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/Surojit012/CMO --skill use-modular-wallets-surojit012
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-modular-wallets
Source: https://github.com/Surojit012/CMO/tree/main/.agents/skills/use-modular-wallets
Command: npx skills add https://github.com/Surojit012/CMO --skill use-modular-wallets-surojit012

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 Circle's SDK without wrestling with ERC-4337 and ERC-6900 complexity. ## Core Features & Use Cases - Passkey Authentication: Register and log in users with WebAuthn passkeys via toPasskeyTransport and toWebAuthnCredential, eliminating seed phrase onboarding. - Gasless Transactions: Sponsor user gas fees through Circle Gas Station by passing paymaster: true in user operations, and batch multiple calls into a single user operation. - Passkey Recovery: Set up BIP-39 mnemonic-based recovery so users can register a new passkey if the original is lost. - Use Case: A developer building a consumer fintech app on Polygon can create wallets where users sign in with Face ID, send USDC without holding native tokens for gas, and recover accounts via a saved recovery phrase. ## Quick Start Ask the AI to create a Circle smart account with passkey registration and send a gasless USDC transfer on Polygon Amoy testnet.

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 crypto wallet with passkey authentication?

Use toWebAuthnCredential with WebAuthnMode.Register to create a passkey, then pass it to toCircleSmartAccount via toWebAuthnAccount. The Circle Modular Wallets SDK handles the WebAuthn ceremony and smart account creation on supported EVM chains.

How to send gasless USDC transactions with account abstraction?

Pass paymaster: true in sendUserOperation to sponsor gas through Circle Gas Station. Encode the USDC transfer with encodeTransfer using parseUnits(value, 6), since USDC uses 6 decimals, and submit through the bundler client.

Which blockchains support Circle Modular Wallets?

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

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

Set up recovery in advance by generating a BIP-39 mnemonic and calling registerRecoveryAddress on-chain. If 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 error AA21 or 155203?

AA21 means the sender did not pay prefund, so verify paymaster: true is set or fund the account with native tokens. Error 155203 means the wallet is not deployed yet, so send the first user operation with nonce 0 since MSCAs deploy lazily.

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

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