The Book of Jasher is mentioned in the Bible, in Joshua and II Samuel, but it is not a canonical book.
Its first chapter corresponds closely with Genesis 2 and 3.
Its second chapter introduces Cainan as a son of Enosh, son of Seth. It goes on to say that Lamech and his son Jabal accidentally killed Cain, thus requiting his wickedness for slaying Abel.