Skip to content

Commit

Permalink
chore(lazer-protocol-js): Add exponent and pub count to payload (#2289)
Browse files Browse the repository at this point in the history
* Add exponent and pub count

* Working receive

* Bump version

* pre-commit check
  • Loading branch information
darunrs authored Jan 22, 2025
1 parent 2b29c99 commit 5dd180c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lazer/sdk/js/examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ await client.subscribe({
type: "subscribe",
subscriptionId: 2,
priceFeedIds: [1, 2, 3, 4, 5],
properties: ["price"],
properties: ["price", "exponent", "publisherCount"],
chains: ["evm"],
deliveryFormat: "json",
channel: "fixed_rate@200ms",
Expand Down
2 changes: 1 addition & 1 deletion lazer/sdk/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pythnetwork/pyth-lazer-sdk",
"version": "0.3.1",
"version": "0.3.2",
"description": "Pyth Lazer SDK",
"publishConfig": {
"access": "public"
Expand Down
9 changes: 8 additions & 1 deletion lazer/sdk/js/src/protocol.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
export type Chain = "evm" | "solana";
export type DeliveryFormat = "json" | "binary";
export type JsonBinaryEncoding = "base64" | "hex";
export type PriceFeedProperty = "price" | "bestBidPrice" | "bestAskPrice";
export type PriceFeedProperty =
| "price"
| "bestBidPrice"
| "bestAskPrice"
| "exponent"
| "publisherCount";
export type Channel = "real_time" | "fixed_rate@50ms" | "fixed_rate@200ms";

export type Request =
Expand All @@ -26,6 +31,8 @@ export type ParsedFeedPayload = {
price?: string | undefined;
bestBidPrice?: string | undefined;
bestAskPrice?: string | undefined;
publisherCount?: number | undefined;
exponent?: number | undefined;
};

export type ParsedPayload = {
Expand Down

0 comments on commit 5dd180c

Please sign in to comment.