abstract class Agent
This is a handle for everything related to an agent instance.
<init> |
This is a handle for everything related to an agent instance. Agent() |
options |
is the agent's options abstract val options: AgentOptions |
pool |
is the agent's pool for communication with the ledger abstract val pool: Pool |
wallet |
is the agent's wallet abstract val wallet: Wallet |
dispatch |
Dispatches the given message. The message comes with additional context containing information about the keys to use and the endpoint to send the packed message to. abstract fun dispatch(outboundContext: OutboundMessageContext): Completable |
dispatchAndAwait |
Dispatches the given message and awaits a response. The message comes with additional context containing information about the keys to use and the endpoint to send the packed message to. abstract fun dispatchAndAwait(outboundContext: OutboundMessageContext): Maybe<String> |
getProvisioningRecord |
Returns the provisioning record that belongs to this specific agent. The record holds the basic agent configuration. abstract fun getProvisioningRecord(): Single<ProvisioningRecord> |
process |
Processes the given packed message. First, the message is unpacked and based on the key, the corresponding connection record is found. We can then handle the message using the unpacked message context. abstract fun process(packedMessage: String): Single<MessageProcessResponse>
Processes the given agent message. Useful for messages that are not packed, e.g. connection invitation, credential offer from a QR code or some other source. abstract fun process(agentMessage: AgentMessage): Single<MessageProcessResponse> |
setProvisioningRecord |
Saves the given provisioning record for this specific agent. The record holds the basic agent configuration. abstract fun setProvisioningRecord(record: ProvisioningRecord): Completable |
unpack |
Unpacks the given packed message. abstract fun unpack(packedMessage: String): Single<UnpackedMessage> |
DefaultAgent |
An implementation of Agent using EnvelopeService to unpack incoming packed messages for processing and a list of MessageHandler that handle the unpacked messages. In addition, ConnectionService is used to connect a given unpacked agent message to a specific connection. Already unpacked messages are checked for a service decorator and are sent to the handlers for processing. class DefaultAgent : Agent |