failedSingleTransactionPlanResult
Creates a failed SingleTransactionPlanResult from a transaction message and error.
This function creates a single result with a 'failed' status, indicating that the transaction execution failed. It includes the original transaction message and the error that caused the failure.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TContext extends TransactionPlanResultContext | TransactionPlanResultContext | The type of the context object |
TTransactionMessage extends TransactionMessage & TransactionMessageWithFeePayer<string> | TransactionMessage & TransactionMessageWithFeePayer<string> | The type of the transaction message |
Parameters
| Parameter | Type | Description |
|---|---|---|
plannedMessage | TTransactionMessage | The original transaction message |
error | Error | The error that caused the transaction to fail |
context? | TContext | - |
Returns
FailedSingleTransactionPlanResult<TContext, TTransactionMessage>