ソースを参照

fix(lazer-protocol): Update Latest Price Interface (#2230)

* Small change to interface

* Bump version
Darun Seethammagari 10 ヶ月 前
コミット
4621b98154

+ 1 - 1
lazer/Cargo.lock

@@ -3190,7 +3190,7 @@ dependencies = [
 
 [[package]]
 name = "pyth-lazer-protocol"
-version = "0.2.2"
+version = "0.2.3"
 dependencies = [
  "anyhow",
  "bincode",

+ 1 - 1
lazer/sdk/rust/protocol/Cargo.toml

@@ -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"

+ 9 - 1
lazer/sdk/rust/protocol/src/api.rs

@@ -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,
 }