Skip to content

Commit 59f3f6f

Browse files
feat(pyth-solana-receiver): add post_twap_update instruction & types (#2172)
* feat: impl post_twap_update and necessary types * refactor: move TwapPrice to receiver sdk
1 parent 1e169bd commit 59f3f6f

File tree

9 files changed

+795
-202
lines changed

9 files changed

+795
-202
lines changed

pythnet/pythnet_sdk/src/messages.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ impl Arbitrary for PriceFeedMessage {
138138
}
139139
}
140140

141-
/// Message format for sending Twap data via the accumulator program
141+
/// Message format for sending cumulative price data via the accumulator program.
142+
/// These messages are used to calculate TWAPs for a given time window.
143+
/// The calculated TWAPs are stored as TwapPrices in TwapUpdate accounts.
142144
#[repr(C)]
143145
#[derive(Debug, Copy, Clone, PartialEq, Serialize, Deserialize)]
144146
pub struct TwapMessage {

0 commit comments

Comments
 (0)