Put the dried figs in a bowl and add enough boiling water to cover. Steep for about 10 minutes or until soft.
In the meantime, heat the oil in a frying pan on medium heat, add the onions and sauté until soft, about 10 minutes. Sprinkle the sugar over and stir until dissolved.
Drain the figs, slice into pieces and add to the onion, together with the cloves, pepper and vinegar. Pour in 150ml boiling water and add the walnuts, if using. Bring to a boil, then lower the heat and simmer on low for about 10 minutes. In the meantime, sterilise the jars by putting them in a large pan (or bowl) and filling with boiling water. After 10 minutes, remove them from the water and let them dry for about 10 minutes.
Spoon the chutney directly from the heat into the sterilised jars. Serve with toast, cheese and fresh figs; the chutney can also be stored in the refrigerator for up to 4 weeks.