assertIsNonDivisibleSequentialTransactionPlanResult

function assertIsNonDivisibleSequentialTransactionPlanResult(
    plan,
): asserts plan is Readonly<{
    divisible: boolean;
    kind: 'sequential';
    plans: TransactionPlanResult<
        TransactionPlanResultContext,
        Readonly<{
            kind: 'single';
            message: TransactionMessage &
                TransactionMessageWithFeePayer<string>;
            status: TransactionPlanResultStatus<TransactionPlanResultContext>;
        }>
    >[];
}> & { divisible: false };

Asserts that the given transaction plan result is a non-divisible SequentialTransactionPlanResult.

A non-divisible sequential result indicates that the transactions were executed atomically — usually in a transaction bundle.

Parameters

ParameterTypeDescription
planTransactionPlanResultThe transaction plan result to assert.

Returns

asserts plan is Readonly<{ divisible: boolean; kind: "sequential"; plans: TransactionPlanResult<TransactionPlanResultContext, Readonly<{ kind: "single"; message: TransactionMessage & TransactionMessageWithFeePayer<string>; status: TransactionPlanResultStatus<TransactionPlanResultContext> }>>[] }> & { divisible: false }

Throws

Throws a SolanaError with code SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_TRANSACTION_PLAN_RESULT if the result is not a non-divisible sequential transaction plan result.

Example

const result: TransactionPlanResult = nonDivisibleSequentialTransactionPlanResult([resultA, resultB]);
 
assertIsNonDivisibleSequentialTransactionPlanResult(result);
// Transactions were executed atomically.

See

On this page