Skip to main content
This example demonstrates how to combine the Amplify SDK with the Privy React SDK to prepare approvals, submit deposits, and display transaction status inside a React app.

Overview

  • Access the embedded or external wallet provided by Privy.
  • Prepare approval and deposit calldata with the Amplify helpers.
  • Submit both transactions with sendTransaction.
  • Track optimistic UI state and surface errors.

Prerequisites

  • React 18+
  • @privy-io/react-auth >= 3
  • @paxoslabs/amplify-sdk (initialized via initAmplifySDK)
  • viem >= 2.0.0 for calldata encoding and allowance checks
  • Privy provider configured at the app root (<PrivyProvider appId="...">)

Deposit Hook

Component Usage

sendTransaction resolves with the transaction hash. Add receipt polling, analytics, and user notifications to fit your UX requirements.