src/signature/merkle/merkle.js
function getLayers(elements) {
  if (elements.length === 0) {
    return [[""]];
  }
  const layers = [];
  layers.push(elements);
  while (layers[layers.length - 1].length > 1) {
    layers.push(getNextLayer(layers[layers.length - 1]));
  }
  return layers;
}
function getLayers(elements) {
  if (elements.length === 0) {
    return [[""]];
  }
  const layers = [];
  layers.push(elements);
  while (layers[layers.length - 1].length > 1) {
    layers.push(getNextLayer(layers[layers.length - 1]));
  }
  return layers;
}
function getLayers ( elements ) { if ( elements . length === 0 ) { return [ [ "" ] ] ; } const layers = [ ] ; layers . push ( elements ) ; while ( layers [ layers . length - 1 ] . length > 1 ) { layers . push ( getNextLayer ( layers [ layers . length - 1 ] ) ) ; } return layers ; }
This function procduces the hashes and the merkle tree
If there are no elements, return empty array of array

@param {*} elements
This function procduces the hashes and the merkle tree If there are no elements return empty array of array