Skip to content

Commit 5dd180c

Browse files
authored
chore(lazer-protocol-js): Add exponent and pub count to payload (#2289)
* Add exponent and pub count * Working receive * Bump version * pre-commit check
1 parent 2b29c99 commit 5dd180c

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

lazer/sdk/js/examples/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ await client.subscribe({
6262
type: "subscribe",
6363
subscriptionId: 2,
6464
priceFeedIds: [1, 2, 3, 4, 5],
65-
properties: ["price"],
65+
properties: ["price", "exponent", "publisherCount"],
6666
chains: ["evm"],
6767
deliveryFormat: "json",
6868
channel: "fixed_rate@200ms",

lazer/sdk/js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pythnetwork/pyth-lazer-sdk",
3-
"version": "0.3.1",
3+
"version": "0.3.2",
44
"description": "Pyth Lazer SDK",
55
"publishConfig": {
66
"access": "public"

lazer/sdk/js/src/protocol.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
export type Chain = "evm" | "solana";
22
export type DeliveryFormat = "json" | "binary";
33
export type JsonBinaryEncoding = "base64" | "hex";
4-
export type PriceFeedProperty = "price" | "bestBidPrice" | "bestAskPrice";
4+
export type PriceFeedProperty =
5+
| "price"
6+
| "bestBidPrice"
7+
| "bestAskPrice"
8+
| "exponent"
9+
| "publisherCount";
510
export type Channel = "real_time" | "fixed_rate@50ms" | "fixed_rate@200ms";
611

712
export type Request =
@@ -26,6 +31,8 @@ export type ParsedFeedPayload = {
2631
price?: string | undefined;
2732
bestBidPrice?: string | undefined;
2833
bestAskPrice?: string | undefined;
34+
publisherCount?: number | undefined;
35+
exponent?: number | undefined;
2936
};
3037

3138
export type ParsedPayload = {

0 commit comments

Comments
 (0)