2025-09-19 00:49:45 +08:00
|
|
|
use crate::swqos::SwqosConfig;
|
2025-09-27 14:24:41 +08:00
|
|
|
use solana_commitment_config::CommitmentConfig;
|
2025-09-17 11:14:15 +08:00
|
|
|
|
|
|
|
|
#[derive(Debug, Clone)]
|
|
|
|
|
pub struct TradeConfig {
|
|
|
|
|
pub rpc_url: String,
|
|
|
|
|
pub swqos_configs: Vec<SwqosConfig>,
|
|
|
|
|
pub commitment: CommitmentConfig,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl TradeConfig {
|
|
|
|
|
pub fn new(
|
|
|
|
|
rpc_url: String,
|
|
|
|
|
swqos_configs: Vec<SwqosConfig>,
|
|
|
|
|
commitment: CommitmentConfig,
|
|
|
|
|
) -> Self {
|
2025-09-19 00:49:45 +08:00
|
|
|
Self { rpc_url, swqos_configs, commitment }
|
2025-09-17 11:14:15 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-02 13:39:59 +08:00
|
|
|
pub type SolanaRpcClient = solana_client::nonblocking::rpc_client::RpcClient;
|
2025-04-10 11:04:55 +08:00
|
|
|
pub type AnyResult<T> = anyhow::Result<T>;
|