Mercury

interface 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.

Inheritors

Functions

Link copied to clipboard
abstract 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
abstract suspend fun sendMessage(message: Message): ByteArray?

Asynchronously sends a given message and returns the response data.

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

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

Link copied to clipboard
abstract 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.