core.node.services / IdentityService

IdentityService

interface IdentityService

An identity service maintains an bidirectional map of Partys to their associated public keys and thus supports lookup of a party given its key. This is obviously very incomplete and does not reflect everything a real identity service would provide.



Functions

partyFromKey abstract fun partyFromKey(key: PublicKey): Party?
partyFromName abstract fun partyFromName(name: String): Party?
registerIdentity abstract fun registerIdentity(party: Party): Unit

Inheritors

InMemoryIdentityService class InMemoryIdentityService : IdentityService

Simple identity service which caches parties and provides functionality for efficient lookup.

MockIdentityService class MockIdentityService : IdentityService

Scaffolding: a dummy identity service that just expects to have identities loaded off disk or found elsewhere. This class allows the provided list of identities to be mutated after construction, so it takes the list lock when doing lookups and recalculates the mapping each time. The ability to change the list is used by the MockNetwork code.