Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions client/example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ events = { path = "../../tests/events/programs/events", features = ["no-entrypoi
anyhow = "1.0.32"
clap = { version = "4.2.4", features = ["derive"] }
shellexpand = "2.1.0"
solana-commitment-config = "3.0.0"
solana-sdk = "3.0.0"
solana-signer = "3.0.0"
solana-system-interface = "2.0.0"
tokio = { version = "1", features = ["full"] }
3 changes: 1 addition & 2 deletions client/example/src/blocking.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use anchor_client::{Client, Cluster};
use anchor_client::{Client, Cluster, CommitmentConfig};
use anyhow::Result;
use clap::Parser;
use solana_commitment_config::CommitmentConfig;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::read_keypair_file;
use solana_sdk::signature::{Keypair, Signer};
Expand Down
3 changes: 1 addition & 2 deletions client/example/src/nonblocking.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use anchor_client::{Client, Cluster};
use anchor_client::{Client, Cluster, CommitmentConfig};
use anyhow::Result;
use clap::Parser;
use solana_commitment_config::CommitmentConfig;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::read_keypair_file;
use solana_sdk::signature::{Keypair, Signer};
Expand Down
36 changes: 18 additions & 18 deletions client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,10 @@
//! ```ignore
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have this be no_run to avoid any more drift in docs vs real API, but that requires some awkward work (see my PR) and as long as we don't make any other breaking changes to the API it should be fine.

//! use std::rc::Rc;
//!
//! use anchor_client::{
//! solana_sdk::{
//! signature::{read_keypair_file, Keypair},
//! signer::Signer,
//! system_program,
//! },
//! Client, Cluster,
//! };
//! use anchor_client::{Client, Cluster, Signer};
//! use my_program::{accounts, instruction, MyAccount};
//! use solana_keypair::{read_keypair_file, Keypair};
//! use solana_system_interface::program as system_program;
//!
//! fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Create client
Expand Down Expand Up @@ -75,23 +70,18 @@ use anchor_lang::{AccountDeserialize, Discriminator, InstructionData, ToAccountM
use futures::{Future, StreamExt};
use regex::Regex;
use solana_account_decoder::{UiAccount, UiAccountEncoding};
use solana_commitment_config::CommitmentConfig;
use solana_instruction::{AccountMeta, Instruction};
use solana_program::hash::Hash;
use solana_pubsub_client::nonblocking::pubsub_client::{PubsubClient, PubsubClientError};
use solana_instruction::AccountMeta;
use solana_pubsub_client::nonblocking::pubsub_client::PubsubClient;
use solana_rpc_client::nonblocking::rpc_client::RpcClient as AsyncRpcClient;
use solana_rpc_client_api::{
client_error::Error as SolanaClientError,
config::{
RpcAccountInfoConfig, RpcProgramAccountsConfig, RpcSendTransactionConfig,
RpcTransactionLogsConfig, RpcTransactionLogsFilter,
RpcAccountInfoConfig, RpcProgramAccountsConfig, RpcTransactionLogsConfig,
RpcTransactionLogsFilter,
},
filter::{Memcmp, RpcFilterType},
filter::Memcmp,
response::{Response as RpcResponse, RpcLogsResponse},
};
use solana_signature::Signature;
use solana_signer::{Signer, SignerError};
use solana_transaction::Transaction;
use std::iter::Map;
use std::marker::PhantomData;
use std::ops::Deref;
Expand All @@ -113,6 +103,16 @@ pub use cluster::Cluster;
#[cfg(feature = "async")]
pub use nonblocking::ThreadSafeSigner;
pub use solana_account_decoder;
pub use solana_commitment_config::CommitmentConfig;
pub use solana_instruction::Instruction;
pub use solana_program::hash::Hash;
pub use solana_pubsub_client::nonblocking::pubsub_client::PubsubClientError;
pub use solana_rpc_client_api::{
client_error::Error as SolanaClientError, config::RpcSendTransactionConfig,
filter::RpcFilterType,
};
pub use solana_signer::{Signer, SignerError};
pub use solana_transaction::Transaction;

mod cluster;

Expand Down