Skip to main content

Overview

The Agent class provides methods for claiming accrued protocol rewards and browsing reward history. Reward queries return Paginator 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

PaginationOptions
Optional pagination and sorting configuration.
number
Items per page. Defaults to 20.
string
Sort order. Use SortOrder.DATE_ASC or SortOrder.DATE_DESC.

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

PaginationOptions
Optional pagination and sorting configuration.
number
Items per page. Defaults to 20.
string
Sort order. Use SortOrder.DATE_ASC or SortOrder.DATE_DESC.

Returns

Paginator<RewardDTO>

Examples

Both rewards() and rewardHistory() return Paginator instances. See the Paginator reference for the full iteration API.