import type { PriceUpdate } from "../market/pricefeeds/types.js"; import type { MultiCall } from "../types/index.js"; import { AddressSet } from "../utils/AddressSet.js"; /** * Splits a multicall array into existing price-update data and remaining calls. * * All `onDemandPriceUpdates` entries are decoded and their {@link PriceUpdate} * tuples are collected into a flat array. The remaining (non-price-update) * calls are returned in their original order. * * @param calls - Array of multicall entries to split * @returns Object with `priceUpdates` (decoded price update tuples) and * `remainingCalls` (everything else, preserving order) */ export declare function extractPriceUpdates(calls: MultiCall[]): { priceUpdates: PriceUpdate[]; remainingCalls: MultiCall[]; }; /** * Extracts token addresses from `updateQuota` calls that have a positive `quotaChange`. * * Only tokens whose quota is being increased (i.e. `quotaChange > 0`) are * returned, since those are the tokens that require fresh price feed data. * * @param calls - Array of multicall entries to scan * @returns Unique token addresses from positive-change quota updates */ export declare function extractQuotaTokens(calls: MultiCall[]): AddressSet; /** * Merges two {@link PriceUpdate} arrays, deduplicating by `priceFeed` address. * * When both arrays contain an update for the same price feed, the entry from * `existing` takes priority (the caller explicitly included it). * * @param existing - Price updates already present in the multicall * @param generated - Newly generated price updates to merge in * @returns Merged array with no duplicate `priceFeed` addresses */ export declare function mergePriceUpdates(existing: PriceUpdate[], generated: PriceUpdate[]): PriceUpdate[];