meeting_place_core 0.0.1-dev.42
meeting_place_core: ^0.0.1-dev.42 copied to clipboard
The core Meeting Place package that implements Control Plane API and Mediator capabilities, including multi-identity management for enhanced privacy and anonymity.
Core SDK Examples #
Check the sample code to learn how to use the Affinidi Meeting Place - Core SDK package to discover, connect, and communicate with others using Decentralised Identifiers (DIDs), DIDComm v2.1, and Matrix.
| File path | What it demonstrates |
|---|---|
| group/alice.dart | Publishes a group offer, provisions the owner Matrix user via JWT login, creates the shared Matrix room, and receives the joining member before approval. |
| group/bob.dart | Finds and accepts the group offer, provisions the member Matrix user via JWT login, receives the shared room ID over DIDComm, and joins the room after approval. |
| offer/alice.dart | Publishes connection offer (invitation) and approve connection request after the offer was accepted. initialises the chat. |
| offer/bob.dart | Finds and accepts the connection offer, sends notification about acceptance of the connection request. initialises the chat. |
| oob/alice.dart | Creates an out-of-band flow and waits for the other party to connect. |
| oob/bob.dart | Accepts the out-of-band flow shared by Alice. |
| outreach/alice.dart | Publishes an outreach invitation. |
| outreach/bob.dart | Finds and accepts the outreach invitation. |
| media/alice.dart | Publishes a connection offer, approves Bob's request, and once the channel is inaugurated sends a small file as a media message on the resulting Matrix channel. |
| media/bob.dart | Accepts Alice's offer, waits for the offer-finalised event (which joins the Matrix room), then downloads the media she posted using MatrixEventMediaReference. |
Running the Examples #
Execute the example Dart scripts from the
packages/meeting_place_core/example folder. To run them, you need to
provide environment variables for CONTROL_PLANE_DID, MEDIATOR_DID,
MATRIX_HOMESERVER, and VODOZEMAC_LIBRARY_PATH. The examples use the
dotenv package to load these values from a
local .env file for convenience.
-
Create your local environment file
Run this command in your terminal to copy the template and create
.envin the root of theexamplefolder:cp templates/.example.env .envEdit
.envand update the values forCONTROL_PLANE_DID,MEDIATOR_DID,MATRIX_HOMESERVER, andVODOZEMAC_LIBRARY_PATHto match your test environment.VODOZEMAC_LIBRARY_PATHmust point to the directory containing your compiled vodozemac native library. -
Run the example scripts
You can now run the examples directly using Dart:
# Offer example dart run offer/alice.dart dart run offer/bob.dart# OOB example dart run oob/alice.dart dart run oob/bob.dart# Group example dart run group/alice.dart dart run group/bob.dart# Outreach example dart run outreach/alice.dart dart run outreach/bob.dart# Media example (run after the OOB flow completes) dart run media/alice.dart dart run media/bob.dartThe example utilities will automatically load variables from
.envin the root of the example folder.
Notes:
- The
.envfile should be placed in the root of the example folder as.env. - The template file is provided at
templates/.example.envfor convenience. - If
.envis missing, the code will fall back to environment variables from the platform (useful for CI or manual export).