Full SDK Integration
Stop users ever leaving your dApp in just a few lines of code. Let’s get cracking.
How to use our full SDK
For the best user experience and maximize your conversions for all users.
This is what your user will see once they press the connect wallet button.
Requirements
Take-off Safety Procedures Before we accelerate, let’s check if you’re ready to go. Please ensure you are using the Solana Labs Wallet adapter in your dApp. - This SDK is built for React based projects only. If you are looking to implement using another stack, talk to our staff on Discord. - If you are using a custom wallet adapter instead of the Solana Labs Wallet Adapter - speak to a member of our staff on Discord and we will custom cater our integration for you.
How to Integrate full SDK:
Alright, we’re ready to start integrating!
Step 1
On your frontend, install the dependencies using npm.
Step 2
Navigate to your Solana Labs wallet adapter where the wallets are defined.
It should look something like this:
Then, import the wallet adapter from the top of the file like follows:
Next, instantiate the wallet adapter within the wallets declaration like follows:
Step 3
Navigate to where your Wallet Adapter Connection button is defined.
It is usually called WalletMultiButton - or similar.
At the top of where this button is defined, call the following imports
Next, add the following hooks to the main function component of where you want to define the button.
Then, replace the existing button with this:
That’s it. Quick and easy. You’re ready to go! That’s all it took to anti-noob your dApp.