import type { FetcherResult, OraclePriceEntry, ParseContext } from '../types';
/**
 * Metadata carried alongside the multicall batch so the parser can
 * reassemble results without re-reading on-chain state.
 */
interface SiloV2OracleMeta {
    /** Entries to process, one per silo half */
    entries: {
        token: string;
        decimals: number;
        silo: string;
        lenderKey: string;
        oracle: string;
        /** Other half's token — used for 1:1 fallback when this side is static */
        partnerToken: string;
        /**
         * True when this side has a zero-address oracle (constant price = 1.0).
         * Treated like a Morpho loan asset: priced via the partner token's USD
         * (or its own, if independently known) and flagged with `staticBase`.
         */
        isStatic: boolean;
    }[];
    /**
     * Dedup map: "oracleLc:tokenLc" → index into the calls array.
     * The same oracle+token pair only needs one `quote` call even if it
     * appears in multiple markets.
     */
    callIndexMap: {
        [key: string]: number;
    };
    /**
     * "oracleLc" → index of the quoteToken() call for that oracle.
     */
    quoteTokenIndexMap: {
        [key: string]: number;
    };
}
/**
 * Build multicall calls for all Silo V2 oracle prices on the given chain.
 *
 * Three cases per pair:
 *   1. Both halves have a real oracle → standard `quote` + `quoteToken` calls.
 *   2. Exactly one half is zero-address (constant = 1.0) → emit that side as
 *      `staticBase` (priced via the partner token's USD) and run the normal
 *      flow on the other side. The non-static oracle is expected to quote in
 *      the static side's token, so the existing `quote * qtUSD` math just
 *      works once the partner USD price is in `usdPrices`.
 *   3. Both halves are zero-address → the pair is 1:1 in its own terms. Only
 *      emit if at least one of the two tokens has a real oracle elsewhere on
 *      the chain (e.g. WBTC priced by another silo); otherwise (the WBTC-LBTC
 *      case where neither has a non-constant feed) skip the pair entirely.
 *
 * Calls are deduplicated at the (oracle, token) level for `quote` and at
 * the oracle level for `quoteToken`.
 */
export declare function getSiloV2Calls(chainId: string): FetcherResult<SiloV2OracleMeta>[];
/**
 * Parse Silo V2 oracle multicall results into price entries.
 *
 * Static halves (zero-address oracle) are resolved by looking up the USD
 * price of the side's own token, falling back to the partner token (the
 * relationship is 1:1 by definition). They are flagged with `staticBase`
 * + `baseAsset = self`, mirroring the Morpho loan-asset entries.
 *
 * Non-static halves use `quote(1.0, token) → priceInQuoteToken × qtUSD`.
 * When the static side's token IS the partner oracle's quoteToken, the
 * non-static math automatically picks up the right USD via the shared
 * `usdPrices` map (populated by other lenders earlier in the parse order).
 */
export declare function parseSiloV2Results(data: any[], meta: SiloV2OracleMeta, context: ParseContext): OraclePriceEntry[];
/**
 * ABI fragments needed for Silo V2 oracle calls
 */
export declare function getSiloV2Abi(): readonly [{
    readonly inputs: readonly [{
        readonly name: "_baseAmount";
        readonly type: "uint256";
    }, {
        readonly name: "_baseToken";
        readonly type: "address";
    }];
    readonly name: "quote";
    readonly outputs: readonly [{
        readonly name: "quoteAmount";
        readonly type: "uint256";
    }];
    readonly stateMutability: "view";
    readonly type: "function";
}, {
    readonly inputs: readonly [];
    readonly name: "quoteToken";
    readonly outputs: readonly [{
        readonly name: "";
        readonly type: "address";
    }];
    readonly stateMutability: "view";
    readonly type: "function";
}];
/**
 * Silo V2 Oracle Fetcher module
 */
export declare const siloV2Fetcher: {
    getCalls: typeof getSiloV2Calls;
    parse: typeof parseSiloV2Results;
    getAbi: typeof getSiloV2Abi;
};
export {};
//# sourceMappingURL=siloV2.d.ts.map