Merkle logic externalized to an npm module 'merkle'