>>aitchn+(OP)
I was using WAHA. It is an abstraction layer with a proper API on top. It supports many engines like Baileys and Whatsmeow (golang).
Unfortunately, all those solutions are shaky and could lead to a ban on your account.
https://waha.devlike.pro/