getAllSingleTransactionPlans
Retrieves all individual SingleTransactionPlan instances from a transaction plan tree.
This function recursively traverses any nested structure of transaction plans and extracts all the single transaction plans they contain. It's useful when you need to access all the actual transaction messages that will be executed, regardless of their organization in the plan tree (parallel or sequential).
Parameters
Parameter | Type | Description |
---|---|---|
transactionPlan | TransactionPlan | The transaction plan to extract single plans from |
Returns
Readonly
<{
kind
: "single"
;
message
: Readonly
<{
instructions
: readonly Instruction
<string
, readonly (/api/functions/
| AccountLookupMeta
<..., ...>
| AccountMeta
<...>)[]>[];
version
: TransactionVersion
;
}> & TransactionMessageWithFeePayer
<string
>;
}>[]
An array of all single transaction plans contained in the tree