Add all the ingredients except the raisins and walnuts to the bowl of a food processor. Process until everything is well combined and the mixture becomes a coarse “dough.” It will start to form a ball in the food processor when it’s ready.
Transfer the mixture to a bowl and mix in the raisins and walnuts if using. (I find this is easiest to do with a fork.)
Line a baking sheet with parchment. With damp hands, roll tablespoon-sized measures of dough into balls, roll them in coconut (if using), and place them on the prepared baking sheet. Refrigerate for 30 minutes to firm up.
Store in an airtight container in the fridge for up to one week or in the freezer for up to three months.