diff --git a/Cargo.lock b/Cargo.lock
index 69ae47c2ad2abf..bd9b10c282a461 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8269,10 +8269,24 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
+ "solana-account",
"solana-account-decoder",
"solana-account-decoder-client-types",
+ "solana-clock",
+ "solana-commitment-config",
+ "solana-epoch-info",
+ "solana-epoch-schedule",
+ "solana-hash",
+ "solana-instruction",
+ "solana-keypair",
+ "solana-program",
+ "solana-pubkey",
"solana-rpc-client-api",
"solana-sdk",
+ "solana-signature",
+ "solana-signer",
+ "solana-transaction",
+ "solana-transaction-error",
"solana-transaction-status-client-types",
"solana-version",
"tokio",
diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock
index 4aabc16f3c955e..169ed507baba7f 100644
--- a/programs/sbf/Cargo.lock
+++ b/programs/sbf/Cargo.lock
@@ -6539,9 +6539,20 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
+ "solana-account",
"solana-account-decoder-client-types",
+ "solana-clock",
+ "solana-commitment-config",
+ "solana-epoch-info",
+ "solana-epoch-schedule",
+ "solana-hash",
+ "solana-instruction",
+ "solana-program",
+ "solana-pubkey",
"solana-rpc-client-api",
- "solana-sdk",
+ "solana-signature",
+ "solana-transaction",
+ "solana-transaction-error",
"solana-transaction-status-client-types",
"solana-version",
"tokio",
diff --git a/rpc-client/Cargo.toml b/rpc-client/Cargo.toml
index bb5adfef1d36c2..4ac8634e073a9c 100644
--- a/rpc-client/Cargo.toml
+++ b/rpc-client/Cargo.toml
@@ -22,9 +22,20 @@ semver = { workspace = true }
serde = { workspace = true }
serde_derive = { workspace = true }
serde_json = { workspace = true }
+solana-account = { workspace = true }
solana-account-decoder-client-types = { workspace = true, features = ["zstd"] }
+solana-clock = { workspace = true }
+solana-commitment-config = { workspace = true }
+solana-epoch-info = { workspace = true }
+solana-epoch-schedule = { workspace = true }
+solana-hash = { workspace = true }
+solana-instruction = { workspace = true }
+solana-program = { workspace = true, default-features = false }
+solana-pubkey = { workspace = true }
solana-rpc-client-api = { workspace = true }
-solana-sdk = { workspace = true }
+solana-signature = { workspace = true }
+solana-transaction = { workspace = true }
+solana-transaction-error = { workspace = true }
solana-transaction-status-client-types = { workspace = true }
solana-version = { workspace = true }
tokio = { workspace = true, features = ["full"] }
@@ -36,6 +47,9 @@ futures = { workspace = true }
jsonrpc-core = { workspace = true }
jsonrpc-http-server = { workspace = true }
solana-account-decoder = { workspace = true }
+solana-keypair = { workspace = true }
+solana-sdk = { path = "../sdk" }
+solana-signer = { workspace = true }
[features]
default = ["spinner"]
diff --git a/rpc-client/src/mock_sender.rs b/rpc-client/src/mock_sender.rs
index 92e384ecc89a94..a08c9ff932d2b3 100644
--- a/rpc-client/src/mock_sender.rs
+++ b/rpc-client/src/mock_sender.rs
@@ -6,6 +6,12 @@ use {
base64::{prelude::BASE64_STANDARD, Engine},
serde_json::{json, Number, Value},
solana_account_decoder_client_types::{UiAccount, UiAccountData, UiAccountEncoding},
+ solana_clock::{Slot, UnixTimestamp},
+ solana_epoch_info::EpochInfo,
+ solana_epoch_schedule::EpochSchedule,
+ solana_instruction::error::InstructionError,
+ solana_program::message::MessageHeader,
+ solana_pubkey::Pubkey,
solana_rpc_client_api::{
client_error::Result,
config::RpcBlockProductionConfig,
@@ -19,16 +25,9 @@ use {
RpcVoteAccountStatus,
},
},
- solana_sdk::{
- clock::{Slot, UnixTimestamp},
- epoch_info::EpochInfo,
- instruction::InstructionError,
- message::MessageHeader,
- pubkey::Pubkey,
- signature::Signature,
- sysvar::epoch_schedule::EpochSchedule,
- transaction::{self, Transaction, TransactionError, TransactionVersion},
- },
+ solana_signature::Signature,
+ solana_transaction::{versioned::TransactionVersion, Transaction},
+ solana_transaction_error::{TransactionError, TransactionResult},
solana_transaction_status_client_types::{
option_serializer::OptionSerializer, EncodedConfirmedBlock,
EncodedConfirmedTransactionWithStatusMeta, EncodedTransaction,
@@ -124,7 +123,7 @@ impl RpcSender for MockSender {
transaction_count: Some(123),
})?,
"getSignatureStatuses" => {
- let status: transaction::Result<()> = if self.url == "account_in_use" {
+ let status: TransactionResult<()> = if self.url == "account_in_use" {
Err(TransactionError::AccountInUse)
} else if self.url == "instruction_error" {
Err(TransactionError::InstructionError(
@@ -455,7 +454,7 @@ pub(crate) fn mock_encoded_account(pubkey: &Pubkey) -> UiAccount {
#[cfg(test)]
mod tests {
- use {super::*, solana_account_decoder::encode_ui_account, solana_sdk::account::Account};
+ use {super::*, solana_account::Account, solana_account_decoder::encode_ui_account};
#[test]
fn test_mock_encoded_account() {
diff --git a/rpc-client/src/nonblocking/rpc_client.rs b/rpc-client/src/nonblocking/rpc_client.rs
index 33bf1c119bd2f5..73b698347a0f14 100644
--- a/rpc-client/src/nonblocking/rpc_client.rs
+++ b/rpc-client/src/nonblocking/rpc_client.rs
@@ -8,7 +8,7 @@
pub use crate::mock_sender::Mocks;
#[cfg(feature = "spinner")]
-use {crate::spinner, solana_sdk::clock::MAX_HASH_AGE_IN_SECONDS, std::cmp::min};
+use {crate::spinner, solana_clock::MAX_HASH_AGE_IN_SECONDS, std::cmp::min};
use {
crate::{
http_sender::HttpSender,
@@ -23,10 +23,18 @@ use {
bincode::serialize,
log::*,
serde_json::{json, Value},
+ solana_account::Account,
solana_account_decoder_client_types::{
token::{TokenAccountType, UiTokenAccount, UiTokenAmount},
UiAccount, UiAccountData, UiAccountEncoding,
},
+ solana_clock::{Epoch, Slot, UnixTimestamp, DEFAULT_MS_PER_SLOT},
+ solana_commitment_config::CommitmentConfig,
+ solana_epoch_info::EpochInfo,
+ solana_epoch_schedule::EpochSchedule,
+ solana_hash::Hash,
+ solana_program::vote::state::MAX_LOCKOUT_HISTORY,
+ solana_pubkey::Pubkey,
solana_rpc_client_api::{
client_error::{
Error as ClientError, ErrorKind as ClientErrorKind, Result as ClientResult,
@@ -35,18 +43,8 @@ use {
request::{RpcError, RpcRequest, RpcResponseErrorData, TokenAccountsFilter},
response::*,
},
- solana_sdk::{
- account::Account,
- clock::{Epoch, Slot, UnixTimestamp, DEFAULT_MS_PER_SLOT},
- commitment_config::CommitmentConfig,
- epoch_info::EpochInfo,
- epoch_schedule::EpochSchedule,
- hash::Hash,
- pubkey::Pubkey,
- signature::Signature,
- transaction,
- vote::state::MAX_LOCKOUT_HISTORY,
- },
+ solana_signature::Signature,
+ solana_transaction_error::TransactionResult,
solana_transaction_status_client_types::{
EncodedConfirmedBlock, EncodedConfirmedTransactionWithStatusMeta, TransactionStatus,
UiConfirmedBlock, UiTransactionEncoding,
@@ -115,14 +113,15 @@ use {
/// field, so it is common for the value to be accessed with `?.value`, as in
///
/// ```
+/// # use solana_hash::Hash;
/// # use solana_sdk::system_transaction;
/// # use solana_rpc_client_api::client_error::Error;
/// # use solana_rpc_client::rpc_client::RpcClient;
-/// # use solana_sdk::signature::{Keypair, Signer};
-/// # use solana_sdk::hash::Hash;
+/// # use solana_keypair::Keypair;
+/// # use solana_signer::Signer;
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// # let key = Keypair::new();
-/// # let to = solana_sdk::pubkey::new_rand();
+/// # let to = solana_pubkey::new_rand();
/// # let lamports = 50;
/// # let latest_blockhash = Hash::default();
/// # let tx = system_transaction::transfer(&key, &to, lamports, latest_blockhash);
@@ -193,7 +192,7 @@ impl RpcClient {
/// # Examples
///
/// ```
- /// # use solana_sdk::commitment_config::CommitmentConfig;
+ /// # use solana_commitment_config::CommitmentConfig;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
/// let url = "http://localhost:8899".to_string();
/// let commitment_config = CommitmentConfig::processed();
@@ -244,7 +243,7 @@ impl RpcClient {
/// ```
/// # use std::time::Duration;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::commitment_config::CommitmentConfig;
+ /// # use solana_commitment_config::CommitmentConfig;
/// let url = "http://localhost::8899".to_string();
/// let timeout = Duration::from_secs(1);
/// let commitment_config = CommitmentConfig::processed();
@@ -285,7 +284,7 @@ impl RpcClient {
/// ```
/// # use std::time::Duration;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::commitment_config::CommitmentConfig;
+ /// # use solana_commitment_config::CommitmentConfig;
/// let url = "http://localhost::8899".to_string();
/// let timeout = Duration::from_secs(1);
/// let commitment_config = CommitmentConfig::processed();
@@ -465,7 +464,7 @@ impl RpcClient {
/// ```
/// # use std::net::{Ipv4Addr, SocketAddr};
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::commitment_config::CommitmentConfig;
+ /// # use solana_commitment_config::CommitmentConfig;
/// let addr = SocketAddr::from((Ipv4Addr::LOCALHOST, 8899));
/// let commitment_config = CommitmentConfig::processed();
/// let client = RpcClient::new_socket_with_commitment(
@@ -571,12 +570,10 @@ impl RpcClient {
/// ```
/// # use solana_rpc_client_api::client_error::Error;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # system_transaction,
- /// # };
+ /// # use solana_keypair::Keypair;
+ /// # use solana_sdk::system_transaction;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// # let alice = Keypair::new();
@@ -742,13 +739,11 @@ impl RpcClient {
/// ```
/// # use solana_rpc_client_api::client_error::Error;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # hash::Hash,
- /// # system_transaction,
- /// # };
+ /// # use solana_hash::Hash;
+ /// # use solana_keypair::Keypair;
+ /// # use solana_sdk::system_transaction;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// // Transfer lamports from Alice to Bob
@@ -830,13 +825,11 @@ impl RpcClient {
/// # config::RpcSendTransactionConfig,
/// # };
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # hash::Hash,
- /// # system_transaction,
- /// # };
+ /// # use solana_hash::Hash;
+ /// # use solana_keypair::Keypair;
+ /// # use solana_sdk::system_transaction;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// // Transfer lamports from Alice to Bob
@@ -950,12 +943,10 @@ impl RpcClient {
/// ```
/// # use solana_rpc_client_api::client_error::Error;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # system_transaction,
- /// # };
+ /// # use solana_keypair::Keypair;
+ /// # use solana_sdk::system_transaction;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// // Transfer lamports from Alice to Bob and wait for confirmation
@@ -1009,13 +1000,11 @@ impl RpcClient {
/// ```
/// # use solana_rpc_client_api::client_error::Error;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # commitment_config::CommitmentConfig,
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # system_transaction,
- /// # };
+ /// # use solana_commitment_config::CommitmentConfig;
+ /// # use solana_keypair::Keypair;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
+ /// # use solana_sdk::system_transaction;
/// # use std::time::Duration;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
@@ -1184,13 +1173,11 @@ impl RpcClient {
/// # response::RpcSimulateTransactionResult,
/// # };
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # hash::Hash,
- /// # system_transaction,
- /// # };
+ /// # use solana_hash::Hash;
+ /// # use solana_keypair::Keypair;
+ /// # use solana_sdk::system_transaction;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// // Transfer lamports from Alice to Bob
@@ -1259,18 +1246,16 @@ impl RpcClient {
/// # Examples
///
/// ```
+ /// # use solana_hash::Hash;
+ /// # use solana_keypair::Keypair;
/// # use solana_rpc_client_api::{
/// # client_error::Error,
/// # config::RpcSimulateTransactionConfig,
/// # response::RpcSimulateTransactionResult,
/// # };
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signer::keypair::Keypair,
- /// # hash::Hash,
- /// # system_transaction,
- /// # };
+ /// # use solana_signer::Signer;
+ /// # use solana_sdk::system_transaction;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// // Transfer lamports from Alice to Bob
@@ -1355,11 +1340,11 @@ impl RpcClient {
/// and the transaction failed, this method returns `Ok(Some(Err(_)))`,
/// where the interior error is type [`TransactionError`].
///
- /// [`TransactionError`]: solana_sdk::transaction::TransactionError
+ /// [`TransactionError`]: solana_transaction_error::TransactionError
///
/// This function only searches a node's recent history, including all
/// recent slots, plus up to
- /// [`MAX_RECENT_BLOCKHASHES`][solana_sdk::clock::MAX_RECENT_BLOCKHASHES]
+ /// [`MAX_RECENT_BLOCKHASHES`][solana_clock::MAX_RECENT_BLOCKHASHES]
/// rooted slots. To search the full transaction history use the
/// [`get_signature_status_with_commitment_and_history`][RpcClient::get_signature_status_with_commitment_and_history]
/// method.
@@ -1375,13 +1360,11 @@ impl RpcClient {
/// ```
/// # use solana_rpc_client_api::client_error::Error;
/// # use solana_rpc_client::nonblocking::rpc_client::RpcClient;
- /// # use solana_sdk::{
- /// # signature::Signer,
- /// # signature::Signature,
- /// # signer::keypair::Keypair,
- /// # hash::Hash,
- /// # system_transaction,
- /// # };
+ /// # use solana_hash::Hash;
+ /// # use solana_keypair::Keypair;
+ /// # use solana_sdk::system_transaction;
+ /// # use solana_signature::Signature;
+ /// # use solana_signer::Signer;
/// # futures::executor::block_on(async {
/// # let rpc_client = RpcClient::new_mock("succeeds".to_string());
/// # let alice = Keypair::new();
@@ -1398,7 +1381,7 @@ impl RpcClient {
pub async fn get_signature_status(
&self,
signature: &Signature,
- ) -> ClientResult