Connect Wallet in React native

How can i integrate a tron wallet connect in my react native project?, im building with a bare react native template and im seeking a way to integrate wallet connect.

6 Likes

Hello there, happy to support you on the request, if you are looking to create a native app for iOS and Android you will need to use tronweb instead of wallet connect, wallet connect is used for web based apps (dApps) to interact with tronlink wallet within the browser.

Would you please explain a bit on your use case? I might be able to support better knowing what do you want to achieve :slight_smile:

Hello @cctechmx

I want users to be able to connect a wallet and also interact with the tron contact.

Ok, do you want to use the tronlink wallet to manage their account, Or how do you plan your users to login into your app?

1 Like

Manage account and handle payment for stuff.

But you want to create a separete Androidd/iOS app right?

I want to integrate it into my android app

I just want users to click a button and connect their tron wallet, retrieve every necessary data of the users and be able to run transactions on the tron network

1 Like

Then your way to go is using tronweb as per the link I shared in a previous message, I will try to find a bare example using react native but you can try installing tronweb with npm inside your react native project, import it and start working on the implementation, best of luck !

2 Likes

Thanks for the help really appreciate

1 Like

Hello :wave: Buddy
To integrate a Tron wallet connect in your React Native project, you can make use of the official TronWeb library which provides an easy way to interact with the Tron blockchain.
Here’s how you can do it.

  1. Install the TronWeb library by running the following command in your project directory.

  2. Import the TronWeb library in your React Native component where you want to interact with the Tron blockchain

  3. Initialize the TronWeb instance with the appropriate provider e.g. WalletConnect.

  4. Once you have initialized the TronWeb instance, you can use it to interact with the Tron blockchain by calling methods like getBalance.

  5. To integrate WalletConnect with TronWeb, you can use the WalletConnect provider to connect your TronWeb instance with a Tron wallet. You can find more information on how to initialize WalletConnect with TronWeb in the official TronWeb documentation.

By following these steps, you should be able to integrate a Tron wallet connect in your React Native project successfully.

1 Like

Thanks alot really appreciate

Hello Joseph you can also try the following: GitHub - tronprotocol/tronwallet-adapter , best of luck!

Hello @JosephLooop and all!
After discussion with the Tronlink team they shared and updated some docs related to deep linking: DeepLink | TronLink Docs

Basically using deeplinking you can interact with tronlink app directly from your mobile app. Your app will need to be white listed from tronlink team but it is possible :slight_smile:

1 Like

Hey man you can also try using tronwallet adapter for seemless hardle free connection.

1 Like