Place the well-rinsed beans in a bowl, cover with cold water and leave to soak overnight (to make them easier to cook).
On the second day, place the beans in a saucepan, season with salt to taste, add the bay leaf and cook, covered, over medium heat for 1 hour or until the beans are very tender.
To make the stir-fry, add the oil and onion to the pan and cook for 4-5 minutes or until the onion is lightly golden.
Remove the beans from the heat, add butter and season with black pepper.
Grind everything with a blender or immersion mixer until it becomes a paste, add grated garlic, stir and place the beans on a plate.