import type { IAddress, IContractRunner } from '../../types'; /** * Bad transactions that should be ignored * these transactions are usually from tests and can skew data */ export declare const isBadTransaction: (hash: string, chainId: number) => boolean; export declare const isBadVault: (address?: string) => boolean; import { getAddressChainType, getVaultVersion, getVaultVersionV2 } from './vault-version'; export { getAddressChainType, getVaultVersion, getVaultVersionV2 }; export declare const REWARD_DISTRIBUTOR_ADDRESS: (chainId: number) => string[]; export declare const AVAX_PRICE_FEED_ADDRESS: (chainId: number) => "0x" | "0xFF3EEb22B5E3dE6e705b44749C2559d704923FD7"; export declare function getVaultSymbol(vault: IAddress, provider: IContractRunner): Promise; /** * @deprecated * Replaced by SUBGRAPH_VAULT_URLS which are subgraphs deployed on Goldsky. */ export declare const SUBGRAPH_POOL_URLS: (apiKey: string, chainId?: number, pool?: IAddress) => { 1: string; 8453: string; 43114: string; 42161: string; 56: string; } | { 999: string; }; /** * Previously fabricated a Goldsky subgraph URL from the chain name and vault * symbol. That guess is unreliable and produced dead endpoints: * - The path segment `/v1/subgraphs/name/goldsky/` is legacy hosted-service * syntax, not Goldsky's current scheme (cf. {@link SUBGRAPH_VAULT_URLS}). * - The chain name isn't the subgraph slug — ethers reports Citrea's network as * `unknown`, and mainnet as `mainnet` where the subgraph uses `eth`. * - A vault's symbol isn't its subgraph name — e.g. on-chain `EctUSD` vs the * deployed `earn-ctusd`. * * A fabricated URL 404s silently, so a missing subgraph reads as "no data" * rather than an error (this masked the Citrea Earn ctUSD outage). Subgraph URLs * must now come from backend vault metadata (`fetchVaultMetadata → subgraph`). * This returns `undefined` so callers hit their existing "Missing Subgraph" * branch (warn + Slack alert) instead of querying a dead endpoint. * * @param _network - Unused. Kept for call-site compatibility. * @param _symbol - Unused. Kept for call-site compatibility. * @returns `undefined` — the SDK no longer guesses subgraph URLs. * @deprecated Resolve subgraph URLs from `fetchVaultMetadata`; do not rely on a * generated fallback. */ export declare const getDefaultSubgraphUrl: (_network: string, _symbol: string) => string | undefined; /** * Resolve whether a single fee (management or performance) is currently waived. * * Backend-driven. This centralizes logic that previously lived — * and diverged — across two upshift-app components. The resolution is deliberately * split between the backend and the SDK: * * - The backend `isFeeWaivedToggle` (`platform_fee_override.is_fee_waived`) is both * the master enable AND the TVL latch. Retool config takes precedence over live * TVL, and the backend flips this flag `false` once live TVL crosses the * configured threshold. That flip is one-way: if TVL later falls back below the * threshold the waiver does NOT re-apply. The SDK therefore does no TVL math and * never reads `latest_reported_tvl` here — trusting the flag preserves the latch. * - The **date** window is time-dependent, so it cannot be a static DB flag; the SDK * evaluates it live against the clock. * * Resolution: * - Toggle off → never waived (also the only "hide" path once TVL trips the latch). * - Toggle on, both date and TVL blank → indefinite manual waiver → waived. * - Toggle on with a date window → waived while `now < waivedUntilDate`. * - Toggle on with a TVL threshold configured → waived (the backend keeps the toggle * on only while live TVL is under the threshold). * * @param isFeeWaivedToggle - Backend master/TVL-latch flag. `false` ⇒ never waived. * @param waivedUntilDate - ISO datetime string the waiver runs until, or `null` for * no date window. An unparseable string yields `NaN`, which is never `> now`, so * it correctly contributes no date-based waiver. * @param waivedUntilTvl - Configured TVL threshold in whole USD, or `null`. Used only * to detect that a TVL-based waiver was set (values `<= 0` are treated as unset); * the threshold comparison itself is owned by the backend. * @param now - Clock, injected for deterministic testing. Defaults to `new Date()`. * @returns `true` if the UI should present this fee as "Fee Waived" right now. * @example * ```ts * // Toggle on, 30-day window still open → waived. * resolveFeeWaived(true, '2099-01-01T00:00:00Z', null); // true * // Toggle off overrides everything → not waived. * resolveFeeWaived(false, '2099-01-01T00:00:00Z', 10_000_000); // false * ``` */ export declare function resolveFeeWaived(isFeeWaivedToggle: boolean, waivedUntilDate: string | null, waivedUntilTvl: number | null, now?: Date): boolean;