canceledSingleTransactionPlanResult

function canceledSingleTransactionPlanResult<
    TContext,
    TTransactionMessage,
>(
    transactionMessage,
): SingleTransactionPlanResult<TContext, TTransactionMessage>;

Creates a canceled SingleTransactionPlanResult from a transaction message.

This function creates a single result with a 'canceled' status, indicating that the transaction execution was canceled. It includes the original transaction message.

Type Parameters

Type ParameterDefault typeDescription
TContext extends TransactionPlanResultContextTransactionPlanResultContextThe type of the context object (not used in canceled results)
TTransactionMessage extends Readonly<{ instructions: readonly Instruction<string, readonly (/api/functions/ | AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]; version: TransactionVersion; }> & TransactionMessageWithFeePayer<string>Readonly<{ instructions: readonly Instruction<string, readonly (/api/functions/ | AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]; version: TransactionVersion; }> & TransactionMessageWithFeePayer<string>The type of the transaction message

Parameters

ParameterTypeDescription
transactionMessageTTransactionMessageThe original transaction message

Returns

SingleTransactionPlanResult<TContext, TTransactionMessage>

Example

const result = canceledSingleTransactionPlanResult(transactionMessage);
result satisfies SingleTransactionPlanResult;

See

SingleTransactionPlanResult

On this page