The Law Library of Congress has digitized its collection of piracy trials. These are primary sources as they are the actual depositions and legal maneuverings endemic to legal proceedings. Of passing interest is The arraignment, tryal, and condemnation of Captain William Kidd, for murther and piracy, upon six several indictments, at the Admiralty-Sessions, held by His Majesty’s commission at the Old-Baily, on Thursday the 8th. and Friday the 9th. of May, 1701. More recent trials can be found at the Database of Maritime Piracy Court Cases.
Pirates plagued the early republic; peruse the “naval affairs” volumes of the American State Papers to see the activities; Great Britain was not immune from depredations either as you can see by the thousands of references to primary source material here. BTW, the results from both of these repositories are full text.
The Law and Custom of the Sea (volumes 49 & 50) is a two-volume work published by the Naval Records Society that details, among other activities, piratical actions from the 13th to the 18th centuries.