@mysten/suins
Version:
27 lines (26 loc) • 771 B
TypeScript
export type HexString = string;
export type PriceFeedRequestConfig = {
verbose?: boolean;
binary?: boolean;
};
export type PriceServiceConnectionConfig = {
timeout?: number;
httpRetries?: number;
};
export declare class PriceServiceConnection {
private httpClient;
/**
* Constructs a new Connection.
*
* @param endpoint endpoint URL to the price service.
* @param config Optional configuration for custom setups.
*/
constructor(endpoint: string, config?: PriceServiceConnectionConfig);
/**
* Fetch latest VAAs of given price IDs.
*
* @param priceIds Array of hex-encoded price IDs.
* @returns Array of base64 encoded VAAs.
*/
getLatestVaas(priceIds: HexString[]): Promise<string[]>;
}