Skip to main content

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.

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

Usage

import { executeClaimRewards } from '@avnu/avnu-sdk';

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

Parameters

restake
boolean
required
If true, rewards are automatically restaked. If false, they are sent to the user’s wallet.
provider
AccountInterface
required
The Starknet account.
poolAddress
string
required
The staking pool address.
paymaster
object
Optional paymaster configuration for gasless staking.