UNPKG

@bombearn/sdk

Version:

Interaction framework for the yearn protocol

22 lines (21 loc) 1.19 kB
import { ChainId } from "../chain"; import { ServiceInterface } from "../common"; import { Address } from "../types"; import { AccountHistoricEarnings, AssetEarnings, AssetHistoricEarnings, EarningsUserData } from "../types/custom/earnings"; export declare class EarningsInterface<C extends ChainId> extends ServiceInterface<C> { /** * @deprecated * Not able to be accurately calculated by the subgraph, this functionality will be removed in a future version */ protocolEarnings(): Promise<string>; assetEarnings(assetAddress: Address): Promise<AssetEarnings>; accountAssetsData(accountAddress: Address): Promise<EarningsUserData>; private assetHistoricEarningsCache; assetsHistoricEarnings(fromDaysAgo?: number): Promise<AssetHistoricEarnings[]>; assetHistoricEarnings(vault: Address, fromDaysAgo: number, latestBlockNumber?: number): Promise<AssetHistoricEarnings>; accountHistoricEarnings(accountAddress: Address, shareTokenAddress: Address, fromDaysAgo: number, toDaysAgo?: number): Promise<AccountHistoricEarnings>; private tokensValueInUsdc; private getDate; private blocksPerDay; private blockOffset; }