MediationHandler

An interface representing a mediator handler for handling mediator routing in the DIDComm protocol. The MediatorHandler protocol defines methods and properties for booting registered mediators, achieving mediation, updating key lists, picking up unread messages, and registering messages as read.

Inheritors

Properties

Link copied to clipboard
abstract val mediator: Mediator?

The active mediator associated with the mediator handler

Link copied to clipboard
abstract val mediatorDID: DID

The DID of the mediator associated with the mediator handler

Functions

Link copied to clipboard
abstract fun achieveMediation(host: DID): Flow<Mediator>

Achieves mediation with the mediatorDID with the specified host DID as a user.

Link copied to clipboard
abstract suspend fun bootRegisteredMediator(): Mediator?

Boots the registered mediator associated with the mediator handler.

Link copied to clipboard
abstract suspend fun listenUnreadMessages(serviceEndpointUri: String, onMessageCallback: OnMessageCallback)

Listens for unread messages from a specified WebSocket service endpoint.

Link copied to clipboard

Picks up the specified number of unread messages.

Link copied to clipboard
abstract suspend fun registerMessagesAsRead(ids: Array<String>)

Registers the specified message IDs as read.

Link copied to clipboard
abstract suspend fun updateKeyListWithDIDs(dids: Array<DID>)

Updates the key list with the specified DIDs.