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 thesignTransaction
method on the provider, passing a Transaction as an argument.
Sending a transaction
To send a transaction, call thesendTransaction
method on the provider, passing a Transaction as an argument.
Signing and sending a transaction
To sign and send a transaction, call thesignAndSendTransaction
method on the provider, passing a Transaction as an argument.
Signing all transactions
To sign a batch of transactions, call thesignAllTransactions
method on the provider, passing a list of Transactions as an argument.