Techniques of pile driving have been known from ancient times. An old easily set-up manual type consists of a triangular frame on which a weight (ram) is lifted by hand and dropped with force on the pile. Materials are simple and would be found aboard any ship or site with lumber. Any ship's carpenter could build one. The ram, if dropped any distance or into water, would have had rods or a casing as guides.
The Ciy Hall of Amsterdam, built on the Dam, is supported on 15569 piles. It is estimated that rams were lifted more than 500,000 times. A sketch of a 17th century manual pile driver is found at this web site: www.ihchh.com/en/company/history
A simple pile driver could be set up by any carpenter (and Kanakas became skilled at the trade of carpenter). The ram may be a metal block, even a stone, but probably a simple cylindrical ram would have been available.
Kanakas could have built the pile driver (if the parts were not readily available on the HB or other ship, and would have performed the labor. Diving would be involved only to check out the bottom and perhaps initial placement, but the actual pile driving would be done by the pile-driving gang and their 'machine'.
This reminds me, the donkey engine was invented in 1881 (and first used in 1884 in Skagit Co., Washington).