shot someone's bolt

It’s about use of an idiom.

Can I use this idiom the way it is shown below?

A: Have you done all that was needed?
B: Yep! I’ve shot my bolt. That’s it.

Can I use this idiom if I don’t know the person who I am talking to.

Thanks

It’s possible, but note that “shoot one’s bolt” means “exhaust one’s capabilities and resources”, so its sense is more “do all that one can” than “do all that was needed”.

The idiom is somewhat informal, but outside formal situations you can use it to anyone. It is not massively common in everyday conversation, at least not where I come from.