diff --git a/client/src/lib.rs b/client/src/lib.rs index 889b0c4d279c08..89b66cf3b34796 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -47,9 +47,6 @@ pub mod rpc_config { pub mod rpc_custom_error { pub use solana_rpc_client_api::custom_error::*; } -pub mod rpc_deprecated_config { - pub use solana_rpc_client_api::deprecated_config::*; -} pub mod rpc_filter { pub use solana_rpc_client_api::filter::*; } diff --git a/rpc-client-api/src/deprecated_config.rs b/rpc-client-api/src/deprecated_config.rs deleted file mode 100644 index ab562aa0e8c05b..00000000000000 --- a/rpc-client-api/src/deprecated_config.rs +++ /dev/null @@ -1,122 +0,0 @@ -#![allow(deprecated)] -use { - crate::config::{ - EncodingConfig, RpcBlockConfig, RpcEncodingConfigWrapper, RpcTransactionConfig, - }, - solana_sdk::{clock::Slot, commitment_config::CommitmentConfig}, - solana_transaction_status::{TransactionDetails, UiTransactionEncoding}, -}; - -#[deprecated( - since = "1.7.0", - note = "Please use RpcSignaturesForAddressConfig instead" -)] -#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct RpcGetConfirmedSignaturesForAddress2Config { - pub before: Option, // Signature as base-58 string - pub until: Option, // Signature as base-58 string - pub limit: Option, - #[serde(flatten)] - pub commitment: Option, -} - -#[deprecated(since = "1.7.0", note = "Please use RpcBlockConfig instead")] -#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct RpcConfirmedBlockConfig { - pub encoding: Option, - pub transaction_details: Option, - pub rewards: Option, - #[serde(flatten)] - pub commitment: Option, -} - -impl EncodingConfig for RpcConfirmedBlockConfig { - fn new_with_encoding(encoding: &Option) -> Self { - Self { - encoding: *encoding, - ..Self::default() - } - } -} - -impl RpcConfirmedBlockConfig { - pub fn rewards_only() -> Self { - Self { - transaction_details: Some(TransactionDetails::None), - ..Self::default() - } - } - - pub fn rewards_with_commitment(commitment: Option) -> Self { - Self { - transaction_details: Some(TransactionDetails::None), - commitment, - ..Self::default() - } - } -} - -impl From for RpcEncodingConfigWrapper { - fn from(config: RpcConfirmedBlockConfig) -> Self { - RpcEncodingConfigWrapper::Current(Some(config)) - } -} - -impl From for RpcBlockConfig { - fn from(config: RpcConfirmedBlockConfig) -> Self { - Self { - encoding: config.encoding, - transaction_details: config.transaction_details, - rewards: config.rewards, - commitment: config.commitment, - max_supported_transaction_version: None, - } - } -} - -#[deprecated(since = "1.7.0", note = "Please use RpcTransactionConfig instead")] -#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct RpcConfirmedTransactionConfig { - pub encoding: Option, - #[serde(flatten)] - pub commitment: Option, -} - -impl EncodingConfig for RpcConfirmedTransactionConfig { - fn new_with_encoding(encoding: &Option) -> Self { - Self { - encoding: *encoding, - ..Self::default() - } - } -} - -impl From for RpcTransactionConfig { - fn from(config: RpcConfirmedTransactionConfig) -> Self { - Self { - encoding: config.encoding, - commitment: config.commitment, - max_supported_transaction_version: None, - } - } -} - -#[deprecated(since = "1.7.0", note = "Please use RpcBlocksConfigWrapper instead")] -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -#[serde(untagged)] -pub enum RpcConfirmedBlocksConfigWrapper { - EndSlotOnly(Option), - CommitmentOnly(Option), -} - -impl RpcConfirmedBlocksConfigWrapper { - pub fn unzip(&self) -> (Option, Option) { - match &self { - RpcConfirmedBlocksConfigWrapper::EndSlotOnly(end_slot) => (*end_slot, None), - RpcConfirmedBlocksConfigWrapper::CommitmentOnly(commitment) => (None, *commitment), - } - } -} diff --git a/rpc-client-api/src/lib.rs b/rpc-client-api/src/lib.rs index 6386a433f719b7..9615efe24ba3a2 100644 --- a/rpc-client-api/src/lib.rs +++ b/rpc-client-api/src/lib.rs @@ -3,7 +3,6 @@ pub mod client_error; pub mod config; pub mod custom_error; -pub mod deprecated_config; pub mod error_object; pub mod filter; pub mod request;