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]

pub fn new(
    rpc_addr: SocketAddr,
    tpu_addr: SocketAddr,
    transactions_socket: UdpSocket
) -> Self
[src]

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]

pub fn new_from_addrs(
    rpc_addrs: Vec<SocketAddr>,
    tpu_addrs: Vec<SocketAddr>,
    transactions_socket: UdpSocket
) -> Self
[src]

pub fn retry_transfer_until_confirmed(
    &self,
    keypair: &Keypair,
    transaction: &mut Transaction,
    tries: usize,
    min_confirmed_blocks: usize
) -> TransportResult<Signature>
[src]

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]

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]

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]

pub fn wait_for_balance(
    &self,
    pubkey: &Pubkey,
    expected_balance: Option<u64>
) -> Option<u64>
[src]

pub fn get_program_accounts_with_config(
    &self,
    pubkey: &Pubkey,
    config: RpcProgramAccountsConfig
) -> TransportResult<Vec<(Pubkey, Account)>>
[src]

pub fn wait_for_balance_with_commitment(
    &self,
    pubkey: &Pubkey,
    expected_balance: Option<u64>,
    commitment_config: CommitmentConfig
) -> Option<u64>
[src]

pub fn poll_for_signature_with_commitment(
    &self,
    signature: &Signature,
    commitment_config: CommitmentConfig
) -> TransportResult<()>
[src]

pub fn validator_exit(&self) -> TransportResult<bool>[src]

pub fn get_num_blocks_since_signature_confirmation(
    &mut self,
    sig: &Signature
) -> TransportResult<usize>
[src]

Trait Implementations

impl AsyncClient for ThinClient[src]

impl Client for ThinClient[src]

impl SyncClient for ThinClient[src]

fn poll_for_signature_confirmation(
    &self,
    signature: &Signature,
    min_confirmed_blocks: usize
) -> TransportResult<usize>
[src]

Poll the server until the signature has been confirmed by at least min_confirmed_blocks

fn get_evm_balance(&self, pubkey: &Address) -> TransportResult<U256>[src]

Get account balance or 0 if not found.

Auto Trait Implementations

impl !RefUnwindSafe for ThinClient

impl Send for ThinClient

impl Sync for ThinClient

impl Unpin for ThinClient

impl !UnwindSafe for ThinClient

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]