examples/appnet-api-server/src/main/java/com/hedera/hashgraph/identity/hcs/example/appnet/handlers/DemoHandler.java
/**
   * Generates a new DID document containing an additional public key in the public key section used to compute
   * the zero knowledge proof and writes it to the response body.
   * Private key is returned in a response header.
   *
   * @param ctx The HTTP context.
   */
Generates a new DID document containing an additional public key in the public key section used to compute
the zero knowledge proof and writes it to the response body.
Private key is returned in a response header.

@param ctx The HTTP context.
Generates a new DID document containing an additional public key in the public key section used to compute the zero knowledge proof and writes it to the response body . Private key is returned in a response header . @param ctx The HTTP context .
public void generateDidWithZeroKnowledge(final Context ctx) {
    PrivateKey privateKey = HcsDid.generateDidRootKey();
    SchnorrPublicKey holderPublicKey = getSchnorrPublicKeyFromHeader(ctx);
    HcsDid did = new HcsDid(identityNetwork.getNetwork(), privateKey.getPublicKey(),
            identityNetwork.getAddressBook().getFileId());
    did.setZkDidKeys(ByteUtils.toHexString(holderPublicKey.serializePublicKey()));
    DidDocumentBase doc = did.generateDidDocumentZk();
    ctx.header(HEADER_PRIVATE_KEY, privateKey.toString());
    ctx.render(doc.toJson());
  }
public void generateDidWithZeroKnowledge ( final Context ctx ) { PrivateKey privateKey = HcsDid . generateDidRootKey ( ) ; SchnorrPublicKey holderPublicKey = getSchnorrPublicKeyFromHeader ( ctx ) ; HcsDid did = new HcsDid ( identityNetwork . getNetwork ( ) , privateKey . getPublicKey ( ) , identityNetwork . getAddressBook ( ) . getFileId ( ) ) ; did . setZkDidKeys ( ByteUtils . toHexString ( holderPublicKey . serializePublicKey ( ) ) ) ; DidDocumentBase doc = did . generateDidDocumentZk ( ) ; ctx . header ( HEADER_PRIVATE_KEY , privateKey . toString ( ) ) ; ctx . render ( doc . toJson ( ) ) ; }
Generates a new DID document containing an additional public key in the public key section used to compute
 the zero knowledge proof and writes it to the response body.
Generates a new DID document containing an additional public key in the public key section used to compute the zero knowledge proof and writes it to the response body .