0. Setup
This guide assumes that you have already integrated Privy into your React native app. If you have not yet set up the basic integration, please first follow the Privy quickstart.1. Install required packages
First, make sure you have the necessary dependencies:2. Import the wallet connector hooks
Import the wallet connector hooks in your component:3. Set up the wallet connector
- Phantom
- Backpack
- Other wallet providers
To set up the Phantom wallet connector, use the
usePhantomDeeplinkWalletConnector hook in your component:Configuration options
TheusePhantomDeeplinkWalletConnector hook accepts the following configuration:4. Using the connector in your UI
Now you can implement UI components to interact with the wallet:5. Implementing the wallet functions
Here are examples of how to implement the handler functions for various wallet actions:The configuration for the generic connector will depend on the specific wallet you’re integrating
with. Refer to each wallet’s documentation for their deeplinking protocol.
How deeplinking works
When a user interacts with your app:- Your app initiates a connection request using the
connect()function - The user is directed to their installed wallet app
- The user approves or denies the action in their wallet
- The wallet redirects back to your app with the result
- Your app updates its state based on the wallet’s response
For the best user experience, consider implementing fallbacks for when a user doesn’t have the
wallet installed. You might prompt them to install the wallet or offer them an alternative login
method.

