Injected Solana Provider
Sending transactions
Creating a transaction
Before you can sign and send transactions, you must first create a Transaction.
The code snippet below demonstrates how to create a Transaction using the @solana/web3.js library:
You can learn more about creating transactions on Solana by visiting the Solana documentation.
Signing a transaction
To sign a transaction, call the signTransaction
method on the provider, passing a Transaction as an argument.
Sending a transaction
To send a transaction, call the sendTransaction
method on the provider, passing a Transaction as an argument.
Signing and sending a transaction
To sign and send a transaction, call the signAndSendTransaction
method on the provider, passing a Transaction as an argument.
Signing all transactions
To sign a batch of transactions, call the signAllTransactions
method on the provider, passing a list of Transactions as an argument.