pyth_sui_sdk/
pyth_sdk.rs

1use pyth_sdk::PriceIdentifier;
2
3use crate::price_info::PriceInfoObject;
4
5impl PriceInfoObject {
6    /// Get the off chain price identifier from the Pyth sdk
7    pub fn pyth_price_id(&self) -> PriceIdentifier {
8        PriceIdentifier::new(
9            self.price_info
10                .price_feed
11                .price_identifier
12                .bytes
13                .to_vec()
14                .try_into()
15                .expect("Validated lenght onchain"),
16        )
17    }
18}