yearn-sdk
yearn-sdk copied to clipboard
feat: add ability to fetch strategy harvest info
Description
Add a getHarvests
function to StrategiesInterface
that returns data about the harvests of a strategy, optionally within a specified window of blocks
Data returned about each Harvest:
export interface HarvestData {
transactionId: string;
gain: BigNumber;
gainUsdc: BigNumber;
loss: BigNumber;
time: Date;
estimatedTotalAssets: BigNumber;
apr: number;
}
Motivation and Context
Adding more functionality to the SDK for rendering data about vaults/strategies.
How Has This Been Tested?
added unit tests
size-limit report 📦
Path | Size |
---|---|
dist/sdk.cjs.production.min.js | 48.05 KB (+1.17% 🔺) |
dist/sdk.esm.js | 48.39 KB (+1.18% 🔺) |