sequentialInstructionPlan

function sequentialInstructionPlan(plans): Readonly<{
    divisible: boolean;
    kind: 'sequential';
    plans: InstructionPlan[];
}> &
    object;

Creates a divisible SequentialInstructionPlan from an array of nested plans.

It can accept Instruction objects directly, which will be wrapped in SingleInstructionPlans automatically.

Parameters

ParameterType
plans(/api/functions/ | Instruction<string, readonly (/api/functions/ | AccountLookupMeta<string, string> | AccountMeta<string>)[]> | InstructionPlan)[]

Returns

Readonly<{ divisible: boolean; kind: "sequential"; plans: InstructionPlan[]; }> & object

Examples

const plan = sequentialInstructionPlan([
  singleInstructionPlan(instructionA),
  singleInstructionPlan(instructionB),
]);
const plan = sequentialInstructionPlan([instructionA, instructionB]);

See

SequentialInstructionPlan

On this page