Skip to content

Add Privy Yield demo example#144

Merged
madeleine-c merged 9 commits intomainfrom
mcharity/add-yield-demo
Feb 24, 2026
Merged

Add Privy Yield demo example#144
madeleine-c merged 9 commits intomainfrom
mcharity/add-yield-demo

Conversation

@madeleine-c
Copy link
Contributor

@madeleine-c madeleine-c commented Feb 23, 2026

Summary

  • Adds privy-next-yield-demo, a Next.js app demonstrating Privy Yield — users authenticate, receive an embedded wallet, deposit USDC into a Morpho vault on Base mainnet, and withdraw with earned yield
  • Includes deposit/withdraw flows, real-time position tracking, transaction history via webhooks, and vault info display (APY, TVL, liquidity)
  • Uses Privy server wallets for transaction signing via API routes
  • Styled with the Privy Home design system (Tailwind CSS v4)

What's included

  • Authentication: Privy login (email, wallet, Google, Apple) with automatic embedded wallet creation
  • Deposit/Withdraw: USDC vault operations via /api/deposit and /api/withdraw server routes
  • Position tracking: Real-time vault position with yield calculation
  • Transaction history: Webhook-driven transaction updates (/api/webhook) with in-memory store
  • Vault info: APY, TVL, available liquidity, and vault address display

Test plan

  • Run npm install && npm run dev in examples/privy-next-yield-demo
  • Verify login flow with Privy embedded wallet
  • Test deposit and withdraw flows against the vault
  • Confirm position display updates after transactions
  • Verify transaction history populates via webhook events
  • Run npm run build and npm run lint — both pass clean

🤖 Generated with Claude Code

Next.js app demonstrating ERC-4626 vault deposits, withdrawals, and position tracking using Privy embedded wallets and server wallets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GIT_VALID_PII_OVERRIDE

Committed-By-Agent: claude
@vercel
Copy link

vercel bot commented Feb 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
privy-next-cross-app-provider Building Building Preview, Comment Feb 24, 2026 11:15pm
privy-react-farcaster Building Building Preview, Comment Feb 24, 2026 11:15pm
privy-react-fiat-onramp Error Error Feb 24, 2026 11:15pm
privy-react-funding Error Error Feb 24, 2026 11:15pm
privy-react-permissionless Error Error Feb 24, 2026 11:15pm
privy-react-smart-wallets Error Error Feb 24, 2026 11:15pm
14 Skipped Deployments
Project Deployment Actions Updated (UTC)
privy-next-cross-app-connect Ignored Ignored Preview Feb 24, 2026 11:15pm
privy-next-farcaster Ignored Ignored Preview Feb 24, 2026 11:15pm
privy-next-farcaster-mini-app Ignored Ignored Preview Feb 24, 2026 11:15pm
privy-next-fiat-onramp Ignored Ignored Preview Feb 24, 2026 11:15pm
privy-next-funding Ignored Ignored Preview Feb 24, 2026 11:15pm
privy-next-permissionless Ignored Ignored Preview Feb 24, 2026 11:15pm
privy-next-session-keys Ignored Ignored Preview Feb 24, 2026 11:15pm
privy-next-smart-wallets Ignored Ignored Preview Feb 24, 2026 11:15pm
privy-next-solana Ignored Ignored Preview Feb 24, 2026 11:15pm
privy-next-starter Ignored Ignored Preview Feb 24, 2026 11:15pm
privy-next-wagmi Ignored Ignored Preview Feb 24, 2026 11:15pm
privy-react-pwa Ignored Ignored Preview Feb 24, 2026 11:15pm
privy-react-starter Ignored Ignored Preview Feb 24, 2026 11:15pm
privy-react-whitelabel-starter Ignored Ignored Preview Feb 24, 2026 11:15pm

Request Review

@socket-security
Copy link

socket-security bot commented Feb 23, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​privy-io/​react-auth@​3.13.17510073100100
Added@​types/​node@​20.19.321001008196100

View full report

@madeleine-c madeleine-c marked this pull request as draft February 23, 2026 17:48
Adopt the canonical Privy design language from privy-next-starter:
- Replace CSS gradient landing with BG.svg hero, transparent header, pill badge, and ABC Favorit typography
- Add fixed 60px auth-aware header with Privy logo and "Yield Demo" badge
- Switch to local Inter + ABC Favorit fonts via next/font/local
- Replace custom button/card CSS classes with design skill equivalents (button-primary, button-outline, button)
- Add FullScreenLoader, Header, and CustomToast shared UI components
- Update dashboard with light purple background, logout button, and ToastContainer
- Swap lucide-react for @heroicons/react; add react-toastify

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
Add real-time transaction tracking with in-memory store seeded by
deposit/withdraw responses and updated via Privy webhook events.
Frontend polls every 5s to reflect status changes (pending -> confirmed/failed).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
Remove unused files (PrivyLogo, custom-toast, utils, boilerplate SVGs),
unused dependencies (class-variance-authority, clsx, tailwind-merge),
dead code (useWallets, embeddedWallet, button-outline CSS, DOM query hack),
and update README to reflect actual project structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
Display all fields from the Privy Yield API directly instead of
derived calculations. Align both cards with the app's design system
(consistent font sizes, border-t separators, Inter font throughout).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
madeleine-c and others added 3 commits February 24, 2026 17:21
Add User/App nav links to header, fix Docs link font and URL, change
card backgrounds from gray to white, and support walletId prop for
position and transaction components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
Add app-facing dashboard page with wallet address resolution API route,
AppWalletCard for displaying the fee recipient wallet balance, and
AppWithdrawForm for withdrawing earned fees from the vault.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
Move logout button from dashboard pages and WalletCard into the header
left side. Add font-family inherit rule for interactive elements and
increase top padding on dashboard content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Committed-By-Agent: claude
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants