The URL of the Solana RPC endpoint.
The public key of the stake account.
An object containing the details of the last staking reward, or null
if no rewards are found.
const endpoint = 'https://api.mainnet-beta.solana.com'
const stakeAccountAddress = 'ExampleStakeAccountAddress'
const reward = await getLastStakingReward(endpoint, stakeAccountAddress)
if (reward) {
console.log(`Last reward: ${JSON.stringify(reward)}`)
} else {
console.log('No rewards found.')
}
Generated using TypeDoc
Retrieves the last staking reward for a given stake account on the Solana blockchain.