Skip to main content
This walkthrough bootstraps a Vite + React project that authenticates users with Privy, initializes the Amplify SDK, and wires up deposit flows using the unified deposit API.
The snippets use the latest Privy React SDK (@privy-io/react-auth) APIs. Wait for ready from usePrivy and useWallets before inspecting user or wallet state to avoid race conditions.

1. Scaffold the Project

Install the runtime dependencies:

2. Configure Environment Variables

Create .env.local:
Never commit this file. Provide an .env.example without secrets for teammates.

3. Set Up Providers

Create src/providers.tsx:
Wire the providers in src/main.tsx:

4. Initialize the SDK

Create src/hooks/useAmplify.ts:

5. Create the App

Replace src/App.tsx:

6. Run the App

Open http://localhost:5173 and test the deposit flow.

Next Steps

Deposits Guide

Complete deposit examples with hooks and components.

Withdrawals Guide

Add withdrawal functionality to your app.

Smart Wallets

Enable gas sponsorship and transaction batching.

API Reference

Explore all SDK functions and types.