Pick over and discard any broken dried beans. Add them to a colander and rinse with cold water for 1 to 2 minutes.
Overnight Soaking: Add beans, salt, and water to a large bowl. Cover and allow to sit for 8 to 24 hours. Drain and rinse the beans before cooking.Quick Soaking (same day cooking): In a large saucepan or dutch oven, add beans, 1 ½ tablespoons salt, and 8 cups water, stir to dissolve. Bring to a boil for 2 minutes. Turn off the heat and cover for 1 hour. Drain and rinse before cooking.
In a large saucepan or dutch oven, add the soaked beans, 6 cups of water, 1 ½ teaspoon of salt, onion wedges, and bay leaf. Bring water to a simmer over medium-high heat. Cover and reduce heat to low. Stir occasionally to make sure they don’t stick to the bottom of the pot, about every 30 minutes. Gently cook beans over low heat until very tender and creamy, about 60 to 75 minutes.
Discard the onions and bay leaf. Use a slotted spoon to transfer beans to a bowl and reserve the starchy liquid.
Using Canned Beans
Set a colander over a bowl. Pour canned beans into the colander, allow to drain for 5 minutes. There should be about 3 ½ cups of beans. Reserve the starchy liquid to use later. There should be about ¾ cups.
Making the Refried Beans
In a large skillet, heat the butter over medium heat. Once melted, add the onions, garlic, and jalapenos. Saute until onions are translucent, about 3 minutes.
Add the cumin and oregano, saute until fragrant, about 30 seconds.
Add about 3 ½ cups of beans and saute for 2 minutes. Turn off the heat and use a potato masher to crush them until the desired consistency is reached.
Turn the heat to low. Add ¾ cups of the reserved starchy liquid, stir to combine. Stir in the lime zest and 1 tablespoon lime juice. Season to taste, adding more as needed.
For a smoother consistency, continue to crush using the potato masher, or use a handheld immersion blender to puree the beans. Alternatively, add to a food processor or blender and pulse until desired consistency is reached.