ClientWithTransactionSending
Represents a client that can send transactions to the Solana network.
Transaction sending handles signing, submission, and confirmation of transactions. It supports flexible input formats including instructions, instruction plans, transaction messages or transaction plans.
Example
Properties
sendTransaction()
Sends a single transaction to the network.
Accepts flexible input: instructions, instruction plans, a single transaction message or a single transaction plan.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | | InstructionPlanInput | SingleTransactionPlan | SingleTransactionPlan["message"] | Instructions, a transaction plan, or a transaction message. |
config? | Config | Optional configuration including an abort signal. |
Returns
Promise<SuccessfulSingleTransactionPlanResult>
A promise resolving to the successful transaction result.
See
- InstructionPlanInput
- SingleTransactionPlan
sendTransactions()
Sends one or more transactions to the network.
Accepts flexible input: instructions, instruction plans, transaction messages or transaction plans.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | InstructionPlanInput | TransactionPlanInput | Any instruction or a transaction plan input. |
config? | Config | Optional configuration including an abort signal. |
Returns
Promise<TransactionPlanResult>
A promise resolving to the results for all transactions.
See
- InstructionPlanInput
- TransactionPlanInput