Affinidi Portal (Affinidi-hosted)

Affinidi offers a fully managed, hosted Control Plane to discover and seucrely connect indidvulas, business and agents.

You can deploy with customizable configurations and choose from predefined appliance sizes to match your workload (e.g., development, small, medium, large ) through Affinidi Portal.

To get started, log in to the Affinidi Portal and follow these steps.

1. Create Control Plane configuration

  1. Log in to the Affinidi Portal and select the project where you want to set up the Control Plane. If you are new to the Affinidi Portal, it automatically creates a default project for you.

  2. Go to Affinidi Meeting Place in the left sidebar, then click Create configuration.

Affinidi Portal - Meeting Place

Create Meeting Place Configuration page

  1. Set the following details to create the instance.
FieldDescription
NameThe name for your Control Plane instance. If left blank, one will be autogenerated.
Description
[Optional]
A short note on the purpose of creating the control plane instance
Appliance sizeThe size of the server to be created. Provide options such as Dev, Small, Medium, Large depending your workload requirements. You can’t update this field after creating the configuration.

Review your settings for the Control Plane configuration and click on Create. Deployment typically takes 2-5 minutes.

Once deployment is complete, Affinidi Portal displays the following details required to integrate with the Affinidi Meeting Place.

FieldDescription
Control Plane DIDThe Decentralised Identifier (DID) assigned to the control plane to enable discovery and creation of secure channels. You can use this to connect to the control plane via Meeting Place SDK.
Control Plane URLThe endpoint containing information about the Control Plane API Server. You can use this URL to connect to the Control Plane API server via REST API.

When the Deployment Status on the config page of the Affinidi Portal shows Complete, open your Control Plane URL in a browser.

You should see a confirmation page indicating your instance is active.

Meeting Place App

Control Plane API Server

2. Test Control Plane connection

You have two options to test the Control Plane server you just created.

2.1 Using Affinidi Control Plane SDK for Dart

To test using the Control Plane SDK, follow the steps below.

You also need to setup a DIDComm Mediator to proceed with the testing via Control Plane SDK.

2.1.1. Set up environment

  1. Install Dart SDK version ^3.6.0 on your machine.

  2. Create a dart project repository by running the command below.

dart create my_project_name
  1. Add the Control Plane SDK and SSI dart packages.
dart pub add meeting_place_control_plane dart pub add ssi

2.1.2. Create a Dart script

  1. Create a controlPlane.dart file with the following code.
import 'package:meeting_place_control_plane/meeting_place_control_plane.dart'; import 'package:ssi/ssi.dart'; void main() async { // Create a persistent wallet final wallet = PersistentWallet(InMemoryKeyStore()); // Create a DIDManager final didManager = DidKeyManager( wallet: wallet, store: InMemoryDidStore(), ); await didManager.addVerificationMethod( (await wallet.generateKey()).id, ); // Set your Control Plane DID final controlPlaneDid = '<REPLACE_CONTROLPLANE_DID>'; // Set your Mediator DID final mediatorDid = '<REPLACE_MEDIATOR_DID>'; // Create an instance of ControlPlaneSDK final sdk = ControlPlaneSDK( didManager: didManager, controlPlaneDid: controlPlaneDid, mediatorDid: mediatorDid, didResolver: UniversalDIDResolver(), ); // Create an authenticate command final command = AuthenticateCommand(controlPlaneDid: controlPlaneDid); // Test using the Authenticate Command final result = await sdk.execute(command); // Display the Command Result print("Generated Access Token: ${result.credentials.accessToken}"); }
  1. Replace the controlPlaneDid variable with the Control Plane DID generated from the Affinidi Portal.

You also need to set the Mediator DID variable.

final controlPlaneDid = 'did:web:<UNIQUE_ID>:mpx.affinidi.io'; final mediatorDid = 'did:web:<UNIQUE_ID>.atlas.affinidi.io:.well-known';

2.1.3. Run the Test Script

After setting up all the necessary codes and parameters, run the Dart script.

dart run controlPlane.dart

After running the script, the logs should display the access token generated after executing the Authentication Command.

2.2. Using REST API

To test the Control Plane using REST API, run the command below in your terminal:

Replace the <REPLACE_CONTROLPLANE_URL> with the generated Control Plane URL.

curl -X POST \ -H "Content-Type: application/json" \ -d '{"did": "did:peer:<UNIQUE_ID>"}' \ <REPLACE_CONTROLPLANE_URL>/v1/authenticate/challenge

Running the command should return result like below:

{"challenge":"<JWT>"}

This means that the API Server is able to respond via REST API.

For more details about how you can use REST API, you may refer to the Control Plane OSS repository.

What’s next

  Integrate Affinidi Meeting Place into your applications

  Configure DIDComm Mediator to send messages