Axinom Mosaic Libraries
    Preparing search index...
    • Retrieves a public key for specific service ID and version. If not available in the cache - cache is updated using cachePublicSigningKeys and cache is checked again. If even still there is no matching key - error is thrown, because at this point, if there is a need to validate the received event - it is expected for the service that produced said event to register its own public key with the Key Service.

      Parameters

      • serviceId: string

        ID of the service that signed event originated from

      • version: number

        Version of the public key of the service that signed event originated from

      • builders: RascalConfigBuilder[]

        Used to determine which events the service is expecting to receive. Passing a list of all builders used by setupMessagingBroker is recommended.

      • keyServiceBaseUrl: string

        Base URL of Mosaic Key Service

      • getTokenCallback: GetEventSigningTokenFunc

        Function to retrieve authorization token result to make a request to the Key Service

      • Optionallogger: Logger

        Optional instance of the Mosaic Logger. If not provided - new instance will be created and used by the function itself.

      Returns Promise<string>