Set up Privy with Seismic for email and social login
Privy provides email, social, and embedded wallet authentication. This guide shows how to integrate Privy with Seismic React for apps that need flexible onboarding beyond browser extension wallets.
import{seismicTestnet}from"seismic-react/rainbowkit";// Privy needs the chain in viem formatconstseismicChain={id:seismicTestnet.id,name:seismicTestnet.name,nativeCurrency:seismicTestnet.nativeCurrency,rpcUrls:seismicTestnet.rpcUrls,blockExplorers:seismicTestnet.blockExplorers,};
Step 2: Set Up wagmi Config
Create a wagmi config using Privy's wagmi integration:
Step 3: Set Up Providers
Nest the providers in the correct order -- Privy wraps wagmi, and ShieldedWalletProvider goes inside:
Privy's embedded wallets work seamlessly with Seismic -- users don't need a browser extension. Privy creates a wallet automatically when users sign in with email or social accounts.
Step 4: Add Login Button
Use Privy's hooks to trigger the login modal:
Step 5: Use Shielded Hooks
Once authenticated, use seismic-react hooks as normal: