@JsonClass(true) data class ConnectionInvitationMessage : AgentMessage
Connection invitation message
Read more here
represents a message with Public Invitation DID (other fields are null) example: "did": "did:sov:QmWbsNYhMrjHiqZDTUTEJs" or represents a message with Keys and URL endpoints (did is null) example: "serviceEndpoint": "https://example.com/endpoint" or represents a message with Keys and DID Service Endpoint Reference (did is null) example: "serviceEndpoint": "did:sov:A2wBhNYhMrjHiqZDTUYH7u;routeid"
<init> |
Connection invitation message ConnectionInvitationMessage(label: String?, imageUrl: String? = null, did: String? = null, serviceEndpoint: String?, routingKeys: List<String>?, recipientKeys: List<String>?) |
did |
is the public invitation DID. In this case serviceEndpoint, routingKeys and recipientKeys are null val did: String? |
imageUrl |
is an optional image URL for connection invitation. val imageUrl: String? |
label |
a invitation label (e.g. our name) val label: String? |
recipientKeys |
are the keys that represent the creator of the invitation. With this key(s), we can connect an invitation with a request. val recipientKeys: List<String>? |
routingKeys |
are keys which the invitee will have to use to send a connection request message back to us. val routingKeys: List<String>? |
serviceEndpoint |
is currently considered as an URL endpoint val serviceEndpoint: String? |
addThread |
Adds the thread decorator with threadId to the current message fun AgentMessage.addThread(threadId: String): Unit |
getThreadId |
Returns the message thread id fun AgentMessage.getThreadId(): String |
toOutboundContext |
Returns an OutboundMessageContext constructed from an AgentMessage and a given ConnectionRecord. This only puts the connection ID in the context. fun AgentMessage.toOutboundContext(connection: ConnectionRecord): Single<OutboundMessageContext>
Returns an OutboundMessageContext constructed from an AgentMessage and a given ConnectionContext. The connection context from the record is checked and the corresponding outbound context is constructed. fun AgentMessage.toOutboundContext(connectionContext: ConnectionContext): Single<OutboundMessageContext> |
toOutboundMessage |
Returns an OutboundMessage constructed from an AgentMessage and a given ConnectionRecord. The outbound message might not be constructable, based on the state of the record. In that case, an error is returned. fun AgentMessage.toOutboundMessage(record: ConnectionRecord): Single<OutboundMessage>
Returns an OutboundMessage constructed from an AgentMessage and a given ServiceDecorator. In this case, the message can always be constructed as the decorator contains all the needed data. We generate a new key pair for this message so that the receiver can send a response (it needs to be encrypted with our public/verification key). fun AgentMessage.toOutboundMessage(agent: Agent, serviceDecorator: ServiceDecorator): Single<OutboundMessage> |