MercuryImpl

class MercuryImpl constructor(castor: Castor, protocol: DIDCommProtocol, api: Api, logger: PrismLogger = PrismLoggerImpl(LogComponent.MERCURY)) : Mercury(source)

Mercury is a powerful and flexible library for working with decentralized identifiers and secure communications protocols. Whether you are a developer looking to build a secure and private messaging app or a more complex decentralized system requiring trusted peer-to-peer connections, Mercury provides the tools and features you need to establish, manage, and secure your communications easily.

Constructors

Link copied to clipboard
constructor(castor: Castor, protocol: DIDCommProtocol, api: Api, logger: PrismLogger = PrismLoggerImpl(LogComponent.MERCURY))

Functions

Link copied to clipboard
open override fun packMessage(message: Message): String

Asynchronously packs a given message object into a string representation. This function may throw an error if the message object is invalid.

Link copied to clipboard
open suspend override fun sendMessage(message: Message): ByteArray?

Asynchronously sends a given message and returns the response data.

Link copied to clipboard
open suspend override fun sendMessageParseResponse(message: Message): Message?

Asynchronously sends a given message and returns the response message object.

Link copied to clipboard
open override fun unpackMessage(message: String): Message

Asynchronously unpacks a given string representation of a message into a message object. This function may throw an error if the string is not a valid message representation.