TransactionPlanExecutor

type TransactionPlanExecutor<TContext> = (transactionPlan, config?) => Promise<TransactionPlanResult<TContext>>;

Executes a transaction plan and returns the execution results.

This function traverses the transaction plan tree, executing each transaction message and collecting results that mirror the structure of the original plan.

The zero-argument spelling defaults TContext to TransactionPlanResultContextWithSignature, so its results guarantee a context.signature on every successful single result — but a different TContext may drop that guarantee entirely.

Type Parameters

Type ParameterDefault typeDescription
TContext extends TransactionPlanResultContextTransactionPlanResultContextWithSignatureThe type of the context object that may be passed along with results.

Parameters

ParameterTypeDescription
transactionPlanTransactionPlanThe transaction plan to execute.
config?{ abortSignal?: AbortSignal; }Optional configuration object that can include an AbortSignal to cancel execution.
config.abortSignal?AbortSignal-

Returns

Promise<TransactionPlanResult<TContext>>

A promise that resolves to the execution results.

See

On this page