You should dig into history of WhatsApi project on Github, specifically this thread.
Short explanation - actual repository was wiped away because of legal issues of using WhatsUp API (idk what are these laws, I am not from USA).
If you try hard enough, you can find some forks of this repo still available.
Have to warn you about EULA.
Also, there is Chat-API repo which is nice, but does not contain such feature. Maybe thats why it is still going. Possibility of determining if random number is Whatsapp number can lead to spam, so that is not encoraged by messenger owners.