everyTransactionPlan
Checks if every transaction plan in the tree satisfies the given predicate.
This function performs a depth-first traversal through the transaction plan tree,
returning true only if the predicate returns true for every plan in the tree
(including the root plan and all nested plans).
Parameters
| Parameter | Type | Description |
|---|---|---|
transactionPlan | TransactionPlan | The transaction plan tree to check. |
predicate | (plan) => boolean | A function that returns true if the plan satisfies the condition. |
Returns
boolean
true if every plan in the tree satisfies the predicate, false otherwise.
Examples
Checking if all plans are divisible.
Checking if all single plans have a specific fee payer.