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.
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.
To send a transaction from a wallet using the React Native SDK, use the request
method from the wallet’s provider:
Usage
Parameters
The RPC method executed with the wallet.
Parameters for the transaction.
Returns
The signature of the transaction.
Sending a Solana transaction involves building the transaction, signing it, and then submitting it to the network.
Usage
Parameters
The base64-encoded serialized transaction message to sign.
Returns
The base64-encoded signature for the transaction.
Use the signMessage
method on the Solana wallet provider to sign a transaction and then submit it to the network.
Usage
Parameters
The base64-encoded serialized transaction message to sign.
Returns
A Result that, when successful, contains the base64-encoded signature.
Use the signMessage
method on the Solana wallet provider to sign a transaction and then submit it to the network.
Usage
Parameters
The base64-encoded serialized transaction message to sign.
Returns
A Result that, when successful, contains the base64-encoded signature.
Use the signAndSendTransaction
method on the Solana client to send a transaction with a Solana wallet.
Usage
Parameters
The ID of the wallet to send the transaction from.
The CAIP2 chain ID of the chain the transaction is being sent on.
The transaction to sign and send. This can be either a legacy Transaction or a VersionedTransaction object from @solana/web3.js.
Returns
The hash for the broadcasted transaction.
The CAIP2 chain ID of the chain the transaction was sent on.
To send a transaction make a POST request to
Usage
A successful response will look like the following:
Parameters
The RPC method executed with the wallet.
The CAIP2 chain ID to broadcast the transaction on.
Parameters for the RPC method to execute with the wallet.
Returns
The RPC method executed with the wallet.
The hash for the broadcasted transaction.
The CAIP2 chain ID the transaction was submitted on.