Use Privy Signers
Learn how to integrate Privy as wallet provider with the Gelato Smart Wallets React SDK
Template & Examples
Smart Wallet React SDK Example
Check out the full example code for integrating Privy as wallet provider with the Gelato Smart Wallets React SDK.
Setup Instructions
Clone the Repository
Set Up Environment Variables
Install Dependencies
Start the development server
Open your browser and navigate to http://localhost:5173
Not using templates? Prefer a step-by-step approach? Up next: How-To Guides for implementing the Smart Wallet React SDK use cases step-by-step.
Installation
Gelato Smart Wallets React SDK
Check out the NPM package for the Gelato Smart Wallets React SDK.
Getting Started
Importing Dependencies
Setting up Smart Wallet Context Provider
To create a Sponsor API Key, visit the Gelato App and navigate to the Relay section. Create a new app, select the required networks, and copy the generated Sponsor API Key. For detailed instructions, click here to learn more about creating a Sponsor API Key.
Setting up Connect Button
You can customize the appearance of your connect button here. This button triggers the wallet connectors widget configured for the UI.
Fetching Smart Wallet Client
Use this client directly to execute transactions with different gas payment methods. Additionally, a logout option is available to disconnect your connected wallet.
Sending Transactions
You can send transactions using different gas payment methods as shown below. Additionally, you can add multiple transactions to the calls array to batch them and send them on-chain in a single request.