Skip to content

Commit 78e873c

Browse files
fix: update HexString type and fix import paths
Co-Authored-By: Connor Prussin <[email protected]>
1 parent e9b7ade commit 78e873c

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

price_service/sdk/js/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export type {
2222
PriceFeedRequestConfig,
2323
PriceServiceConnectionConfig,
2424
PriceFeedUpdateCallback,
25-
HexString,
2625
} from "./types.js";
2726
export { PriceServiceConnection } from "./client/PriceServiceConnection.js";
27+
export { HexString } from "./types.js";
2828

2929
/**
3030
* A Pyth Price represented as `${price} ± ${conf} * 10^${expo}` published at `publishTime`.

price_service/sdk/js/src/types.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
1+
export const HexString = String as { new(...args: any[]): string };
12
export type HexString = string;
23

34
export interface PriceFeedRequestConfig {
45
binary?: boolean;
6+
verbose?: boolean;
7+
allowOutOfOrder?: boolean;
8+
logger?: {
9+
trace: (...args: any[]) => void;
10+
debug: (...args: any[]) => void;
11+
info: (...args: any[]) => void;
12+
warn: (...args: any[]) => void;
13+
error: (...args: any[]) => void;
14+
};
515
}
616

717
export interface PriceServiceConnectionConfig {
818
url: string;
919
priceFeedRequestConfig?: PriceFeedRequestConfig;
1020
timeout?: number;
1121
httpRetries?: number;
22+
verbose?: boolean;
23+
logger?: {
24+
trace: (...args: any[]) => void;
25+
debug: (...args: any[]) => void;
26+
info: (...args: any[]) => void;
27+
warn: (...args: any[]) => void;
28+
error: (...args: any[]) => void;
29+
};
1230
}
1331

1432
export type PriceFeedUpdateCallback = (priceFeed: any) => void;

target_chains/aptos/sdk/js/src/AptosPriceServiceConnection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { PriceServiceConnection } from "@pythnetwork/price-service-sdk";
2-
import type { HexString } from "@pythnetwork/price-service-sdk";
1+
import { PriceServiceConnection } from "@pythnetwork/price-service-sdk/lib/client/PriceServiceConnection.js";
2+
import { HexString } from "@pythnetwork/price-service-sdk/lib/types.js";
33
import { BCS } from "aptos";
44
import { Buffer } from "buffer";
55

0 commit comments

Comments
 (0)