isNonDivisibleSequentialTransactionPlanResult

function isNonDivisibleSequentialTransactionPlanResult(
    plan,
): plan is Readonly<{
    divisible: boolean;
    kind: 'sequential';
    plans: TransactionPlanResult<
        TransactionPlanResultContext,
        Readonly<{
            kind: 'single';
            message: TransactionMessage &
                TransactionMessageWithFeePayer<string>;
            status: TransactionPlanResultStatus<TransactionPlanResultContext>;
        }>
    >[];
}> & { divisible: false };

Checks if the given transaction plan result is a non-divisible SequentialTransactionPlanResult.

A non-divisible sequential result indicates that the transactions were executed atomically — usually in a transaction bundle.

Parameters

ParameterTypeDescription
planTransactionPlanResultThe transaction plan result to check.

Returns

plan is Readonly<{ divisible: boolean; kind: "sequential"; plans: TransactionPlanResult<TransactionPlanResultContext, Readonly<{ kind: "single"; message: TransactionMessage & TransactionMessageWithFeePayer<string>; status: TransactionPlanResultStatus<TransactionPlanResultContext> }>>[] }> & { divisible: false }

true if the result is a non-divisible sequential transaction plan result, false otherwise.

Example

const result: TransactionPlanResult = nonDivisibleSequentialTransactionPlanResult([resultA, resultB]);
 
if (isNonDivisibleSequentialTransactionPlanResult(result)) {
  // Transactions were executed atomically.
}

See

On this page