Skip to main content
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.
When using Privy’s server-side SDKs to send transactions, you can use the authorization context to automatically sign requests. Learn more about signing on the server.
To send a transaction from a wallet using the React SDK, use the signAndSendTransaction method from the useSignAndSendTransaction hook:

Usage

Parameters

Returns

Uint8Array
The signature of the transaction.

Sign and send all transactions

To sign and send multiple transactions in a single call, use the signAndSendTransaction method with multiple inputs:

Usage

Parameters

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.
The wallet RPC endpoint is a synchronous endpoint, and a successful response indicates that the transaction has been broadcasted to the network. Transactions may get broadcasted but still fail to be confirmed by the network. The endpoint does not wait for confirmation or retry if the transaction fails to be confirmed. To handle these scenarios, see our guide on speeding up transactions.