isNonDivisibleSequentialTransactionPlan

function isNonDivisibleSequentialTransactionPlan(
    plan,
): plan is Readonly<{
    divisible: boolean;
    kind: 'sequential';
    plans: TransactionPlan[];
    planType: 'transactionPlan';
}> & { divisible: false };

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

A non-divisible sequential plan requires all its transaction messages to be executed atomically — usually in a transaction bundle.

Parameters

ParameterTypeDescription
planTransactionPlanThe transaction plan to check.

Returns

plan is Readonly<{ divisible: boolean; kind: "sequential"; plans: TransactionPlan[]; planType: "transactionPlan" }> & { divisible: false }

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

Example

const plan: TransactionPlan = nonDivisibleSequentialTransactionPlan([messageA, messageB]);
 
if (isNonDivisibleSequentialTransactionPlan(plan)) {
  // All transaction messages must be executed atomically.
}

See

On this page