During the collapse of a bubble near a surface, a high-speed liquid jet often forms and subsequently impacts upon the opposite bubble surface. The jet impact transforms the originally singly-connected bubble to a toroidal bubble, and generates circulation in the flow around it. A toroidal bubble simulation is presented by introducing a vortex ring seeded inside the bubble torus to account for the circulation. The velocity potential is then decomposed into the potential of the vortex ring and a remnant potential. Because the remnant potential is continuous and satisfies the Laplace equation, it can be modelled by the boundary-integral method, and this circumvents an explicit domain cut and associated numerical treatment. The method is applied to study the collapse of gas bubbles in the vicinity of a rigid wall. Good agreement is found with the results of Best (J. Fluid Mech. 251 79-107, 1993), obtained by a domain cut method. Examination of the pressure impulse on the wall during jet impact indicates that the high-speed liquid jet has a significant potential for causing damage to a surface. There appears to be an optimal initial distance where the liquid jet is most damaging.