Control Plane
Install Dependency
Package: meeting_place_control_plane
dart pub add meeting_place_control_planeCheck the latest version on the pub.dev registry or view the source on GitHub.
Classes and Methods
ControlPlaneSDK
The ControlPlaneSDK provides the libraries to enable the discovery of other participants to establish a connection and communicate securely. It enables participants to publish a connection offer to allow other participants to communicate directly or through group chat. Through discovery, organisations and AI agents can publish their connection offers to allow users to connect and start using their services.
To create an instance of ControlPlaneSDK, you can use its generative constructor.
// create instance
final controlPlaneSDK = ControlPlaneSDK(
didManager: didManager,
controlPlaneDid: '<YOUR-CONTROL-PLANE-DID>',
mediatorDid: '<YOUR-MEDIATOR-DID>',
didResolver: didResolver,
controlPlaneSDKConfig: ControlPlaneSDKOptions(
maxRetries: 5,
maxRetriesDelay: Duration(seconds: 2),
connectTimeout: Duration(seconds: 10),
receiveTimeout: Duration(seconds: 10),
),
);execute
Executes a command by dispatching it to the appropriate handler based on the provided DiscoveryCommand, and returns the result as a generic type corresponding to the command.
Parameters
command
DiscoveryCommand<T>
RequiredDiscoveryCommand is dispatched to its corresponding handler, which processes the command and returns a result of the expected type. See the list of available Discovery Commands below for more details.Example
import 'package:meeting_place_control_plane/meeting_place_control_plane.dart';
// create an instance of DiscoverySDK
final ControlPlaneSDK controlPlaneSDK = ControlPlaneSDK(
...
);
// execute AcceptOfferCommand
final result = await controlPlaneSDK.execute(
AcceptOfferCommand(
mnemonic: mnemonic,
device: device,
offerLink: offerLink,
contactCard: contactCard,
acceptOfferDid: acceptOfferDid)
);List of Discovery Commands
AcceptOfferCommand
The command for accepting a connection offer from another participant. This command initiates the acceptance process, which establishes a secure communication channel between the accepting user and the offer publisher. Upon successful execution, both parties can begin secure messaging and data exchange.
Parameters
mnemonic
string
RequiredUuid().v4();.device
object
RequireddeviceToken [string] and platformType [object].offerLink
string
RequiredcontactCard
ContactCard
RequiredacceptOfferDid
string
RequiredAcceptOfferGroupCommand
The command for accepting a group offer from another participant. This command initiates the process of joining an existing group chat, establishing a secure connection with the group and enabling the user to participate in group messaging and communication.
Parameters
mnemonic
string
RequiredUuid().v4();.device
object
RequireddeviceToken [string] and platformType [object].offerLink
string
RequiredcontactCard
ContactCard
RequiredacceptOfferDid
string
RequiredAuthenticateCommand
The command to authenticate with the Meeting Place service. This command validates the control plane DID and establishes the necessary credentials to perform operations such as registering offers, accepting connections, and managing group communications.
Parameters
controlPlaneDid
string
RequiredCreateOobCommand
The command to create an Out-Of-Band invitation. This command generates an OOB invitation message that can be shared with other participants through external channels (email, QR codes, etc.) to initiate secure connection establishment.
Parameters
oobInvitationMessage
object
RequiredmediatorDid
string
OptionalDeletePendingNotificationsCommand
The command to delete pending notifications. This command removes notifications that are no longer needed or have been processed, helping to keep the notification queue clean and manageable.
Parameters
device
object
RequireddeviceToken [string] and platformType [object].notificationIds
List<String>
RequiredDeregisterNotificationCommand
The command to deregister notifications. This command is used to remove a notification token from the system.
Parameters
notificationToken
string
RequiredDeregisterOfferCommand
The command to deregister an offer. This command is used to remove a previously registered offer from the system.
Parameters
offerLink
string
Requiredmnemonic
string
RequiredUuid().v4();.FinaliseAcceptanceCommand
The command to finalise the acceptance of an offer. This command is used to complete the process of accepting an offer and establishing a connection.
Parameters
mnemonic
string
RequiredUuid().v4();.offerLink
string
RequiredofferPublishedDid
string
RequiredotherPartyAcceptOfferDid
string
RequiredotherPartyPermanentChannelDid
string
Requireddevice
object
RequireddeviceToken [string] and platformType [object].contactCard
ContactCard
OptionalGetOobCommand
The command to fetch the Out-Of-Band invitation information. This command is used to retrieve the details of an OOB invitation using its unique identifier.
Parameters
oobId
string
RequiredGetPendingNotificationsCommand
The command to fetch pending notifications. This command is used to retrieve notifications that are awaiting processing.
Parameters
device
object
RequireddeviceToken [string] and platformType [object].onChatActivityCallback
function
OptionalGroupAddMemberCommand
The command to add a member to a group. This command is used to include a new participant in an existing group chat.
Parameters
mnemonic
string
RequiredUuid().v4();.groupId
string
RequiredmemberDid
string
RequiredacceptOfferDid
string
RequiredofferLink
string
RequiredpublicKey
string
RequiredreencryptionKey
string
RequiredcontactCard
ContactCard
OptionalGroupDeleteCommand
The command to delete a group. This command is used to remove an existing group chat.
Parameters
groupId
string
RequiredGroupDeregisterMemberCommand
The command to remove a member in a group. This command is used to remove a participant from an existing group chat.
Parameters
groupId
string
RequiredmemberId
string
Requiredmessage
object
RequiredGroupSendMessageCommand
The command to send a message to a group. This command is used to send a message to all members of a group chat.
Parameters
offerLink
string
RequiredfromDid
string
RequiredgroupDid
string
Requiredmessage
object
RequiredincreaseSequenceNumber
bool
Requirednotify
bool
Requiredephemeral
bool
RequiredforwardExpiryInSeconds
int
OptionalNotifyAcceptanceCommand
The command to notify that the offer has been accepted. This command is used to inform the offer publisher that their offer has been accepted by another participant.
Parameters
mnemonic
string
RequiredUuid().v4();.acceptOfferDid
string
RequiredofferLink
string
RequiredNotifyAcceptanceGroupCommand
The command to notify that the offer to join a group has been accepted. This command is used to inform the group offer publisher that their offer has been accepted by another participant.
Parameters
mnemonic
string
RequiredUuid().v4();.acceptOfferDid
string
RequiredofferLink
string
RequiredNotifyChannelCommand
The command to notify a channel. This command is used to send a notification to a specific communication channel, typically to alert participants about events, messages, or status changes within the Meeting Place system.
Parameters
notificationToken
string
Requireddid
string
Requiredtype
string
RequiredQueryOfferCommand
The command to query an offer. This command is used to retrieve information about a specific offer.
Parameters
mnemonic
string
RequiredUuid().v4();.RegisterDeviceCommand
The command to register a device. This command is used to register a user’s device for receiving notifications.
Parameters
deviceToken
string
RequiredplatformType
object
RequiredRegisterNotificationCommand
The command to register notification. This command is used to register a notification token to enable notifications between two specific participants in a communication channel.
Parameters
myDid
string
RequiredtheirDid
string
Requireddevice
object
RequireddeviceToken [string] and platformType [object].RegisterOfferCommand
The command to register an offer. This command is used to create and publish a connection offer that other participants can claim to establish a secure connection.
Parameters
offerName
string
RequiredcontactCard
ContactCard
Requireddevice
object
RequireddeviceToken [string] and platformType [object].oobInvitationMessage
object
RequiredofferDescription
string
OptionalvalidUntil
DateTime
OptionalmaximumUsage
int
OptionalcustomPhrase
string
OptionalmediatorDid
string
OptionalRegisterOfferGroupCommand
The command to register a group offer. This command is used to create and publish a connection offer for joining a group chat that other participants can claim to establish a secure connection.
Parameters
offerName
string
RequiredcontactCard
ContactCard
Requireddevice
object
RequireddeviceToken [string] and platformType [object].oobInvitationMessage
object
RequiredofferDescription
string
OptionalvalidUntil
DateTime
OptionalmaximumUsage
int
OptionalcustomPhrase
string
OptionalmediatorDid
string
OptionalmediatorEndpoint
string
OptionalmediatorWSSEndpoint
string
Optionalmetadata
string
OptionaladminDid
string
OptionaladminPublicKey
string
OptionaladminReencryptionKey
string
OptionalValidateOfferPhraseCommand
The command to validate the offer phrase. This command is used to check if a given phrase is valid for an offer.
Parameters
phrase
string
RequiredGlad to hear it! Please tell us how we can improve more.
Sorry to hear that. Please tell us how we can improve.
Thank you for sharing your feedback so we can improve your experience.