MerkleTree<T> constructor

MerkleTree<T>({
  1. String hashFunction(
    1. T
    )?,
  2. String salt = '',
})

Creates an empty Merkle tree

Implementation

MerkleTree({String Function(T)? hashFunction, String salt = ''})
  : root = null,
    leafCount = 0,
    height = 0,
    hashFunction = hashFunction ?? _defaultHash,
    _leaves = [],
    _salt = salt;