createFailedToSignTransactionsError
Creates a SolanaError with the SOLANA_ERROR__FAILED_TO_SIGN_TRANSACTIONS error code from a TransactionPlanResult.
This is the signing counterpart to createFailedToSendTransactionsError, designed
for user-facing failures raised by executors that sign several transactions without
submitting them. It walks the result tree, unwraps simulation errors from each failure,
and builds the same failedTransactions array pairing each failure with its unwrapped
error, logs, and preflight data.
As with createFailedToSignTransactionError, each line names only the position of the failure in the plan. Nothing was submitted, so there is no preflight to flag and no transaction signature worth quoting.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TContext extends TransactionPlanResultContext | TransactionPlanResultContext | The type of the context object attached to the results. Any context is accepted, since this helper never reads from it. |
Parameters
| Parameter | Type | Description |
|---|---|---|
result | TransactionPlanResult<TContext> | The full transaction plan result tree. |
abortReason? | unknown | An optional abort reason if the plan was aborted. |
Returns
SolanaError<14>
A SolanaError with the appropriate error code, context, and cause.
Example
Creating an error from a failed transaction plan result.