Skip to content

Commit

Permalink
fix(lazer-protocol): Update Latest Price Interface (#2230)
Browse files Browse the repository at this point in the history
* Small change to interface

* Bump version
  • Loading branch information
darunrs authored Jan 8, 2025
1 parent 9b3c156 commit 4621b98
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lazer/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lazer/sdk/rust/protocol/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyth-lazer-protocol"
version = "0.2.2"
version = "0.2.3"
edition = "2021"
description = "Pyth Lazer SDK - protocol types."
license = "Apache-2.0"
Expand Down
10 changes: 9 additions & 1 deletion lazer/sdk/rust/protocol/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@ pub enum ApiRequest {
pub struct LatestPriceRequest {
pub price_feed_ids: Vec<PriceFeedId>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct LatestPriceResponse {
pub price_feed_ids: Vec<AggregatedPriceFeedData>,
pub latest_prices: Vec<LatestPrice>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct LatestPrice {
id: PriceFeedId,
prices: AggregatedPriceFeedData,
}

0 comments on commit 4621b98

Please sign in to comment.