Blend all the ingredients up to and including the sugar in a food processor to make a paste. Tip the paste into a shallow dish.
Drain the tofu and pat it dry with kitchen paper. Cut it into 20 equal-sized cubes and gently toss it in the prepared paste. Leave to marinate for 1 hour.
Heat the oil in a wok over high heat until the oil starts to shimmer. Add the tofu and stir-fry for 2–3 minutes until golden. Add the French beans and cook for a further 30 seconds. Garnish with a scattering of peanuts before serving.