closeTransactions builds the next round of unsigned transactions. Most accounts close in one transaction. An exchange adds the mediator transfer, and claimable balances, an aggregator swap, or more than 100 operations force additional transactions.
Working through a round
- Sort
transactionsbyorder. - Verify each transaction against your own inputs.
- Sign it, then submit it and wait for confirmation. If
needsSponsoredFeeis true, route the signed envelope throughfeeBumpSponsorfirst. - If
remaining.requiresAnotherCallis true, callcloseTransactionsagain.
planHash describes the state that round was built from; once a round’s transactions confirm, the next call’s state differs on purpose, so it carries no planHash.
Each transaction carries id, order, dependsOn, xdr, networkPassphrase, validUntilLedger, and an intent summary. The intent is the API’s description of the transaction. Treat it as a label for display, never as proof of what the XDR does.