merkle: merkle tree API implementation