> ## Documentation Index
> Fetch the complete documentation index at: https://docs.avnu.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Claim Rewards

> Harvest or restake rewards

Use `executeClaimRewards` to claim your earned staking rewards. You can optionally choose to restake them immediately.

## Usage

```typescript theme={null}
import { executeClaimRewards } from '@avnu/avnu-sdk';

const result = await executeClaimRewards({
  provider: account,
  poolAddress: '0x...',
  restake: true, // Set to true to compound rewards
});
```

## Parameters

<ParamField path="restake" type="boolean" required>
  If `true`, rewards are automatically restaked. If `false`, they are sent to the user's wallet.
</ParamField>

<ParamField path="provider" type="AccountInterface" required>
  The Starknet account.
</ParamField>

<ParamField path="poolAddress" type="string" required>
  The staking pool address.
</ParamField>

<ParamField path="paymaster" type="object">
  Optional paymaster configuration for gasless staking.
</ParamField>
