code: public void add(ImprintNode node, IdentityMetadata metadata) throws HashException, KSIException {
          addToHeads(heads, aggregate(node, metadata));
      }
docs: Adds a new leaf with its metadata to the hash tree.
  
  @param node leaf node to be added, must not be null.
  @param metadata node's metadata, must not be null
  @throws HashException
  @throws KSIException