Skip to content

chore(lazer-protocol-js): Add exponent and pub count to payload #2289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading