To sponsor gas fees for transactions on Solana, see our guide
here.
To rely on Privy’s API to fill in the recentBlockhash field of the Solana transaction, pass in the
dummy value
11111111111111111111111111111111
for the recentBlockhash field.To send a transaction from a wallet using the React SDK, use the
sendTransaction
method from the useSendTransaction
hook:Usage
Parameters
Returns
The signature of the transaction.
The signed transaction.
The parsed transaction result.
The fees paid for the transaction in lamports.
For complete examples of sending SOL and SPL tokens using Privy’s SDKs, check out the sending a
SOL transaction recipe and the sending SPL tokens
recipe.