Send a transaction
To sponsor gas fees for transactions on Solana, see our guide here.
To send a transaction from a wallet using the React SDK, use the sendTransaction
method from the useSendTransaction
hook:
Usage
Parameters
The transaction to be sent. Can be either a legacy Transaction or VersionedTransaction from @solana/web3.js.
Connection to an SVM (Solana) network.
UI options to customize the transaction request modal.
Transaction options to customize the transaction request.
Funding configuration to specify cluster and funding amount (if enabled), in the case of insufficient funds.
Address for the embedded wallet sending the transaction. Defaults to the user’s embedded wallet at HD index 0.
Returns
The signature of the transaction.
The signed transaction.
The parsed transaction result.
The fees paid for the transaction in lamports.
Was this page helpful?