src/main/java/com/hedera/hashgraph/identity/hcs/did/HcsDidMessage.java
/**
   * Creates a new DID message for submission to HCS topic.
   *
   * @param didDocumentJson DID document as JSON string.
   * @param operation       The operation on DID document.
   * @return The HCS message wrapped in an envelope for the given DID document and method operation.
   */
Creates a new DID message for submission to HCS topic.

@param didDocumentJson DID document as JSON string.
@param operation       The operation on DID document.
@return The HCS message wrapped in an envelope for the given DID document and method operation.
Creates a new DID message for submission to HCS topic . @param didDocumentJson DID document as JSON string . @param operation The operation on DID document . @return The HCS message wrapped in an envelope for the given DID document and method operation .
public static MessageEnvelope<HcsDidMessage> fromDidDocumentJson(final String didDocumentJson,
                                                                   final DidMethodOperation operation) {
    DidDocumentBase didDocumentBase = DidDocumentBase.fromJson(didDocumentJson);
    byte[] encodedDoc = Base64.getEncoder().encode(didDocumentJson.getBytes(StandardCharsets.UTF_8));
    String didDocumentBase64 = new String(encodedDoc, StandardCharsets.UTF_8);
    HcsDidMessage message = new HcsDidMessage(operation, didDocumentBase.getId(), didDocumentBase64);
    return new MessageEnvelope<>(message);
  }
public static MessageEnvelope < HcsDidMessage > fromDidDocumentJson ( final String didDocumentJson , final DidMethodOperation operation ) { DidDocumentBase didDocumentBase = DidDocumentBase . fromJson ( didDocumentJson ) ; byte [ ] encodedDoc = Base64 . getEncoder ( ) . encode ( didDocumentJson . getBytes ( StandardCharsets . UTF_8 ) ) ; String didDocumentBase64 = new String ( encodedDoc , StandardCharsets . UTF_8 ) ; HcsDidMessage message = new HcsDidMessage ( operation , didDocumentBase . getId ( ) , didDocumentBase64 ) ; return new MessageEnvelope < > ( message ) ; }
Creates a new DID message for submission to HCS topic.
Creates a new DID message for submission to HCS topic .