holdingsSummary

suspend fun holdingsSummary(ownerPartyIds: List<String>, asOf: Instant? = null, migrationId: Long? = null): ScanClient.HoldingsSummaryResult?

Server-side aggregated Amulet balances for ownerPartyIds (/v1/holdings/summary) — scan folds its ACS snapshot so apps don't fold the full ACS client-side.

Snapshot semantics — not real-time: scan persists ACS snapshots on a fixed cadence (hours apart on typical deployments) and this read answers from the most recent snapshot at or before asOf. Fresh taps and transfers appear only once the next snapshot lands; HoldingsSummaryResult.recordTime says exactly which snapshot answered. Amounts are amulet initial amounts — holding fees accrued since creation are not deducted.

Return

the snapshot-backed totals, or null if scan has no ACS snapshot at or before asOf for that migration id (e.g. a freshly-bootstrapped network that hasn't taken one yet).

Parameters

ownerPartyIds

the owners to aggregate; must not be empty. Parties that held nothing at the snapshot are absent from the result.

asOf

answer from the latest snapshot at or before this instant (default: now).

migrationId

the synchronizer-migration id whose snapshots to read; defaults to the network's latest via latestMigrationId.