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
| Attribute | Description |
|---|---|
| stakeId | The stake identifier for forecasting |
| claim | Whether 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
| Attribute | Description |
|---|---|
| string | Transaction id |