/// import { SuiClient } from '@mysten/sui/client'; import { Transaction } from '@mysten/sui/transactions'; import { Buffer } from 'buffer'; export type ObjectId = string; export declare class SuiPythClient { provider: SuiClient; pythStateId: ObjectId; wormholeStateId: ObjectId; private pythPackageId; private wormholePackageId; private priceTableInfo; private priceFeedObjectIdCache; private baseUpdateFee; constructor(provider: SuiClient, pythStateId: ObjectId, wormholeStateId: ObjectId, priceFeedObjectIdCache?: Record); getBaseUpdateFee(): Promise; /** * getPackageId returns the latest package id that the object belongs to. Use this to * fetch the latest package id for a given object id and handle package upgrades automatically. * @param objectId * @returns package id */ getPackageId(objectId: ObjectId): Promise; /** * Adds the commands for calling wormhole and verifying the vaas and returns the verified vaas. * @param vaas array of vaas to verify * @param tx transaction block to add commands to */ verifyVaas(wormholePackageId: string, vaas: Buffer[], tx: Transaction): Promise; /** * 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: Buffer[], feedIds: string[]): Promise; /** * Get the packageId for the wormhole package if not already cached */ getWormholePackageId(): Promise; /** * Get the packageId for the pyth package if not already cached */ getPythPackageId(): Promise; /** * Get the priceFeedObjectId for a given feedId if not already cached * @param feedId */ getPriceFeedObjectId(feedId: string): Promise; /** * Fetches the price table object id for the current state id if not cached * @returns price table object id */ getPriceTableInfo(): Promise<{ id: ObjectId; fieldType: ObjectId; }>; /** * Obtains the vaa bytes embedded in an accumulator message. * @param accumulatorMessage - the accumulator price update message * @returns vaa bytes as a uint8 array */ extractVaaBytesFromAccumulatorMessage(accumulatorMessage: Buffer): Buffer; }