Skip to main content
ClaudeWave
Skill5.3k repo starsupdated 17d ago

Privy

Use when building wallet infrastructure, authentication systems, or financial applications. Reach for Privy when you need to create embedded wallets, manage user authentication, control wallet permissions with policies, execute transactions across blockchains, or build treasury/agent wallets with programmable controls.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/internet-court/internet-court-skill /tmp/privy && cp -r /tmp/privy/vendored/privy/privy ~/.claude/skills/privy
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Privy Skill Reference

## Product summary

Privy is a programmable wallet infrastructure platform for building financial applications. It provides embedded wallets, authentication, transaction execution, and policy controls across 50+ blockchains including Ethereum, Solana, Bitcoin, and Tempo. Agents use Privy to authenticate users, create and manage wallets, execute transactions, enforce spending policies, and build complete financial products without building wallet infrastructure from scratch.

**Key files and commands:**
- Dashboard: https://dashboard.privy.io (configure apps, login methods, policies)
- App ID and App Secret: Found in Dashboard > App Settings > Basics
- Client ID: Required for mobile/non-web platforms (Dashboard > App Settings > Clients)
- REST API: `https://api.privy.io/v1/` (requires Basic Auth with app ID:secret)
- SDKs: React (`@privy-io/react-auth`), Node.js (`@privy-io/node`), Swift, Android, Flutter, Java, Go, Rust, Ruby
- Primary docs: https://docs.privy.io

## When to use

Reach for Privy when:
- Building consumer apps that need user authentication + embedded wallets
- Creating organization or treasury wallets with multi-sig controls
- Building AI agents that need to hold assets and transact autonomously
- Implementing spending policies, transaction limits, or approval workflows
- Executing transactions across multiple blockchains from a single interface
- Migrating users from another wallet provider
- Setting up funding flows (fiat onramps, crypto deposits, card spend)
- Implementing yield integrations or token swaps
- Requiring role-based access control or delegation patterns

Do not use Privy for: pure authentication without wallets (use Auth0, Firebase instead), or if you need complete control over key management without any abstraction.

## Quick reference

### SDK Installation

| Platform | Package | Command |
|----------|---------|---------|
| React | `@privy-io/react-auth` | `npm install @privy-io/react-auth` |
| Node.js | `@privy-io/node` | `npm install @privy-io/node` |
| React Native | `@privy-io/react-native-auth` | `npm install @privy-io/react-native-auth` |
| Swift | Privy Swift SDK | Via Swift Package Manager |
| Android | Privy Android SDK | Via Gradle |

### Core Concepts

| Concept | Definition | Use case |
|---------|-----------|----------|
| **User** | Individual authenticated in your app | Consumer wallets, personal accounts |
| **Wallet** | Blockchain account (embedded or external) | Holding assets, signing transactions |
| **Owner** | Entity with full control (user, auth key, or quorum) | Determines who can modify wallet |
| **Signer** | Additional party with scoped permissions | Server automation, delegated access |
| **Policy** | Rules constraining wallet actions | Spending limits, recipient whitelists |
| **Authorization Key** | P256 cryptographic key for server control | Backend wallet management |
| **Key Quorum** | M-of-K multi-sig approval | Shared control, treasury operations |

### Authentication Methods

Configure in Dashboard > Configuration > Authentication:
- Email / SMS / WhatsApp
- Social (Google, Discord, Twitter, Farcaster, etc.)
- Passkeys (WebAuthn)
- External wallets (MetaMask, Phantom)
- Custom JWT (bring your own auth provider)
- Guest accounts (instant sign-in)

### Wallet Control Models

| Model | Owner | Signers | Use case |
|-------|-------|---------|----------|
| User-owned | User | None | Self-custodial consumer wallets |
| User + server | User | Server (scoped) | Automated trading, limit orders |
| App-owned | Auth key | None | Treasury, bots, agents |
| Custodial | Licensed custodian | None | Institutional FBO accounts |

### REST API Headers (Required)

```
Authorization: Basic <base64(app_id:app_secret)>
privy-app-id: <app_id>
Content-Type: application/json
```

### Common Wallet Actions

| Action | Endpoint | Purpose |
|--------|----------|---------|
| Create wallet | `POST /v1/wallets` | Provision new wallet |
| Get wallet | `GET /v1/wallets/{id}` | Fetch wallet details |
| Send transaction | `POST /v1/wallets/{id}/rpc` | Execute blockchain action |
| Get balance | `GET /v1/wallets/{id}/balance` | Check asset holdings |
| Create policy | `POST /v1/policies` | Define spending rules |
| Create user | `POST /v1/users` | Onboard new user |

