diff --git a/Cargo.lock b/Cargo.lock index e692796d3c..0b5a8f42b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5674,7 +5674,7 @@ dependencies = [ "hyper 1.6.0", "hyper-util", "protobuf", - "pyth-lazer-protocol 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pyth-lazer-protocol 0.19.0", "pyth-lazer-publisher-sdk 0.18.0", "reqwest 0.12.23", "serde", @@ -5694,7 +5694,7 @@ dependencies = [ [[package]] name = "pyth-lazer-client" -version = "8.5.0" +version = "8.6.0" dependencies = [ "alloy-primitives 0.8.25", "anyhow", @@ -5712,7 +5712,7 @@ dependencies = [ "hex", "humantime-serde", "libsecp256k1 0.7.2", - "pyth-lazer-protocol 0.19.0", + "pyth-lazer-protocol 0.20.0", "reqwest 0.12.23", "serde", "serde_json", @@ -5727,22 +5727,17 @@ dependencies = [ [[package]] name = "pyth-lazer-protocol" version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b7d19a91e0d63e5003a409d51346abb4941bf55a3a9d52f65453c65057f0482" dependencies = [ - "alloy-primitives 0.8.25", "anyhow", - "assert_float_eq", - "bincode 1.3.3", - "bs58", "byteorder", "chrono", "derive_more 1.0.0", - "ed25519-dalek 2.1.1", "hex", "humantime", "humantime-serde", "itertools 0.13.0", - "libsecp256k1 0.7.2", - "mry", "protobuf", "rust_decimal", "serde", @@ -5752,18 +5747,23 @@ dependencies = [ [[package]] name = "pyth-lazer-protocol" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b7d19a91e0d63e5003a409d51346abb4941bf55a3a9d52f65453c65057f0482" +version = "0.20.0" dependencies = [ + "alloy-primitives 0.8.25", "anyhow", + "assert_float_eq", + "bincode 1.3.3", + "bs58", "byteorder", "chrono", "derive_more 1.0.0", + "ed25519-dalek 2.1.1", "hex", "humantime", "humantime-serde", "itertools 0.13.0", + "libsecp256k1 0.7.2", + "mry", "protobuf", "rust_decimal", "serde", @@ -5781,19 +5781,19 @@ dependencies = [ "fs-err", "protobuf", "protobuf-codegen", - "pyth-lazer-protocol 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pyth-lazer-protocol 0.19.0", "serde_json", ] [[package]] name = "pyth-lazer-publisher-sdk" -version = "0.19.0" +version = "0.20.0" dependencies = [ "anyhow", "fs-err", "protobuf", "protobuf-codegen", - "pyth-lazer-protocol 0.19.0", + "pyth-lazer-protocol 0.20.0", "serde_json", ] diff --git a/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml b/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml index 2078ca1456..007c4d1a1e 100644 --- a/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml +++ b/lazer/contracts/solana/programs/pyth-lazer-solana-contract/Cargo.toml @@ -19,7 +19,7 @@ no-log-ix-name = [] idl-build = ["anchor-lang/idl-build"] [dependencies] -pyth-lazer-protocol = { path = "../../../../sdk/rust/protocol", version = "0.19.0" } +pyth-lazer-protocol = { path = "../../../../sdk/rust/protocol", version = "0.20.0" } anchor-lang = "0.31.1" bytemuck = { version = "1.20.0", features = ["derive"] } diff --git a/lazer/publisher_sdk/rust/Cargo.toml b/lazer/publisher_sdk/rust/Cargo.toml index 0382bdfd5d..08e08ed01c 100644 --- a/lazer/publisher_sdk/rust/Cargo.toml +++ b/lazer/publisher_sdk/rust/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "pyth-lazer-publisher-sdk" -version = "0.19.0" +version = "0.20.0" edition = "2021" description = "Pyth Lazer Publisher SDK types." license = "Apache-2.0" repository = "https://github.com/pyth-network/pyth-crosschain" [dependencies] -pyth-lazer-protocol = { version = "0.19.0", path = "../../sdk/rust/protocol" } +pyth-lazer-protocol = { version = "0.20.0", path = "../../sdk/rust/protocol" } anyhow = "1.0.98" protobuf = "3.7.2" serde_json = "1.0.140" diff --git a/lazer/publisher_sdk/rust/src/lib.rs b/lazer/publisher_sdk/rust/src/lib.rs index 3612aa043a..ac3bef2cd0 100644 --- a/lazer/publisher_sdk/rust/src/lib.rs +++ b/lazer/publisher_sdk/rust/src/lib.rs @@ -56,7 +56,7 @@ impl From for Update { best_bid_price, best_ask_price, } => Update::PriceUpdate(PriceUpdate { - price: Some(price.mantissa_i64()), + price: price.map(|p| p.mantissa_i64()), best_bid_price: best_bid_price.map(|p| p.mantissa_i64()), best_ask_price: best_ask_price.map(|p| p.mantissa_i64()), special_fields: Default::default(), diff --git a/lazer/sdk/rust/client/Cargo.toml b/lazer/sdk/rust/client/Cargo.toml index 66b406fde9..4573081ee0 100644 --- a/lazer/sdk/rust/client/Cargo.toml +++ b/lazer/sdk/rust/client/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "pyth-lazer-client" -version = "8.5.0" +version = "8.6.0" edition = "2021" description = "A Rust client for Pyth Lazer" license = "Apache-2.0" [dependencies] -pyth-lazer-protocol = { path = "../protocol", version = "0.19.0" } +pyth-lazer-protocol = { path = "../protocol", version = "0.20.0" } tokio = { version = "1", features = ["full"] } tokio-tungstenite = { version = "0.20", features = ["native-tls"] } futures-util = "0.3" diff --git a/lazer/sdk/rust/protocol/Cargo.toml b/lazer/sdk/rust/protocol/Cargo.toml index 5f4b668d19..1f2999f139 100644 --- a/lazer/sdk/rust/protocol/Cargo.toml +++ b/lazer/sdk/rust/protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyth-lazer-protocol" -version = "0.19.0" +version = "0.20.0" edition = "2021" description = "Pyth Lazer SDK - protocol types." license = "Apache-2.0" diff --git a/lazer/sdk/rust/protocol/src/jrpc.rs b/lazer/sdk/rust/protocol/src/jrpc.rs index 8d90764e97..d6955516ec 100644 --- a/lazer/sdk/rust/protocol/src/jrpc.rs +++ b/lazer/sdk/rust/protocol/src/jrpc.rs @@ -45,7 +45,7 @@ pub struct FeedUpdateParams { pub enum UpdateParams { #[serde(rename = "price")] PriceUpdate { - price: Price, + price: Option, best_bid_price: Option, best_ask_price: Option, }, @@ -190,7 +190,7 @@ mod tests { feed_id: PriceFeedId(1), source_timestamp: TimestampUs::from_micros(124214124124), update: UpdateParams::PriceUpdate { - price: Price::from_integer(1234567890, 0).unwrap(), + price: Some(Price::from_integer(1234567890, 0).unwrap()), best_bid_price: Some(Price::from_integer(1234567891, 0).unwrap()), best_ask_price: Some(Price::from_integer(1234567892, 0).unwrap()), }, @@ -231,7 +231,7 @@ mod tests { feed_id: PriceFeedId(1), source_timestamp: TimestampUs::from_micros(124214124124), update: UpdateParams::PriceUpdate { - price: Price::from_integer(1234567890, 0).unwrap(), + price: Some(Price::from_integer(1234567890, 0).unwrap()), best_bid_price: Some(Price::from_integer(1234567891, 0).unwrap()), best_ask_price: Some(Price::from_integer(1234567892, 0).unwrap()), }, @@ -272,7 +272,7 @@ mod tests { feed_id: PriceFeedId(1), source_timestamp: TimestampUs::from_micros(124214124124), update: UpdateParams::PriceUpdate { - price: Price::from_integer(1234567890, 0).unwrap(), + price: Some(Price::from_integer(1234567890, 0).unwrap()), best_bid_price: Some(Price::from_integer(1234567891, 0).unwrap()), best_ask_price: Some(Price::from_integer(1234567892, 0).unwrap()), }, @@ -312,7 +312,7 @@ mod tests { feed_id: PriceFeedId(1), source_timestamp: TimestampUs::from_micros(745214124124), update: UpdateParams::PriceUpdate { - price: Price::from_integer(5432, 0).unwrap(), + price: Some(Price::from_integer(5432, 0).unwrap()), best_bid_price: Some(Price::from_integer(5432, 0).unwrap()), best_ask_price: Some(Price::from_integer(5432, 0).unwrap()), }, @@ -351,7 +351,7 @@ mod tests { feed_id: PriceFeedId(1), source_timestamp: TimestampUs::from_micros(124214124124), update: UpdateParams::PriceUpdate { - price: Price::from_integer(1234567890, 0).unwrap(), + price: Some(Price::from_integer(1234567890, 0).unwrap()), best_bid_price: None, best_ask_price: None, },