Skip to content
MCP Servers
Skill

/use-user-controlled-wallets

Build non-custodial wallets where end users retain control of their private keys via Circle's user-controlled wallets SDK. Supports Google, Apple, Facebook social login, email OTP, and PIN authentication with MPC-based key management. Covers wallet creation, token transfers,

From plugin
skills
17020 skills1 MCP

Claude Code

$ npx -y skills add circlefin/skills --skill use-user-controlled-wallets --agent claude-code

SKILL.md

use-user-controlled-wallets.SKILL.md
name: use-user-controlled-wallets
description: "Build non-custodial wallets where end users retain control of their private keys via Circle's user-controlled wallets SDK. Supports Google, Apple, Facebook social login, email OTP, and PIN authentication with MPC-based key management. Covers wallet creation, token transfers, message signing, smart contract execution, and wallet management. Triggers on: user-controlled wallets, social login wallet, email OTP wallet, PIN wallet, w3s-pw-web-sdk, executeChallenge, MPC wallet, userToken, deviceToken, contract execution."
requirements:
  runtimes: []
  connectors: []

Overview

User-controlled wallets are non-custodial: end users keep control of their private keys and assets, and authorize every sensitive operation (wallet creation, transactions, signing) through a challenge-response flow. Supports EVM chains, Solana, and Aptos.

Prerequisites / Setup

Installation

npm install @circle-fin/user-controlled-wallets@latest @circle-fin/w3s-pw-web-sdk@latest vite-plugin-node-polyfills

Vite Configuration

The SDKs depend on Node.js built-ins (`buffer`, `crypto`, etc.) that browsers lack. Add `nodePolyfills()`:

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { nodePolyfills } from "vite-plugin-node-polyfills";

export default defineConfig({
  plugins: [react(), nodePolyfills()],
});

Environment Variables

# Backend
CIRCLE_API_KEY=          # Circle API key

# Frontend
CIRCLE_APP_ID=           # App ID from Wallets > User Controlled > Configurator

Backend SDK Initialization

`@circle-fin/user-controlled-wallets` handles all server-side operations (user creation, challenge creation, transaction queries).

import { initiateUserControlledWalletsClient, Blockchain, TokenBlockchain } from "@circle-fin/user-controlled-wallets";

const circleClient = initiateUserControlledWalletsClient({
  apiKey: process.env.CIRCLE_API_KEY!,
});

Frontend SDK Initialization

`@circle-fin/w3s-pw-web-sdk` handles user-facing operations (challenge execution, auth flows, PIN/OTP/OAuth UI).

import { W3SSdk } from "@circle-fin/w3s-pw-web-sdk";

const sdk = new W3SSdk({ appSettings: { appId: circleAppId } });

IMPORTANT: Call `sdk.getDeviceId()` right after initialization. It establishes the iframe session with Circle; without it, `sdk.execute()` fails silently.

For email OTP and social login, pass a login callback as the second constructor argument (see the corresponding reference).

Core Concepts

Account Types

Chosen at wallet creation. Supported blockchains per type: https://developers.circle.com/wallets/account-types

  • **EOA (Externally Owned Account)**: No creation fees, higher TPS, broadest chain support (EVM, Solana, Aptos). Requires native tokens for gas on EVM chains (on Arc the gas asset is USDC -- there is no separate native token). Gas sponsorship only on Solana, via `feePayer`.
  • **SCA (Smart Contract Account)**: ERC-4337. Gas sponsorship via the Circle Gas Station paymaster, batch operations, flexible key management. EVM-only (no Solana/Aptos). The first outbound transaction incurs gas for lazy deployment.

Architecture

| Party | Role | | --- | --- | | End user (browser/mobile) | Authenticates (PIN, email OTP, or social login) and approves every sensitive operation in Circle's hosted UI via `@circle-fin/w3s-pw-web-sdk`. Keeps full control of private keys -- neither the developer nor Circle can act on the user's behalf. | | Developer service (backend) | Holds the Circle API key, manages user sessions, tracks usage, and enforces app-level guardrails (e.g., spending limits, allowlisted addresses, rate limiting). Calls Circle's API via `@circle-fin/user-controlled-wallets`. Requires a [Circle Developer Console](https://developers.circle.com/w3s/circle-developer-account) account; for developer account setup, see the `use-developer-controlled-wallets` skill. | | Circle Wallet Service (API) | Wallet creation, transaction submission, MPC-based key management, and blockchain interaction. Enforces platform-level compliance screening (e.g., OFAC sanctions checks). |

