Skip to main content

getRewards

Description:

Returns the set of distributor rewards tokens that are currently claimable.

Arguments:

NameTypeRequiredDescription
userAddressstringYesThe address of the user making the request

Returns:

type Output =
{
proof: string[]
tokens: string[]
unclaimedAmounts: string[]
cumulativeAmounts: string[]
}
| null
NameDescription
proofThe Merkle tree proof. Used in sdk.distributorRewards.claim
tokensAn array of addresses of the tokens. Used in sdk.distributorRewards.claim
unclaimedAmountsAn array of unclaimed amounts of the tokens. A claim is available if at least one amount in the array is greater than zero.
cumulativeAmountsAn array of cumulative amounts of the tokens. Used in sdk.distributorRewards.claim

Example:

const distributorRewards = await sdk.distributorRewards.getRewards({
vaultAddress: '0x...',
})