lib/methods/platform/getIdentitiesByPublicKeyHashes/GetIdentitiesByPublicKeyHashesResponse.js
/**
   * @param proto
   * @returns {GetIdentitiesByPublicKeyHashesResponse}
   */
@param proto
@returns {GetIdentitiesByPublicKeyHashesResponse}
@param proto @returns { GetIdentitiesByPublicKeyHashesResponse }
static createFromProto(proto) {
    const metadata = proto.getMetadata();
    if (metadata === undefined) {
      throw new InvalidResponseError('Metadata is not defined');
    }
    const rawProof = proto.getProof();
    let proof;
    if (rawProof) {
      proof = new Proof({
        rootTreeProof: Buffer.from(rawProof.getRootTreeProof()),
        storeTreeProof: Buffer.from(rawProof.getStoreTreeProof()),
        signatureLLMQHash: Buffer.from(rawProof.getSignatureLlmqHash()),
        signature: Buffer.from(rawProof.getSignature()),
      });
    }
    return new GetIdentitiesByPublicKeyHashesResponse(
      proto.getIdentitiesList()
        .map((identity) => (identity.length > 0 ? Buffer.from(identity) : null)),
      new Metadata(metadata.toObject()),
      proof,
    );
  }
static createFromProto ( proto ) { const metadata = proto . getMetadata ( ) ; if ( metadata === undefined ) { throw new InvalidResponseError ( 'Metadata is not defined' ) ; } const rawProof = proto . getProof ( ) ; let proof ; if ( rawProof ) { proof = new Proof ( { rootTreeProof : Buffer . from ( rawProof . getRootTreeProof ( ) ) , storeTreeProof : Buffer . from ( rawProof . getStoreTreeProof ( ) ) , signatureLLMQHash : Buffer . from ( rawProof . getSignatureLlmqHash ( ) ) , signature : Buffer . from ( rawProof . getSignature ( ) ) , } ) ; } return new GetIdentitiesByPublicKeyHashesResponse ( proto . getIdentitiesList ( ) . map ( ( identity ) => ( identity . length > 0 ? Buffer . from ( identity ) : null ) ) , new Metadata ( metadata . toObject ( ) ) , proof , ) ; }
@param proto
 @returns {GetIdentitiesByPublicKeyHashesResponse}
@param proto @returns { GetIdentitiesByPublicKeyHashesResponse }