groupPublicKeysByWellKnownParty - corda

corda / net.corda.core.identity / groupPublicKeysByWellKnownParty

# groupPublicKeysByWellKnownParty

`fun groupPublicKeysByWellKnownParty(serviceHub: ServiceHub, publicKeys: Collection<PublicKey>, ignoreUnrecognisedParties: Boolean): Map<Party, List<PublicKey>>`

Group each PublicKey by the well known party using the ServiceHub.identityService, in preparation for creating FlowSessions, for example.

### Parameters

`publicKeys` - the PublicKeys to group.

`ignoreUnrecognisedParties` - if this is false, throw an exception if some of the PublicKeys cannot be mapped to a Party.

Return
a map of well known Party to associated PublicKeys.

`fun groupPublicKeysByWellKnownParty(serviceHub: ServiceHub, publicKeys: Collection<PublicKey>): Map<Party, List<PublicKey>>`

Group each PublicKey by the well known party using the ServiceHub.identityService, in preparation for creating FlowSessions, for example. Throw an exception if some of the PublicKeys cannot be mapped to a Party.

### Parameters

`publicKeys` - the PublicKeys to group.

Return
a map of well known Party to associated PublicKeys.