The acceleration of energetic particles in the interplanetary medium by transit-time damping