#[cfg(all(feature = "solana-v2", feature = "solana-v3"))]
compile_error!("Cannot enable both 'solana-v2' and 'solana-v3' features at the same time. Choose one.");
#[cfg(all(feature = "client", feature = "client-v3"))]
compile_error!("Cannot enable both 'client' and 'client-v3' features at the same time. Use 'client' for Solana v2 or 'client-v3' for Solana v3.");
#[cfg(all(feature = "client-v2", feature = "client-v3"))]
compile_error!("Cannot enable both 'client-v2' and 'client-v3' features at the same time. Use 'client-v2' for Solana v2 or 'client-v3' for Solana v3.");
#[cfg(feature = "anchor")]
pub use anchor_lang::solana_program;
#[cfg(all(not(feature = "anchor"), feature = "solana-v2"))]
pub use solana_program_v2 as solana_program;
#[cfg(all(not(feature = "anchor"), feature = "solana-v3"))]
pub use solana_program_v3 as solana_program;
#[cfg(feature = "client-v3")]
pub use solana_sdk_v3 as solana_sdk;
#[cfg(all(feature = "client", not(feature = "client-v3")))]
pub use solana_sdk_v2 as solana_sdk;
#[cfg(all(any(feature = "client", feature = "client-v2"), not(feature = "client-v3")))]
pub mod address_lookup_table {
#[allow(deprecated)]
pub use solana_sdk_v2::address_lookup_table::*;
}
#[cfg(all(any(feature = "client", feature = "client-v2"), not(feature = "client-v3")))]
pub mod compute_budget {
#[allow(deprecated)]
pub use solana_sdk_v2::compute_budget::*;
}
#[cfg(all(any(feature = "client", feature = "client-v2"), not(feature = "client-v3")))]
pub mod commitment_config {
#[allow(deprecated)]
pub use solana_sdk_v2::commitment_config::*;
}
#[cfg(feature = "client-v3")]
pub mod address_lookup_table {
#[allow(deprecated)]
pub use solana_sdk_v2::address_lookup_table::*;
}
#[cfg(feature = "client-v3")]
pub mod compute_budget {
#[allow(deprecated)]
pub use solana_sdk_v2::compute_budget::*;
}
#[cfg(feature = "client-v3")]
pub mod commitment_config {
#[allow(deprecated)]
pub use solana_sdk_v2::commitment_config::*;
}
#[cfg(feature = "client-v3")]
pub mod client {
#[allow(deprecated)]
pub use solana_sdk_v2::client::*;
}
#[cfg(feature = "client-v3")]
pub use solana_client_v3 as solana_client;
#[cfg(all(feature = "client", not(feature = "client-v3")))]
pub use solana_client_v2 as solana_client;
pub use solana_program::{
account_info::AccountInfo,
instruction::{AccountMeta, Instruction},
msg,
pubkey::{pubkey, Pubkey},
sysvar,
};
#[cfg(not(feature = "anchor"))]
pub use solana_program::{ed25519_program, hash, syscalls};
#[cfg(feature = "anchor")]
pub use solana_program_v2::{ed25519_program, hash, syscalls};
extern "C" {
pub fn sol_memcpy_(dst: *mut u8, src: *const u8, n: u64);
}
#[cfg(feature = "anchor")]
pub use solana_program_v2::address_lookup_table::AddressLookupTableAccount;
#[cfg(all(feature = "solana-v2", not(feature = "solana-v3"), not(feature = "anchor")))]
pub use solana_program::address_lookup_table::AddressLookupTableAccount;
#[cfg(all(feature = "solana-v3", feature = "client-v3"))]
pub use address_lookup_table::AddressLookupTableAccount;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ClusterType {
MainnetBeta,
Testnet,
Devnet,
Development,
}