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    solana_program::{pubkey, pubkey::Pubkey},
9};
10
11pub mod config;
12pub mod cpi;
13pub mod error;
14pub mod pda;
15pub mod price_update;
16pub mod program;
17
18declare_id!("rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ");
19
20pub const PYTH_PUSH_ORACLE_ID: Pubkey = pubkey!("pythWSnswVUd12oZpeFP8e9CVaEqJg25g1Vtc2biRsT");
21
22#[derive(Debug, BorshSerialize, BorshDeserialize, Clone)]
23pub struct PostUpdateParams {
24    pub merkle_price_update: MerklePriceUpdate,
25    pub treasury_id: u8,
26}
27
28#[derive(Debug, BorshSerialize, BorshDeserialize, Clone)]
29pub struct PostUpdateAtomicParams {
30    pub vaa: Vec<u8>,
31    pub merkle_price_update: MerklePriceUpdate,
32    pub treasury_id: u8,
33}
34
35#[derive(Debug, BorshSerialize, BorshDeserialize, Clone)]
36pub struct PostTwapUpdateParams {
37    pub start_merkle_price_update: MerklePriceUpdate,
38    pub end_merkle_price_update: MerklePriceUpdate,
39    pub treasury_id: u8,
40}