The Solana network endpoint to connect to.
The public key of the account for which to retrieve staking rewards.
const endpoint = 'https://api.mainnet-beta.solana.com';
const publicKey = 'YourPublicKeyHere';
try {
const rewardData = await getAllStakeRewardsByPubkey(endpoint, publicKey);
console.log('Stake rewards data:', rewardData);
} catch (error) {
console.error('Error fetching stake rewards:', error);
}
Generated using TypeDoc
Retrieves all staking rewards for a given public key.