isSequentialTransactionPlan

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

Checks if the given transaction plan is a SequentialTransactionPlan.

Parameters

ParameterTypeDescription
planTransactionPlanThe transaction plan to check.

Returns

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

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

Example

const plan: TransactionPlan = sequentialTransactionPlan([messageA, messageB]);
 
if (isSequentialTransactionPlan(plan)) {
  console.log(plan.divisible); // TypeScript knows this is a SequentialTransactionPlan.
}

See

On this page