use of io.nem.symbol.sdk.openapi.vertx.model.MerkleTreeBranchDTO in project nem2-sdk-java by nemtech.
the class MerkleMapper method toMerkleTreeBranch.
private MerkleTreeBranch toMerkleTreeBranch(Object dto, MerkleTreeNodeType type) {
MerkleTreeBranchDTO branch = getJsonHelper().convert(dto, MerkleTreeBranchDTO.class);
List<MerkleTreeBranchLink> links = branch.getLinks().stream().map(link -> new MerkleTreeBranchLink(link.getBit(), link.getLink())).collect(Collectors.toList());
return new MerkleTreeBranch(type, branch.getPath(), branch.getEncodedPath(), branch.getLinkMask(), links, branch.getBranchHash());
}
Aggregations