parallelInstructionPlan

function parallelInstructionPlan(plans): ParallelInstructionPlan;

Creates a ParallelInstructionPlan from an array of nested plans.

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

Parameters

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

Returns

ParallelInstructionPlan

Examples

Using explicit {@link SingleInstructionPlan | SingleInstructionPlans}.

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

Using {@link Instruction | Instructions} directly.

const plan = parallelInstructionPlan([instructionA, instructionB]);

See

ParallelInstructionPlan

On this page