sealed class OutboundMessageContext
Represents an outbound agent message with additional context. An outbound message must be associated with some "connection context" to know which keys to use for encryption and where to send the packed message.
Connection |
An OutboundMessageContext that relates an agent message to a connection backed by a connection record (from the wallet). data class Connection : OutboundMessageContext |
Service |
An OutboundMessageContext that relates an agent message to a service decorator. This message doesn't have a permanent connection associated with it and the receiver can only verify the integrity of the message, but the sender is unknown. data class Service : OutboundMessageContext |
message |
is the (unpacked) agent message. abstract val message: AgentMessage |
toOutboundMessage |
Returns an OutboundMessage constructed from an OutboundMessageContext. Based on the connection context, above functions are called. fun OutboundMessageContext.toOutboundMessage(agent: Agent, connectionService: ConnectionService): Single<OutboundMessage> |