## Decision guidance

### When to use embedded vs external wallets

| Scenario | Embedded | External |
|----------|----------|----------|
| New users, no existing wallet | ✓ | ✗ |
| Users have MetaMask/Phantom | ✗ | ✓ |
| Need full control over UX | ✓ | ✗ |
| Users want to bring existing assets | ✗ | ✓ |
| Mobile app | ✓ | Limited |
| Require key export | ✓ | ✗ |

### When to use client-side vs server-side SDKs

| Scenario | Client SDK | Server SDK |
|----------|-----------|-----------|
| User authentication | ✓ | ✗ |
| Wallet creation for users | ✓ | ✓ |
| Server-controlled wallets | ✗ | ✓ |
| Transaction signing | ✓ | ✓ |
| Policy management | ✗ | ✓ |
| User management | ✗ | ✓ |

### When to use policies vs key quorums

| Need | Policies | Key Quorums |
|------|----------|-------------|
| Spending limits | ✓ | ✗ |
| Recipient whitelists | ✓ | ✗ |
| Multi-sig approval | ✗ | ✓ |
| Time-based rules | ✓ | ✗ |
| Contract interaction control | ✓ | ✗ |
| Shared ownership | ✗ | ✓ |

## Workflow

### 1. Set up your Privy app

1. Go to https://dashboard.privy.io and create an app
2. Copy your App ID and App Secret from App Settings > Basics
3. For mobile/non-web: Create an app client in App Settings > Clients
4. Configure login methods in Configuration > Authentication
5. (Optional) Configure appearance in Configuration > Appearance

### 2. Integrate authentication (client-side)

1. Install the appropriate SDK (`@privy-io/react-auth` for React, etc.)
2. Wrap your app with `PrivyProvider`, passing `appId` and `clientId`
3. Use `usePrivy()` hook to access `login()`, `logout()`, and `user` state
4. Wait for `ready === true` before consuming Privy state
5. Call `login()` to trig
internet-courtSkill

Entry point for Internet Court — the trust layer for agent-to-agent commerce. Use whenever an agent needs to transact with another agent or a paid service, or a user mentions agent payments, paid APIs (HTTP 402/x402), wallet custody or trust concerns, spending mandates, delegated permissions (ERC-7710/7715), escrow, agent identity or reputation (ERC-8004), negotiation between agents (A2A), agent jobs (ERC-8183), machine payments (MPP, AP2), supervision of agent behavior, revocation, verification, or dispute resolution (GenLayer) — even if they never say "Internet Court". Routes to the vendored protocol skills and connector skills in this package.

genlayer-erc7710-connectorSkill

Connect GenLayer Intelligent Contract decisions to ERC-7710-style delegated authority. Use when an agent needs to design the interface, message schema, relayer/bridge path, EVM revocation controller, constraint updates, proof/finality assumptions, and failure handling that turn a GenLayer agent-performance review into ERC-7710 revocation or policy changes.

genlayer-intelligent-contractsSkill

Internet Court adapter for GenLayer Intelligent Contract supervision. Use to specify agent-performance rubrics, evidence schemas, decision outputs, and ERC-7710 connector expectations, while delegating actual GenLayer contract writing, linting, testing, deployment, and CLI interaction to the official GenLayer skills at https://skills.genlayer.com/.

x402-erc7710Skill

Design and implement demos combining x402 HTTP payments with ERC-7710 smart contract delegations and ERC-7715 wallet permission requests for subscriptions, bounded agent budgets, recurring spend, pay-per-use APIs, and agentic commerce.

0g-computeSkill

0G Compute Network guide for decentralized AI inference, fine-tuning, and GPU services. Covers chatbots, image generation, speech-to-text, SDK integration (0g-serving-broker), processResponse API, broker.inference methods, CLI commands (0g-compute-cli), and account management. Use this skill for any 0G compute, 0G AI, or decentralized GPU question.

altllm-portal-api-keysSkill

Use this skill when the user asks to list, create, inspect, update, disable, re-enable, or revoke AltLLM Portal API keys for external agents or applications. Do NOT use for wallet login, billing history, or payment links.

altllm-portal-authSkill

Use this skill when the user asks to log in or out with a wallet session, fetch a wallet sign-in challenge, verify an externally signed challenge, or troubleshoot AltLLM Portal wallet login for the local altllm CLI. Do NOT use for API key management, billing history, or payment links.

altllm-portal-billingSkill

Use this skill when the user asks to inspect AltLLM Portal balance, redeem a promo code, review billing transactions, or view usage analytics by period, model, or API key using the local altllm CLI. Do NOT use for API key lifecycle management or payment-link execution.