Skip to main content

Harvest stake

Initiate a harvest and/or a claim process.

Parameter

AttributeDescription
stakeIdThe stake identifier for forecasting
claimWhether to reclaim the assets or keep them staked
utxosArray of utxos
changeAddressWallet 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

AttributeDescription
stringTransaction id