Skip to main content
Copy-pasteable integration examples for the most common wallet libraries. All examples use the unified deposit API and include proper error handling.

Deposit Examples

Privy Deposit

Complete deposit flow using Privy embedded wallets with unified API.

Wagmi Deposit

React hooks-based deposit with wagmi and unified API.

Viem Deposit

Pure TypeScript deposit using viem wallet client.

Withdraw Examples

Privy Withdraw

Withdraw vault shares using Privy embedded wallets.

Wagmi Withdraw

React hooks-based withdrawal with wagmi.

Viem Withdraw

Pure TypeScript withdrawal using viem wallet client.

Before You Start

All examples require:
  1. SDK Initialization - Call initAmplifySDK() with your API key
  2. Wallet Connection - User must have a connected wallet
  3. Token Balance - User must have sufficient token balance for deposits
See SDK Initialization for setup instructions.