Overview
The Agent class provides methods for claiming accrued protocol rewards and browsing reward history. Reward queries returnPaginator instances for efficient iteration over potentially large result sets.
claimRewards()
Claim all accrued rewards for the agent’s smart account. This triggers an on-chain claim of rewards accumulated from the protocols the agent is allocated to.Signature
Returns
Promise<ClaimedRewardsResponse>
Response Types
Examples
rewards()
Returns a paginator over the agent’s current reward records.Signature
Parameters
Returns
Paginator<RewardDTO>
RewardDTO Type
Examples
rewardHistory()
Returns a paginator over the agent’s historical reward records. This includes past claimed and distributed rewards.Signature
Parameters
Returns
Paginator<RewardDTO>
Examples
Both
rewards() and rewardHistory() return Paginator instances. See the Paginator reference for the full iteration API.