#did #ssi #affinidi #atm #send-receive

bin+lib affinidi-messaging-mediator

DIDComm Mediator service for Affinidi Messaging

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

Download history 268/week @ 2024-09-18 117/week @ 2024-09-25 16/week @ 2024-10-02 11/week @ 2024-10-09 10/week @ 2024-10-16 3/week @ 2024-10-30 3/week @ 2024-11-06 1/week @ 2024-11-13 2/week @ 2024-11-20 192/week @ 2024-12-11 758/week @ 2024-12-18 22/week @ 2024-12-25 17/week @ 2025-01-01

989 downloads per month
Used in affinidi-messaging-helper…

Apache-2.0

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.

  1. affinidi-messaging-didcomm - Affinidi Messaging DIDComm implementation, a modified version of didcomm-rust project.
  2. 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:

  1. Install Rust on your machine if you haven't installed it yet using this guide.
  2. 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

  1. Run Redis docker container using the command below:

    docker run --name=redis-local --publish=6379:6379 --hostname=redis --restart=on-failure --detach redis:latest
    
  2. 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
  3. 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

  1. 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