Skip to main content

Harvest stake

Initiate a harvest and/or a claim process.

Connect a wallet

To utilize those functions, it is necessary to connect a wallet beforehand.

Parameter

AttributeDescription
stakeIdThe stake identifier for forecasting
claimWhether to reclaim the assets or keep them staked

Usage example

import { anvil } from "@ada-anvil/sdk-client";

try {
await anvil.wallet.connect("eternl");
await anvil.staking.harvestStake({
stakeId: YOUR_STAKE_ID,
claim: true,
});
} catch {
console.log("YOUR ERROR HANDLING");
}

Return informations

AttributeDescription
stringTransaction id