diff --git a/price_service/sdk/js/src/index.ts b/price_service/sdk/js/src/index.ts index 9ddd8881a..999ea017f 100644 --- a/price_service/sdk/js/src/index.ts +++ b/price_service/sdk/js/src/index.ts @@ -22,9 +22,9 @@ export type { PriceFeedRequestConfig, PriceServiceConnectionConfig, PriceFeedUpdateCallback, - HexString, } from "./types.js"; export { PriceServiceConnection } from "./client/PriceServiceConnection.js"; +export { HexString } from "./types.js"; /** * A Pyth Price represented as `${price} ± ${conf} * 10^${expo}` published at `publishTime`. diff --git a/price_service/sdk/js/src/types.ts b/price_service/sdk/js/src/types.ts index 11e954fb8..ab4305a39 100644 --- a/price_service/sdk/js/src/types.ts +++ b/price_service/sdk/js/src/types.ts @@ -1,7 +1,17 @@ +export const HexString = String as { new(...args: any[]): string }; export type HexString = string; export interface PriceFeedRequestConfig { binary?: boolean; + verbose?: boolean; + allowOutOfOrder?: boolean; + logger?: { + trace: (...args: any[]) => void; + debug: (...args: any[]) => void; + info: (...args: any[]) => void; + warn: (...args: any[]) => void; + error: (...args: any[]) => void; + }; } export interface PriceServiceConnectionConfig { @@ -9,6 +19,14 @@ export interface PriceServiceConnectionConfig { priceFeedRequestConfig?: PriceFeedRequestConfig; timeout?: number; httpRetries?: number; + verbose?: boolean; + logger?: { + trace: (...args: any[]) => void; + debug: (...args: any[]) => void; + info: (...args: any[]) => void; + warn: (...args: any[]) => void; + error: (...args: any[]) => void; + }; } export type PriceFeedUpdateCallback = (priceFeed: any) => void; diff --git a/target_chains/aptos/sdk/js/src/AptosPriceServiceConnection.ts b/target_chains/aptos/sdk/js/src/AptosPriceServiceConnection.ts index 0c4898bd7..3f3565d04 100644 --- a/target_chains/aptos/sdk/js/src/AptosPriceServiceConnection.ts +++ b/target_chains/aptos/sdk/js/src/AptosPriceServiceConnection.ts @@ -1,5 +1,5 @@ -import { PriceServiceConnection } from "@pythnetwork/price-service-sdk"; -import type { HexString } from "@pythnetwork/price-service-sdk"; +import { PriceServiceConnection } from "@pythnetwork/price-service-sdk/lib/client/PriceServiceConnection.js"; +import { HexString } from "@pythnetwork/price-service-sdk/lib/types.js"; import { BCS } from "aptos"; import { Buffer } from "buffer";