src/main/java/com/hedera/hashgraph/identity/hcs/MessageEnvelope.java
/**
   * Converts a message from a DID or VC topic response into object instance.
   *
   * @param <U>          Type of the message inside envelope.
   * @param response     Topic message as a response from mirror node.
   * @param messageClass Class type of the message inside envelope.
   * @return The {@link MessageEnvelope}.
   */
Converts a message from a DID or VC topic response into object instance.
@param           Type of the message inside envelope.
@param response     Topic message as a response from mirror node.
@param messageClass Class type of the message inside envelope.
Converts a message from a DID or VC topic response into object instance . @param Type of the message inside envelope . @param response Topic message as a response from mirror node . @param messageClass Class type of the message inside envelope .
public static <U extends Message> MessageEnvelope<U> fromMirrorResponse(
          final TopicMessage response, final Class<U> messageClass) {
    String msgJson = new String(response.contents, StandardCharsets.UTF_8);
    MessageEnvelope<U> result = MessageEnvelope.fromJson(msgJson, messageClass);
    result.mirrorResponse = new SerializableMirrorConsensusResponse(response);
    return result;
  }
public static < U extends Message > MessageEnvelope < U > fromMirrorResponse ( final TopicMessage response , final Class < U > messageClass ) { String msgJson = new String ( response . contents , StandardCharsets . UTF_8 ) ; MessageEnvelope < U > result = MessageEnvelope . fromJson ( msgJson , messageClass ) ; result . mirrorResponse = new SerializableMirrorConsensusResponse ( response ) ; return result ; }
Converts a message from a DID or VC topic response into object instance.
Converts a message from a DID or VC topic response into object instance .