Grind or pound nuts, or put through a blender or food processor, adding just enough oil to smooth paste. With wet hands, squeeze the nut mixture to remove excess oil. Saute the onions, cayenne and salt in a tablespoon of oil until golden, then knead into the peanut paste. Shape the mixture into 1-inch diameter balls, adding a few drops of water if necessary to make them hold together. Drop the balls into hot oil, or flatten and fry in a skillet. Cook for 2-3 minutes until outsides are crisp.