15 releases
new 0.8.8 | Jan 9, 2025 |
---|---|
0.8.7 | Dec 21, 2024 |
0.7.6 | Sep 24, 2024 |
0.2.1 | Sep 9, 2024 |
#612 in Authentication
989 downloads per month
Used in affinidi-messaging-helper…
285KB
6.5K
SLoC
Affinidi Messaging - Mediator Service
[[TOC]]
Overview
A DIDComm Messaging v2 mediator & relay service that listens to send &receive messages over https.
Dependencies
To run the mediator, it requires these packages that is also part of the Affinidi Messaging project.
- affinidi-messaging-didcomm - Affinidi Messaging DIDComm implementation, a modified version of didcomm-rust project.
- affinidi-messaging-sdk - a Software Development Kit (SDK) to simplify the implementation of Affinidi Messaging into your application.
Prerequisites
To build and run this project, you need to set up the following:
- Install Rust on your machine if you haven't installed it yet using this guide.
- Install Docker on your machine if you haven't installed it yet using this guide. We will need this to run Redis instance for the mediator.
Running affinidi-messaging-mediator service
-
Run Redis docker container using the command below:
docker run --name=redis-local --publish=6379:6379 --hostname=redis --restart=on-failure --detach redis:latest
-
Run
setup_environment
to configure the mediator with all the required information to run locally.You must run the following from the top-level directory of
affinidi-messaging
cargo run --bin setup_environment
This will generate:
- Mediator DID and secrets
- Administration DID and secrets
- SSL Certificates for local development/testing
-
Start
affinidi-messaging-mediator
service via:cd affinidi-messaging-mediator export REDIS_URL=redis://@localhost:6379 cargo run
Examples
NOTE: Ensure Mediator is configured and running before using the following examples.
Mediator Specific Examples
- Mediator Administration
You can add/remove/list administration accounts easily using the mediator_administration example
cargo run --bin mediator_administration
Affinidi Messaging Examples
Refer to affinidi-messaging-sdk - Examples.
Dependencies
~178MB
~3.5M SLoC