Description
After a transaction is submitted, its effects (balance changes, offer fills, trust line creations) are scattered across multiple Horizon /effects pages. The SDK surfaces raw operation records but does not aggregate the net effect across all operations in a transaction, making it difficult for callers to show a simple "what changed" summary. An effect aggregator should consolidate all effects into a per-account balance delta summary.
Technical Context
Add src/effectAggregator.ts. Uses @stellar/stellar-sdk Server.operations() with includeFailed: false and .effects() sub-resource to fetch effects per operation. Produces AccountEffectSummary[] in src/types.ts. Integrates with src/receipt.ts to attach the effect summary to PaymentReceipt. Uses src/horizonPaginator.ts to walk all effect pages.
Acceptance Criteria
Description
After a transaction is submitted, its effects (balance changes, offer fills, trust line creations) are scattered across multiple Horizon
/effectspages. The SDK surfaces raw operation records but does not aggregate the net effect across all operations in a transaction, making it difficult for callers to show a simple "what changed" summary. An effect aggregator should consolidate all effects into a per-account balance delta summary.Technical Context
Add
src/effectAggregator.ts. Uses@stellar/stellar-sdkServer.operations()withincludeFailed: falseand.effects()sub-resource to fetch effects per operation. ProducesAccountEffectSummary[]insrc/types.ts. Integrates withsrc/receipt.tsto attach the effect summary toPaymentReceipt. Usessrc/horizonPaginator.tsto walk all effect pages.Acceptance Criteria
aggregateEffects(txHash: string): Promise<AccountEffectSummary[]>returns one summary per affected account with{ accountId, assetDeltas: { asset, delta }[] }effectSummarytoPaymentReceiptinsrc/receipt.tswhenincludeEffects: trueis set in config