Harvest stake
Initiate a harvest and/or a claim process.
Parameter
| Attribute | Description |
|---|---|
| stakeId | The stake identifier for forecasting |
| claim | Whether to reclaim the assets or keep them staked |
| utxos | Array of utxos |
| changeAddress | Wallet change address |
Usage example
import { anvil } from "@ada-anvil/sdk-server";
try {
await anvil.staking.harvestStake({
stakeId: YOUR_STAKE_ID,
claim: true,
utxos: ["THE_UTXO"],
changeAddress: "THE_ADDRESS",
});
} catch {
console.log("YOUR ERROR HANDLING");
}
Return informations
| Attribute | Description |
|---|---|
| string | Transaction id |