sequentialTransactionPlan

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

Creates a divisible SequentialTransactionPlan from an array of nested plans.

It can accept TransactionMessage objects directly, which will be wrapped in SingleTransactionPlans automatically.

Parameters

ParameterType
plans( | Readonly<{ instructions: readonly Instruction<string, readonly (/api/functions/ | AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]; version: TransactionVersion; }> & TransactionMessageWithFeePayer<string> | TransactionPlan)[]

Returns

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

Examples

Using explicit SingleTransactionPlans.

const plan = sequentialTransactionPlan([
  singleTransactionPlan(messageA),
  singleTransactionPlan(messageB),
]);

Using TransactionMessages directly.

const plan = sequentialTransactionPlan([messageA, messageB]);

See

SequentialTransactionPlan

On this page