aries_cloudagent.protocols.coordinate_mediation package



aries_cloudagent.protocols.coordinate_mediation.definition module

Version definitions for this protocol.

aries_cloudagent.protocols.coordinate_mediation.mediation_invite_store module

Storage management for configuration-provided mediation invite.

Handle storage and retrieval of mediation invites provided through arguments. Enables having the mediation invite config be the same for provision and starting commands.

class aries_cloudagent.protocols.coordinate_mediation.mediation_invite_store.MediationInviteRecord(invite: str, used: bool)[source]

Bases: NamedTuple

A record to store mediation invites and their freshness.

static from_json(json_invite_record: str) MediationInviteRecord[source]

a mediation invite record deserialized from a json string.

invite: str

Alias for field number 0

to_json() str[source]

The current record serialized into a json string.

static unused(invite: str) MediationInviteRecord[source]

invite – invite string as provided by the mediator.


An unused mediation invitation for the given invite string

used: bool

Alias for field number 1

class aries_cloudagent.protocols.coordinate_mediation.mediation_invite_store.MediationInviteStore(storage: BaseStorage)[source]

Bases: object

Store and retrieve mediation invite configuration.

MEDIATION_INVITE_ID = 'mediation_invite'
async get_mediation_invite_record(provided_mediation_invitation: Optional[str]) Optional[MediationInviteRecord][source]

Provide the MediationInviteRecord to use/that was used for mediation.

Returned record may have been used already.

Stored record is updated if provided_mediation_invitation has changed. Updated record is marked as unused.


provided_mediation_invitation – mediation invite provided by user


mediation invite to use/that was used to connect to the mediator. None if no invitation was provided/provisioned.

async mark_default_invite_as_used()[source]

Mark the currently stored invitation as used if one exists.


NoDefaultMediationInviteException – if trying to mark invite as used when there is no invite stored.

async store(mediation_invite: MediationInviteRecord) MediationInviteRecord[source]

Store the mediator’s invite for further use when starting the agent.

Update the currently stored invite if one already exists. This assumes a new invite and as such, marks it as unused.


mediation_invite – mediation invite url


stored mediation invite

exception aries_cloudagent.protocols.coordinate_mediation.mediation_invite_store.NoDefaultMediationInviteException[source]

Bases: Exception

Raised if trying to mark a default invite as used when none exist.