Mediator
Last updated
Last updated
A mediator is an essential piece of Decentrl protocol, as it enables communication between identities by mediating their encrypted messages.
As with any other participant in the Decentrl network, mediators can be identified by their DIDs which resolve to their DID documents.
Mediator DID example
Resolves to DID document
In order for identity to use a mediator, they have to register first using the DecentrlMediatorRegister service endpoint (). Once identity is registered on the mediator, they can add DecentrlMediatorClient service to their services array in their DID document. By doing that they are basically telling other network participants that they have registered on the said mediator and if anyone wants to send them a message, they can do it through it.
It is highly encouraged for each DID to use multiple mediators, as it will increase the delivery rate in case one mediator goes down. Mediators should also not be relied upon for storage and fetching of old messages, as they do not guarantee old message persistence. Once the client receives a message from the mediator, it should be stored locally or on a third-party service specialized for encrypted data storage.
When sending a message to another DID, the message should be sent to as many mediators that DID have registered as possible to decrease the chance of the message not being delivered.
Mediators support multiple ways of communication with other DIDs
All messages are encrypted
Messages only have one recipient
With this feature registered on the mediator and shown on your DID document, anyone with access to your DID document will be able to send you a message.
Messages are public and can be fetched by anyone who asks your mediator for your public messages
Messages should be in JWS format to prove the integrity of the message
With this feature registered on the mediator and shown on your DID document, anyone will be able to fetch your public messages from the mediator but will not be able to send you a message, unless you have a private two-way communication feature also enabled on the mediator.
Public two-way communication (TBD)
Copies most public one-way communication
Adds the ability for other identities to react and reply to your public posts
To enable group communication, a group has to be registered on the mediator.
Each group has its own DID and DID document in which the group public key and mediators on which the group is registered are shown
The group DID document is not resolvable by the DID but should rather be passed to mediators when registering and to group members upon invitation.
The group communication is encrypted using the EC P-256 AES256-GCM algorithm. The private encryption key should be shared with the group members upon invitation.
Anyone who has a copy of the group DID document, the group's private encryption key, and who's DID is listed under the participant's array in the DID document can participate in group communication
The DID is made per modified . Specification for the group DID method can be