Request flow: End user -> Developer service (adds API key, enforces guardrails) -> Circle Wallet Service (compliance screening, submission) -> Blockchain.

Challenge-Response Model

All sensitive operations (wallet creation, transactions, signing) follow this pattern:

1. Backend creates the operation via the Circle API -> Circle returns a `challengeId`. 2. Frontend calls `sdk.setAuthentication({ userToken, encryptionKey })`, then `sdk.execute(challengeId, callback)` -> user approves in Circle's hosted UI. 3. The callback fires with the result or error.

Authentication Methods

| Method | Console Setup | How `userToken` Is Obtained | | --- | --- | --- | | PIN | None | Backend calls `createUserToken({ userId })` (60 min expiry) | | Email OTP | SMTP config | SDK login callback after OTP verification | | Social Login | OAuth client ID | SDK login callback after OAuth redirect |

Access Boundaries

  • **Developers** can read wallet data, transaction history, and user information (Circle Developer Console or API) for security monitoring and auditing. They cannot access private keys, send transactions, sign messages, or perform any on-chain operation for a user -- the user must authorize each one via a challenge.
  • **Recovery**: Developers cannot recover a wallet for a user who loses their authentication method (social account, email, or PIN plus security questions); recovery depends entirely on the user re-authenticating. Tell users this during onboarding.
  • **Users** can access only their own wallets and resources -- not other users' and not developer-controlled wallets (the two wallet types are fully isolated).

Transaction Lifecycle

Transfers and contract executions are asynchronous. Poll `circleClient.getTransaction({ userToken, id })`

Read more
@circlefin
Ships withskills

Ship stablecoin apps faster with Circle Skills: best-practice guidance for USDC payments, crosschain transfers, wallets, and smart contracts, plus Circle's MCP server for real-time SDK and documentation context.

17020 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
170
Star history of circlefin/skills on GitHub, a chart by star-history.com

Other skills on skills.

accept-agent-payments

accept-agent-payments

Use when a developer wants to monetize an API, endpoint, service, model, dataset, tool, or agent-facing resource with Circle USDC…

@circlefin@circlefinInstall Skill
agent-wallet-policy

agent-wallet-policy

View spending policy on a Circle agent wallet — per-transaction, daily, weekly, and monthly USDC caps and contract allowlists via…

@circlefin@circlefinInstall Skill
bridge-tokens

bridge-tokens

Build browser or server token bridging across chains with Circle App Kit or standalone Bridge Kit. Bridges USDC across CCTP…

@circlefin@circlefinInstall Skill
buy-crypto

buy-crypto

Set up and integrate Circle Onramp, the hosted widget that lets end users buy crypto with fiat (bank transfer, debit card, Apple…

@circlefin@circlefinInstall Skill
fund-agent-wallet

fund-agent-wallet

Fund a Circle agent wallet with USDC via the `circle` CLI. Payments are gas-abstracted: users pay with USDC only, no ETH…

@circlefin@circlefinInstall Skill
pay-via-agent-wallet

pay-via-agent-wallet

Use this skill when the user wants to call a paid API, look something up online, search for data, get prices, odds, or stats, or…

@circlefin@circlefinInstall Skill

More skills from other plugins.

gitnexus-cli

gitnexus-cli

Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki,…

@abhigyanpatwari@abhigyanpatwariInstall Skill
fastmcp-client-cli

fastmcp-client-cli

Query and invoke tools on MCP servers using fastmcp list and fastmcp call. Use when you need to discover what tools a server…

fastmcp8d29k
@prefecthq@prefecthqInstall Skill
n8n-agents

n8n-agents

Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain,…

n8n-mcp7d23k
@czlonkowski@czlonkowskiInstall Skill
post-to-xhs

post-to-xhs

小红书内容发布技能。支持两种发布模式:(1) 上传图文模式 - 图片+短文;(2) 写长文模式 - 长篇文章+排版模板。 支持两种输入方式:用户提供完整内容和图片/图片URL,直接发布;或提供网页URL,自动提取内容和图片。…

@xpzouying@xpzouyingInstall Skill

Questions about use-user-controlled-wallets.

Which coding agents can use use-user-controlled-wallets?
use-user-controlled-wallets installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.