com.r3corda.core.contracts / kotlin.collections.List

Extensions for kotlin.collections.List

filterStatesOfType fun <T : ContractState> List<StateAndRef<ContractState>>.filterStatesOfType(): List<StateAndRef<T>>

Filters a list of StateAndRef objects according to the type of the states

getTimestampBy fun List<AuthenticatedObject<CommandData>>.getTimestampBy(timestampingAuthority: Party): TimestampCommand?

Returns a timestamp that was signed by the given authority, or returns null if missing.

getTimestampByName fun List<AuthenticatedObject<CommandData>>.getTimestampByName(vararg names: String): TimestampCommand?

Returns a timestamp that was signed by any of the the named authorities, or returns null if missing. Note that matching here is done by (verified, legal) name, not by public key. Any signature by any party with a name that matches (case insensitively) any of the given names will yield a match.