Special equipment: Deep-fat thermometer
Arrange chickpeas in 1 layer on paper towels and allow to air-dry while frying other ingredients. In a large saucepan, pour enough oil to reach a depth of 2 inches. Heat over moderate heat until a deep-fat thermometer inserted in the oil registers 365 degrees F. Using a peeler (preferably Y-shaped), shave enough thin strips of the sweet potato to measure 6 cups (reserve remaining sweet potato for another use). Fry sweet potato shavings, 1/2 cup at a time, until golden and just crisp, about 1 minute, then transfer with a slotted spoon to paper towels to drain. (Return oil to 365 degrees F between batches.) Cool oil to 340 degrees F. Fry pumpkin seeds in batches, covered (seeds will pop and splatter), until puffed (but not brown), 30 seconds to 1 minute, then transfer with slotted spoon to paper towels to drain. (Return oil to 340 degrees F between batches.) Fry chiles until crisp but still red, about 1 minute, then transfer with slotted spoon to paper towels to drain. Fry chickpeas in batches until golden and crisp throughout, 5 to 10 minutes, then transfer with slotted spoon to paper towels to drain. Toss sweet-potato crisps, pumpkin seeds, chiles, chickpeas, and raisins with sugar, cayenne, if using, and salt.