'On-chain poof for staking rewards payout

I am trying to find out how the rewards are sent to the validators account/delegation contract. Where is that information stored and how can it be retrieved from the RPC nodes?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source