import { AdditionalYields, GenericTokenList } from '../../../types';
interface RawRiskInfo {
    marginPremium: string;
    isBorrowingDisabled: boolean;
    token: {
        id: string;
        symbol: string;
        decimals: string;
        marketId: string;
        supplyLiquidity: string;
        borrowLiquidity: string;
    };
}
export interface DolomiteSubgraphRaw {
    /** global `liquidationRatio` = 1 + marginRatio (R) */
    liquidationRatio: number;
    riskInfos: RawRiskInfo[];
    /** token id → { supply, borrow } APR fractions */
    rates: {
        [tokenId: string]: {
            supply: number;
            borrow: number;
        };
    };
}
/**
 * One GraphQL query returns the whole market set: global margin ratio, per-market
 * risk params + liquidity, and supply/borrow APRs. Replaces the ~2 + 7·N on-chain
 * calls of the on-chain path. Returns `null` on any failure so the caller falls
 * back to on-chain.
 */
export declare function fetchDolomiteMarketsFromSubgraph(chainId: string): Promise<DolomiteSubgraphRaw | null>;
/**
 * Convert raw subgraph markets into the same `{ data, chainId }` shape the
 * on-chain converter emits — one entry per asset under the single `DOLOMITE`
 * key. USD prices come from the `prices` map (populated by the on-chain oracle
 * fetcher) because the subgraph's `derivedETH` is unreliable for non-AMM tokens.
 *
 * Collateral factors are derived from R (= liquidationRatio − 1) and the
 * per-market margin premium p — identical to the on-chain parser (§3).
 */
export declare function convertDolomiteSubgraphMarkets(raw: DolomiteSubgraphRaw, chainId: string, prices: {
    [a: string]: number;
}, additionalYields: AdditionalYields, tokenList?: GenericTokenList): {
    data: Record<string, any>;
    chainId: string;
};
/** Convenience: fetch + convert. Returns `null` on subgraph failure → on-chain fallback. */
export declare function fetchDolomitePublicDataFromSubgraph(chainId: string, prices: {
    [a: string]: number;
}, additionalYields: AdditionalYields, tokenList?: GenericTokenList): Promise<{
    data: Record<string, any>;
    chainId: string;
} | null>;
export {};
//# sourceMappingURL=fetchFromSubgraph.d.ts.map