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.

Export

Hierarchy

  • Mercury

Implements

Constructors

Properties

api: Api
castor: Domain.Castor
protocol: DIDCommProtocol

Methods

  • Type Parameters

    • T

    Parameters

    • service: undefined | Service | URL
    • message: string

    Returns Promise<T>

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

    Parameters

    Returns Promise<string>

  • Parameters

    Returns ForwardMessage

  • Asynchronously sends a given message and returns the response data.

    Type Parameters

    • T

    Parameters

    Returns Promise<T>

    Async

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

    Parameters

    • message: string

    Returns Promise<Message>