Here is a sentence taken from a manga:
Thank you for having provided me with all that energy at that time.
I don't get why 私 is used with the particle に instead of が (or not being used at all). The way I see it :
A provides B with C.
B is (receiving the favor of being) provided with C by A.
Is it the use of ～てありがとう that swaps the particles? Literally, something like:
A is thanked by B (who is glad) for being provided with C.