aries / net.globalid.aries.features.connection / ConnectionService / createInvitation

createInvitation

abstract fun createInvitation(agent: Agent, recordId: String?): Single<Pair<SentInvitation, ConnectionInvitationMessage>>

Create invitation for connection. The recipient key in the invitation is the invitation key we have generated. We get the service endpoint, routing keys and the label from the provisioning record of the agent.

Parameters

agent - for which to execute the action

recordId - is an ID of an already existing invitation record. If supplied, this will recreate the ConnectionInvitationMessage. Otherwise, a new record and a new message will be created.

Return
Single of a Pair of ConnectionRecord.SentInvitation and ConnectionInvitationMessage, the connection record representing the invitation message and the actual message.