• Decrypt message using given private key.

    Parameters

    • privateKey: Uint8Array

      A 32-byte private key of recipient of the message

    • encrypted: Uint8Array

      ECIES serialized structure (result of ECIES encryption)

    Returns Promise<Uint8Array>

    The clear text

    Throws

    Error If decryption fails