Files
lez-programs/modules/amm/ffi/src/lib.rs
T
r4bbit 7e45e44eac feat(amm): add oracle setup ops (createPriceObservations / createOraclePriceAccount)
Expose the two TWAP oracle-setup instructions as module ops so a pool's price feeds
can be seeded from the app. Both chain into the configured oracle, seeded from
validated pool state (initial tick read on-chain) — nothing is caller-priced, and
each window is a distinct feed account.
2026-08-13 22:43:48 +02:00

20 lines
930 B
Rust

#![deny(unsafe_op_in_unsafe_fn)]
mod account;
mod ffi;
pub mod api;
pub use api::{
config_account, config_id, create_oracle_price_account_plan, create_pool_plan,
create_pool_quote, create_price_observations_plan, fee_tiers, pair_ids, pool_id, program_id,
resolve_pool, resolve_tokens, swap_exact_in_plan, swap_exact_in_quote, swap_exact_out_plan,
swap_exact_out_quote, swap_pair, transfer_ownership_plan, AccountRead, AmmApiError,
AmmResponse, AmmResult, ConfigAccountRequest, ConfigIdRequest,
CreateOraclePriceAccountPlanRequest, CreatePoolPlanRequest, CreatePoolQuoteRequest,
CreatePriceObservationsPlanRequest, FeeTiersRequest, PairIdsRequest, PoolIdRequest,
ProgramIdRequest, ResolvePoolRequest, ResolveTokensRequest, SwapExactInPlanRequest,
SwapExactInQuoteRequest, SwapExactOutPlanRequest, SwapExactOutQuoteRequest, SwapPairRequest,
TransferOwnershipPlanRequest, WalletAccount,
};