import { HexString, PriceServiceConnection } from "./PriceServiceConnection.mjs"; import { Transaction } from "@mysten/sui/transactions"; import { ClientWithCoreApi } from "@mysten/sui/client"; //#region src/pyth/pyth.d.ts type ObjectId = string; declare class SuiPriceServiceConnection extends PriceServiceConnection { /** * Fetch price feed update data. * * @param priceIds Array of hex-encoded price IDs. * @returns Array of buffers containing the price update data. */ getPriceFeedsUpdateData(priceIds: HexString[]): Promise; } declare class SuiPythClient { #private; provider: ClientWithCoreApi; pythStateId: ObjectId; wormholeStateId: ObjectId; constructor(provider: ClientWithCoreApi, pythStateId: ObjectId, wormholeStateId: ObjectId); /** * Verifies the VAAs using the Wormhole contract. * * @param vaas Array of VAA buffers to verify. * @param tx Transaction block to add commands to. * @returns Array of verified VAAs. */ verifyVaas(vaas: Uint8Array[], tx: Transaction): Promise<{ NestedResult: [number, number]; $kind: "NestedResult"; }[]>; /** * Adds the necessary commands for updating the Pyth price feeds to the transaction block. * * @param tx Transaction block to add commands to. * @param updates Array of price feed updates received from the price service. * @param feedIds Array of feed IDs to update (in hex format). */ updatePriceFeeds(tx: Transaction, updates: Uint8Array[], feedIds: HexString[]): Promise; /** * Get the price feed object ID for a given feed ID, caching the promise. * @param feedId */ getPriceFeedObjectId(feedId: HexString): Promise; /** * Fetches the price table object ID for the current state ID, caching the promise. * @returns Price table object ID and field type */ getPriceTableInfo(): Promise<{ id: ObjectId; fieldType: ObjectId; }>; /** * Fetches the package ID for the Wormhole contract, with caching. */ getWormholePackageId(): Promise; /** * Fetches the package ID for the Pyth contract, with caching. */ getPythPackageId(): Promise; /** * Returns the cached base update fee, fetching it if necessary. */ getBaseUpdateFee(): Promise; } //#endregion export { SuiPriceServiceConnection, SuiPythClient }; //# sourceMappingURL=pyth.d.mts.map