Skip to main content
This guide will help you migrate your Privy React SDK from v2.x.x to v3.0.0. To install the latest version:

New features and improvements 🎉

  • Simplified Solana integration with one wallet per account and direct method access
  • Streamlined peer dependencies required for Solana
  • Removal of deprecated fields and methods
For the full set of changes check out our changelog.

Solana Updates

Update Peer Dependencies

If your app uses Privy’s Solana wallets, the required peer dependencies have changed in v3.0: Remove these peer dependencies:
  • @solana/web3.js
  • @solana/spl-token
Install these new peer dependencies:
  • @solana/kit
  • @solana-program/memo
  • @solana-program/system
  • @solana-program/token
Additionally, if you are using webpack, include the following configurations to add them to webpack’s externals config. Note that these configurations are not needed if you are using Turbopack:

Solana RPC configuration

  • For Privy embedded wallet flows only (UI signTransaction and signAndSendTransaction), set RPCs in config.solana.rpcs. This replaces solanaClusters.

Replace useSolanaWallets

  • Replace useSolanaWallets with useWallets, useCreateWallet, and useExportWallet from the Solana entrypoint. The new useWallets hook returns ConnectedStandardSolanaWallet[].
Key differences between ConnectedSolanaWallet and ConnectedStandardSolanaWallet:
  • Each wallet represents a single connected account
  • Methods are available directly on the wallet instance:
    • wallet.signMessage({message})
    • wallet.signTransaction({transaction, chain})
    • wallet.signAndSendTransaction({transaction, chain})
    • wallet.signAndSendAllTransaction({transaction, chain}[])
    • wallet.disconnect()
  • The Solana standard wallet is available at wallet.standardWallet (for icon/name/etc.)
  • Removed wallet.loginOrLink() method - Use useLoginWithSiws and useLinkWithSiws instead:

Rename useSendTransaction

  • Update useSendTransaction from @privy-io/react-auth/solana to useSignAndSendTransaction from @privy-io/react-auth/solana

Usage Examples

  • All Solana RPCs now expect buffer inputs.

New solana wallet usage

Sign and send via hooks (with optional UI configuration)

Other interface changes

Funding

  • Updated fundWallet interface

Removed/Deprecated Items

  • Removed suggestedAddress from connectWallet and linkWallet
  • Removed detected_wallets from wallet lists/configuration
  • Removed deprecated Moonpay config and types, add config to PrivyProviderConfig instead
  • Removed deprecated requireUserPasswordOnCreate and related embedded wallet config fields
  • **Removed embeddedWallets level createOnLogin field. Use embeddedWallets.etherum.createOnLogin or embeddedWallets.solana.createOnLogin instead. **
  • Removed useLoginToFrame and replaced with useLoginToMiniApp
  • Removed useSignAuthorization() - Use useSign7702Authorization() instead
  • Removed useSetWalletPassword() - Use useSetWalletRecovery instead

Updated Types

  • Removed verifiedAt from LinkMetadata and all linked accounts. Use firstVerifiedAt and latestVerifiedAt instead of the deprecated verifiedAt.