When I have time I’ll have to find a book I read last year on the “TRUE story of Captain Kidd”. Actually, it was very well documented. He was hired as a privateer by a group of businessmen in New York and with the backing of the King of England. His commission was to attack pirate ships and other enemy ships of opportunity. Kidd attacked a ship flying a French flag - but the ship was actualy English. He let the Captain and the crew go free but kept the ship and the plunder as that was legal to do. (It mattered what flag it was flying at the time, not the actual ownership).
Of course the Indian Khan (or someone in the east who was shipping the supplies) was pissed, and the East India Trade Company was mad, and the english businessmen were mad. The ship they found in the Caribean may have been the ship.
When he was finally caught and put on trial in England the King didn’t want anything to do with it - so the documents showing the King’s blessing on the whole deal never got brought to trial. (And the trial was more of a kangaroo court than an actual trial). The documents of the era show the King’s letter, trial transcripts, etc. Pretty interesting.
(It was actually ghostwritten by Mr. Daniel Defoe, of whom you have probably heard. And the cover pic is "The Fight for the Treasure" by Mr. Howard Pyle, the "pirate painter" among other nifty things he depicted.)