@solana/web3.js
with Privy wallets.
Before following this recipe, make sure you have configured Privy for
Solana in your app.
Overview
This recipe demonstrates how to:- Create a SOL transfer transaction using
@solana/web3.js
- Sign and send the transaction using Privy wallets
Prerequisites
Install the required dependencies:bash npm install @solana/web3.js
1. Create the SOL transfer transaction
Create a SOL transfer transaction using your preferred language:2. Send the transaction
You can send the transaction using Privy’s different SDKs. Below are examples for React, React Native, NodeJS, and Python:Next steps
Now that you can send SOL, you might want to explore:- Sending SPL tokens - Learn how to send other tokens on Solana
- Web3 integrations - Advanced integration patterns with Solana libraries