pyth_solana_receiver_sdk/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use {
    anchor_lang::{
        declare_id,
        prelude::*,
    },
    borsh::{
        BorshDeserialize,
        BorshSerialize,
    },
    pythnet_sdk::wire::v1::MerklePriceUpdate,
    solana_program::{
        pubkey,
        pubkey::Pubkey,
    },
};

pub mod config;
pub mod cpi;
pub mod error;
pub mod pda;
pub mod price_update;
pub mod program;

declare_id!("rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ");

pub const PYTH_PUSH_ORACLE_ID: Pubkey = pubkey!("pythWSnswVUd12oZpeFP8e9CVaEqJg25g1Vtc2biRsT");

#[derive(Debug, BorshSerialize, BorshDeserialize, Clone)]
pub struct PostUpdateParams {
    pub merkle_price_update: MerklePriceUpdate,
    pub treasury_id:         u8,
}

#[derive(Debug, BorshSerialize, BorshDeserialize, Clone)]
pub struct PostUpdateAtomicParams {
    pub vaa:                 Vec<u8>,
    pub merkle_price_update: MerklePriceUpdate,
    pub treasury_id:         u8,
}