code: public boolean add(DataHash dataHash, long level, IdentityMetadata metadata) throws KSIException {
          notNull(dataHash, "DataHash");
          dataHash.getAlgorithm().checkExpiration();
          if (level < 0 || level > Util.MAXIMUM_LEVEL) {
              throw new IllegalStateException("Level must be between 0 and 255");
          }
          logger.debug("New input hash '{}' with level '{}' added to block signer.", dataHash, level);
  
          ImprintNode leaf = new ImprintNode(dataHash, level);
          if (metadata != null) {
              if (treeBuilder.calculateHeight(leaf, metadata) > maxTreeHeight) {
                  return false;
              }
              treeBuilder.add(leaf, metadata);
          } else {
              if (treeBuilder.calculateHeight(leaf) > maxTreeHeight) {
                  return false;
              }
              treeBuilder.add(leaf);
          }
          leafs.add(leaf);
          return true;
      }
docs: Adds a hash (with specific level) and a signature metadata to the {@link KsiBlockSigner}.
  
  @param dataHash data hash.
  @param level    hash level.
  @param metadata metadata to be added.
  
  @return True, if data hash and metadata were added.
  
  @throws KSIException