Skip to main content

hylo_clients/
lib.rs

1//! # Hylo Clients
2//!
3//! Offchain clients for Hylo protocol transactions and quotes.
4//!
5//! ## Quick Start
6//!
7//! ```rust,no_run
8//! use hylo_clients::prelude::*;
9//!
10//! # async fn example() -> Result<()> {
11//! // Create Hylo exchange client
12//! let client = ExchangeClient::new_random_keypair(
13//!     Cluster::Mainnet,
14//!     CommitmentConfig::confirmed(),
15//! )?;
16//!
17//! // Mint JITOSOL → hyUSD
18//! let user = Pubkey::new_unique();
19//! let signature = client.run_transaction::<JITOSOL, HYUSD>(MintArgs {
20//!     amount: UFix64::one(),
21//!     user,
22//!     slippage_config: None,
23//! }).await?;
24//! # Ok(())
25//! # }
26//! ```
27//!
28//! ## Clients
29//!
30//! - [`exchange_client::ExchangeClient`] - Mint/redeem/swap operations for
31//!   hyUSD and xSOL
32//! - [`stability_pool_client::StabilityPoolClient`] - Deposit/withdraw
33//!   operations for sHYUSD
34
35pub mod exchange_client;
36pub mod instructions;
37pub mod prelude;
38pub mod program_client;
39pub mod stability_pool_client;
40pub mod syntax_helpers;
41pub mod transaction;
42pub mod util;