Struct solana_client::thin_client::ThinClient [−][src]
pub struct ThinClient { /* fields omitted */ }
An object for querying and sending transactions to the network.
Implementations
impl ThinClient
[src]
impl ThinClient
[src]pub fn new(
rpc_addr: SocketAddr,
tpu_addr: SocketAddr,
transactions_socket: UdpSocket
) -> Self
[src]
rpc_addr: SocketAddr,
tpu_addr: SocketAddr,
transactions_socket: UdpSocket
) -> Self
Create a new ThinClient that will interface with the Rpc at rpc_addr
using TCP
and the Tpu at tpu_addr
over transactions_socket
using UDP.
pub fn new_socket_with_timeout(
rpc_addr: SocketAddr,
tpu_addr: SocketAddr,
transactions_socket: UdpSocket,
timeout: Duration
) -> Self
[src]
rpc_addr: SocketAddr,
tpu_addr: SocketAddr,
transactions_socket: UdpSocket,
timeout: Duration
) -> Self
pub fn new_from_addrs(
rpc_addrs: Vec<SocketAddr>,
tpu_addrs: Vec<SocketAddr>,
transactions_socket: UdpSocket
) -> Self
[src]
rpc_addrs: Vec<SocketAddr>,
tpu_addrs: Vec<SocketAddr>,
transactions_socket: UdpSocket
) -> Self
pub fn retry_transfer_until_confirmed(
&self,
keypair: &Keypair,
transaction: &mut Transaction,
tries: usize,
min_confirmed_blocks: usize
) -> TransportResult<Signature>
[src]
&self,
keypair: &Keypair,
transaction: &mut Transaction,
tries: usize,
min_confirmed_blocks: usize
) -> TransportResult<Signature>
Retry a sending a signed Transaction to the server for processing.
pub fn retry_transfer(
&self,
keypair: &Keypair,
transaction: &mut Transaction,
tries: usize
) -> TransportResult<Signature>
[src]
&self,
keypair: &Keypair,
transaction: &mut Transaction,
tries: usize
) -> TransportResult<Signature>
Retry sending a signed Transaction with one signing Keypair to the server for processing.
pub fn send_and_confirm_transaction<T: Signers>(
&self,
keypairs: &T,
transaction: &mut Transaction,
tries: usize,
pending_confirmations: usize
) -> TransportResult<Signature>
[src]
&self,
keypairs: &T,
transaction: &mut Transaction,
tries: usize,
pending_confirmations: usize
) -> TransportResult<Signature>
Retry sending a signed Transaction to the server for processing
pub fn poll_get_balance(&self, pubkey: &Pubkey) -> TransportResult<u64>
[src]
pub fn poll_get_balance_with_commitment(
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> TransportResult<u64>
[src]
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> TransportResult<u64>
pub fn wait_for_balance(
&self,
pubkey: &Pubkey,
expected_balance: Option<u64>
) -> Option<u64>
[src]
&self,
pubkey: &Pubkey,
expected_balance: Option<u64>
) -> Option<u64>
pub fn get_program_accounts_with_config(
&self,
pubkey: &Pubkey,
config: RpcProgramAccountsConfig
) -> TransportResult<Vec<(Pubkey, Account)>>
[src]
&self,
pubkey: &Pubkey,
config: RpcProgramAccountsConfig
) -> TransportResult<Vec<(Pubkey, Account)>>
pub fn wait_for_balance_with_commitment(
&self,
pubkey: &Pubkey,
expected_balance: Option<u64>,
commitment_config: CommitmentConfig
) -> Option<u64>
[src]
&self,
pubkey: &Pubkey,
expected_balance: Option<u64>,
commitment_config: CommitmentConfig
) -> Option<u64>
pub fn poll_for_signature_with_commitment(
&self,
signature: &Signature,
commitment_config: CommitmentConfig
) -> TransportResult<()>
[src]
&self,
signature: &Signature,
commitment_config: CommitmentConfig
) -> TransportResult<()>
pub fn get_num_blocks_since_signature_confirmation(
&mut self,
sig: &Signature
) -> TransportResult<usize>
[src]
&mut self,
sig: &Signature
) -> TransportResult<usize>
Trait Implementations
impl AsyncClient for ThinClient
[src]
impl AsyncClient for ThinClient
[src]fn async_send_transaction(
&self,
transaction: Transaction
) -> TransportResult<Signature>
[src]
&self,
transaction: Transaction
) -> TransportResult<Signature>
fn async_send_message<T: Signers>(
&self,
keypairs: &T,
message: Message,
recent_blockhash: Hash
) -> TransportResult<Signature>
[src]
&self,
keypairs: &T,
message: Message,
recent_blockhash: Hash
) -> TransportResult<Signature>
fn async_send_instruction(
&self,
keypair: &Keypair,
instruction: Instruction,
recent_blockhash: Hash
) -> TransportResult<Signature>
[src]
&self,
keypair: &Keypair,
instruction: Instruction,
recent_blockhash: Hash
) -> TransportResult<Signature>
fn async_transfer(
&self,
lamports: u64,
keypair: &Keypair,
pubkey: &Pubkey,
recent_blockhash: Hash
) -> TransportResult<Signature>
[src]
&self,
lamports: u64,
keypair: &Keypair,
pubkey: &Pubkey,
recent_blockhash: Hash
) -> TransportResult<Signature>
impl SyncClient for ThinClient
[src]
impl SyncClient for ThinClient
[src]fn send_and_confirm_message<T: Signers>(
&self,
keypairs: &T,
message: Message
) -> TransportResult<Signature>
[src]
&self,
keypairs: &T,
message: Message
) -> TransportResult<Signature>
fn send_and_confirm_instruction(
&self,
keypair: &Keypair,
instruction: Instruction
) -> TransportResult<Signature>
[src]
&self,
keypair: &Keypair,
instruction: Instruction
) -> TransportResult<Signature>
fn transfer_and_confirm(
&self,
lamports: u64,
keypair: &Keypair,
pubkey: &Pubkey
) -> TransportResult<Signature>
[src]
&self,
lamports: u64,
keypair: &Keypair,
pubkey: &Pubkey
) -> TransportResult<Signature>
fn get_account_data(&self, pubkey: &Pubkey) -> TransportResult<Option<Vec<u8>>>
[src]
fn get_account(&self, pubkey: &Pubkey) -> TransportResult<Option<Account>>
[src]
fn get_account_with_commitment(
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> TransportResult<Option<Account>>
[src]
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> TransportResult<Option<Account>>
fn get_balance(&self, pubkey: &Pubkey) -> TransportResult<u64>
[src]
fn get_balance_with_commitment(
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> TransportResult<u64>
[src]
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> TransportResult<u64>
fn get_minimum_balance_for_rent_exemption(
&self,
data_len: usize
) -> TransportResult<u64>
[src]
&self,
data_len: usize
) -> TransportResult<u64>
fn get_recent_blockhash(&self) -> TransportResult<(Hash, FeeCalculator)>
[src]
fn get_recent_blockhash_with_commitment(
&self,
commitment_config: CommitmentConfig
) -> TransportResult<(Hash, FeeCalculator, Slot)>
[src]
&self,
commitment_config: CommitmentConfig
) -> TransportResult<(Hash, FeeCalculator, Slot)>
fn get_fee_calculator_for_blockhash(
&self,
blockhash: &Hash
) -> TransportResult<Option<FeeCalculator>>
[src]
&self,
blockhash: &Hash
) -> TransportResult<Option<FeeCalculator>>
fn get_fee_rate_governor(&self) -> TransportResult<FeeRateGovernor>
[src]
fn get_signature_status(
&self,
signature: &Signature
) -> TransportResult<Option<Result<()>>>
[src]
&self,
signature: &Signature
) -> TransportResult<Option<Result<()>>>
fn get_signature_status_with_commitment(
&self,
signature: &Signature,
commitment_config: CommitmentConfig
) -> TransportResult<Option<Result<()>>>
[src]
&self,
signature: &Signature,
commitment_config: CommitmentConfig
) -> TransportResult<Option<Result<()>>>
fn get_slot(&self) -> TransportResult<u64>
[src]
fn get_slot_with_commitment(
&self,
commitment_config: CommitmentConfig
) -> TransportResult<u64>
[src]
&self,
commitment_config: CommitmentConfig
) -> TransportResult<u64>
fn get_epoch_info(&self) -> TransportResult<EpochInfo>
[src]
fn get_transaction_count(&self) -> TransportResult<u64>
[src]
fn get_transaction_count_with_commitment(
&self,
commitment_config: CommitmentConfig
) -> TransportResult<u64>
[src]
&self,
commitment_config: CommitmentConfig
) -> TransportResult<u64>
fn poll_for_signature_confirmation(
&self,
signature: &Signature,
min_confirmed_blocks: usize
) -> TransportResult<usize>
[src]
&self,
signature: &Signature,
min_confirmed_blocks: usize
) -> TransportResult<usize>
Poll the server until the signature has been confirmed by at least min_confirmed_blocks
fn poll_for_signature(&self, signature: &Signature) -> TransportResult<()>
[src]
fn get_new_blockhash(
&self,
blockhash: &Hash
) -> TransportResult<(Hash, FeeCalculator)>
[src]
&self,
blockhash: &Hash
) -> TransportResult<(Hash, FeeCalculator)>
Auto Trait Implementations
impl !RefUnwindSafe for ThinClient
impl !RefUnwindSafe for ThinClient
impl Send for ThinClient
impl Send for ThinClient
impl Sync for ThinClient
impl Sync for ThinClient
impl Unpin for ThinClient
impl Unpin for ThinClient
impl !UnwindSafe for ThinClient
impl !UnwindSafe for ThinClient
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
pub default fn example() -> T
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,