import { OraclePriceFeed, EnvOption, UserLendingInfo, Pool, SuiClientOption, MarketOption, LendingPosition, ServiceOption, TransactionObjectArgument } from './types.js'; import { Transaction } from '@mysten/sui/transactions'; type PythInfo = { priceFeedId: string; priceInfoObject: string; expiration?: number; }; export type PythPriceInfo = { priceFeedId: string; priceInfoObject: string; price: string; conf: string; publishTime: number; expiration?: number; }; /** * Get stale price feed IDs from Pyth Network * * Identifies price feeds that have not been updated recently (more than 30 seconds old). * This helps ensure that only fresh price data is used for lending operations. * * @param priceIds - Array of Pyth price feed IDs to check * @returns Array of stale price feed IDs that need updating * @throws Error if failed to fetch price feed data */ export declare function getPythStalePriceFeedId(priceIds: string[], options?: Partial): Promise; export declare function getPythStalePriceFeedIdV2(pythInfos: PythInfo[], options?: Partial): Promise; /** * Update Pyth price feeds in a transaction * * Fetches the latest price update data from Pyth Network and adds the update * operations to the transaction block. * * @param tx - The transaction block to add price feed updates to * @param priceFeedIds - Array of Pyth price feed IDs to update * @param options - Optional client and environment configuration * @returns Promise that resolves when price feeds are updated * @throws Error if failed to update price feeds */ export declare function updatePythPriceFeeds(tx: Transaction, priceFeedIds: string[], options?: Partial): Promise; /** * Update oracle prices in the PTB (Programmable Transaction Block) * * This function updates price feeds for the lending protocol. It can optionally * update Pyth price feeds first if they are stale, then updates individual * price feeds in the oracle contract. * * @param tx - The transaction block to add price update operations to * @param priceFeeds - Array of oracle price feeds to update * @param options - Optional configuration including whether to update Pyth feeds * @returns The updated transaction block */ export declare function updateOraclePricesPTB(tx: Transaction, priceFeeds: OraclePriceFeed[], options?: Partial): Promise; /** * Get all available price feeds from the configuration * * @param options - Optional environment configuration * @returns Array of oracle price feed configurations */ export declare function getPriceFeeds(options?: Partial): Promise; /** * Filter price feeds based on lending state and pools * * This function filters price feeds to only include those that are relevant * to the current lending state or available pools. * * @param feeds - Array of price feeds to filter * @param filters - Filter criteria including lending state and pools * @returns Filtered array of price feeds */ export declare function filterPriceFeeds(feeds: OraclePriceFeed[], filters: { lendingState?: UserLendingInfo[]; pools?: Pool[]; lendingPositions?: LendingPosition[]; }): OraclePriceFeed[]; export declare function updateOraclePriceBeforeUserOperationPTB(tx: Transaction, address: string, pools: Pool[], options?: Partial): Promise; export {}; //# sourceMappingURL=oracle.d.ts.map