corda / / sumAmountsDue


fun <P : AbstractParty, T : Any> sumAmountsDue(balances: Map<<ERROR CLASS><P, P>, Amount<T>>): Map<P, Long>

Calculate the total balance movement for each party in the transaction, based off a summary of balances between each obligor and beneficiary.


balances - payments due, indexed by obligor and beneficiary. Zero balances are stripped from the map before being returned.

P - type of party to operate on.

T - token that balances represent