Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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…

circlefinот circlefin★ 171 звезда на GitHub

Об этом скилле

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 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 d
Полный SKILL.md на GitHub

Установить use-user-controlled-wallets в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/contract-execution.mdreferences/create-wallet-email-otp.mdreferences/create-wallet-pin.mdreferences/create-wallet-social-login.mdreferences/send-transaction.mdreferences/sign-message.mdreferences/wallet-management.md

FAQ

Что делает скилл 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, 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.

Как установить скилл use-user-controlled-wallets?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл use-user-controlled-wallets запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить use-user-controlled-wallets с