import { type RelayProxyConfig } from '@1delta/proxy-fetch';
/**
 * Back-compat alias. New callers should use `RelayProxyConfig` directly from
 * `@1delta/proxy-fetch`.
 */
export type MorphoSubgraphProxyConfig = RelayProxyConfig;
export interface MorphoUserMarketBalance {
    /** 0x-prefixed lowercase 66-char market key */
    marketId: string;
    /** Raw supply shares as decimal string */
    supplyShares: string;
    /** Raw borrow shares as decimal string */
    borrowShares: string;
    /** Raw collateral amount as decimal string */
    collateral: string;
}
export declare function hasMorphoUserSubgraph(chainId: string): boolean;
export declare function hasMorphoUserApi(chainId: string): boolean;
export declare function hasMorphoPositionIndex(chainId: string): boolean;
/**
 * Fetches per-market balance data (supply shares, borrow shares, collateral)
 * for all markets where the account has active positions. Queries the Goldsky
 * subgraph or the Morpho Blue API depending on the chain.
 *
 * Returns undefined when the chain has no index OR the request fails (timeout,
 * non-2xx, etc.) — caller should fall back to querying all markets on-chain.
 * Returns an empty array when the account has no positions on that chain.
 *
 * Concurrent callers for the same (chainId, account) share a single upstream
 * request, and results are memoized for a short window (see `CACHE_TTL_MS`).
 */
export declare function fetchMorphoUserBalances(chainId: string, account: string, proxyConfig?: RelayProxyConfig): Promise<MorphoUserMarketBalance[] | undefined>;
/**
 * Convenience wrapper — returns only the set of market IDs where the account
 * has active positions. Use `fetchMorphoUserBalances` when you also need the
 * shares/collateral amounts.
 */
export declare function fetchMorphoUserPositionMarkets(chainId: string, account: string, proxyConfig?: RelayProxyConfig): Promise<Set<string> | undefined>;
/**
 * Test-only helper: drops the in-memory cache so assertions don't interact
 * across tests. Safe to call at runtime, just wastes the next upstream call.
 */
export declare function __clearMorphoPositionCacheForTests(): void;
//# sourceMappingURL=fetchUserPositionsFromSubgraph.d.ts.map