Stake forecast
Obtain an approximate forecast of the rewards expected from the stake by date.
Parameter
| Attribute | Description |
|---|---|
| stakeId | The stake identifier for forecasting |
Usage example
import { anvil } from "@ada-anvil/sdk-server";
try {
await anvil.staking.getStakeForecast({
stakeId: YOUR_STAKE_ID,
});
} catch {
console.log("YOUR ERROR HANDLING");
}
Return informations
| Attribute | Description |
|---|---|
| [] | An array containing forecasted reward information |
| [0].date | The date associated with the forecasted values |
| [0].total | An array that groups rewards by unit |
| [0].total.unit | Breakdown of rewards generated for each unit |
| [0].total.quantity | An array containing minted assets resulting from the stake |