pyth_solana_receiver_sdk/
lib.rs

1// We can't do much about the size of `anchor_lang::error::Error`.
2#![allow(clippy::result_large_err)]
3
4use {
5    anchor_lang::{declare_id, prelude::*},
6    borsh::{BorshDeserialize, BorshSerialize},
7    pythnet_sdk::wire::v1::MerklePriceUpdate,
8};
9
10pub mod config;
11pub mod cpi;
12pub mod error;
13pub mod pda;
14pub mod price_update;
15pub mod program;
16
17declare_id!("rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ");
18
19pub const PYTH_PUSH_ORACLE_ID: Pubkey = pubkey!("pythWSnswVUd12oZpeFP8e9CVaEqJg25g1Vtc2biRsT");
20
21#[derive(Debug, BorshSerialize, BorshDeserialize, Clone)]
22pub struct PostUpdateParams {
23    pub merkle_price_update: MerklePriceUpdate,
24    pub treasury_id: u8,
25}
26
27#[derive(Debug, BorshSerialize, BorshDeserialize, Clone)]
28pub struct PostUpdateAtomicParams {
29    pub vaa: Vec<u8>,
30    pub merkle_price_update: MerklePriceUpdate,
31    pub treasury_id: u8,
32}
33
34#[derive(Debug, BorshSerialize, BorshDeserialize, Clone)]
35pub struct PostTwapUpdateParams {
36    pub start_merkle_price_update: MerklePriceUpdate,
37    pub end_merkle_price_update: MerklePriceUpdate,
38    pub treasury_id: u8,
39}