/** * Bindings for the Pyth Core 2026-08-18 cutover entry points. * * Still hand-written, but no longer for the original reason: suilend v22 is * published, so `sui-client-gen` could now see these functions. What blocks * regeneration is that `_generated/gen.toml` points at * `ts/suilend/contracts/suilend`, a pre-monorepo path that no longer exists, * and regenerating rewrites 166 files. Fixing the generator config is worth * doing on its own, without a cutover attached. */ import { Transaction, TransactionArgument, TransactionObjectInput } from "@mysten/sui/transactions"; export interface RefreshReservePriceProCompatibleArgs { lendingMarket: TransactionObjectInput; reserveArrayIndex: bigint | TransactionArgument; clock: TransactionObjectInput; priceInfo: TransactionObjectInput; } /** `priceInfo` must come from the upgraded Pyth package; a legacy one aborts. */ export declare function refreshReservePriceProCompatible(tx: Transaction, typeArg: string, args: RefreshReservePriceProCompatibleArgs): import("@mysten/sui/transactions").TransactionResult; /** * Publish time out of a `PriceInfoObject`'s json projection. * * Read by field path rather than through the generated `PriceInfoObject.fetch`, * whose type check is bound to ONE Pyth package address and therefore throws * for every caller once the contracts link the upgraded package. * * The nesting is identical across both packages — verified 2026-08-18 against * live mainnet objects from each: * * upgraded 0x55300367…::price_info::PriceInfoObject -> timestamp present * legacy 0x8d97f1cd…::price_info::PriceInfoObject -> timestamp present * * Validated rather than dereferenced blindly: this runs inside every deposit, * borrow and withdraw, so a wrong or stale `priceInfoObjectId` — a bad cache in * `getPriceFeedObjectId`, or a network mismatch — should name itself instead of * surfacing as `Cannot read properties of undefined`. */ export declare function priceInfoPublishTime(json: unknown, priceInfoObjectId: string): string | number; export interface AddReserveProCompatibleArgs { lendingMarketOwnerCap: TransactionObjectInput; lendingMarket: TransactionObjectInput; priceInfo: TransactionObjectInput; config: TransactionObjectInput; /** `CoinMetadata` for add_reserve, `Currency` for the v2 form. */ coinMetadata: TransactionObjectInput; clock: TransactionObjectInput; } /** * Creating a reserve needs the upgraded Pyth package too. Post-cutover the * legacy `add_reserve` cannot be given a `PriceInfoObject` the contract will * accept, so adding a reserve fails outright without this. */ export declare function addReserveProCompatible(tx: Transaction, typeArgs: [string, string], args: AddReserveProCompatibleArgs): import("@mysten/sui/transactions").TransactionResult; /** The `Currency`-based form; same shape, different metadata argument. */ export declare function addReserveV2ProCompatible(tx: Transaction, typeArgs: [string, string], args: AddReserveProCompatibleArgs): import("@mysten/sui/transactions").TransactionResult; export interface ChangeReservePriceFeedProCompatibleArgs { lendingMarketOwnerCap: TransactionObjectInput; lendingMarket: TransactionObjectInput; reserveArrayIndex: bigint | TransactionArgument; priceInfoObj: TransactionObjectInput; clock: TransactionObjectInput; } export declare function changeReservePriceFeedProCompatible(tx: Transaction, typeArgs: [string, string], args: ChangeReservePriceFeedProCompatibleArgs): import("@mysten/sui/transactions").TransactionResult;