[−][src]Struct solana_client::thin_client::ThinClient
An object for querying and sending transactions to the network.
Methods
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
) -> Result<Signature>
[src]
&self,
keypair: &Keypair,
transaction: &mut Transaction,
tries: usize,
min_confirmed_blocks: usize
) -> Result<Signature>
Retry a sending a signed Transaction to the server for processing.
pub fn retry_transfer(
&self,
keypair: &Keypair,
transaction: &mut Transaction,
tries: usize
) -> Result<Signature>
[src]
&self,
keypair: &Keypair,
transaction: &mut Transaction,
tries: usize
) -> Result<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
) -> Result<Signature>
[src]
&self,
keypairs: &T,
transaction: &mut Transaction,
tries: usize,
pending_confirmations: usize
) -> Result<Signature>
Retry sending a signed Transaction to the server for processing
pub fn poll_balance_with_timeout_and_commitment(
&self,
pubkey: &Pubkey,
polling_frequency: &Duration,
timeout: &Duration,
commitment_config: CommitmentConfig
) -> Result<u64>
[src]
&self,
pubkey: &Pubkey,
polling_frequency: &Duration,
timeout: &Duration,
commitment_config: CommitmentConfig
) -> Result<u64>
pub fn poll_balance_with_timeout(
&self,
pubkey: &Pubkey,
polling_frequency: &Duration,
timeout: &Duration
) -> Result<u64>
[src]
&self,
pubkey: &Pubkey,
polling_frequency: &Duration,
timeout: &Duration
) -> Result<u64>
pub fn poll_get_balance(&self, pubkey: &Pubkey) -> Result<u64>
[src]
pub fn poll_get_balance_with_commitment(
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> Result<u64>
[src]
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> Result<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 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 check_signature(&self, signature: &Signature) -> bool
[src]
Check a signature in the bank. This method blocks until the server sends a response.
pub fn validator_exit(&self) -> Result<bool>
[src]
pub fn get_num_blocks_since_signature_confirmation(
&mut self,
sig: &Signature
) -> Result<usize>
[src]
&mut self,
sig: &Signature
) -> Result<usize>
Trait Implementations
impl AsyncClient for ThinClient
[src]
fn async_send_transaction(&self, transaction: Transaction) -> Result<Signature>
[src]
fn async_send_message<T: Signers>(
&self,
keypairs: &T,
message: Message,
recent_blockhash: Hash
) -> Result<Signature>
[src]
&self,
keypairs: &T,
message: Message,
recent_blockhash: Hash
) -> Result<Signature>
fn async_send_instruction(
&self,
keypair: &Keypair,
instruction: Instruction,
recent_blockhash: Hash
) -> Result<Signature>
[src]
&self,
keypair: &Keypair,
instruction: Instruction,
recent_blockhash: Hash
) -> Result<Signature>
fn async_transfer(
&self,
lamports: u64,
keypair: &Keypair,
pubkey: &Pubkey,
recent_blockhash: Hash
) -> Result<Signature>
[src]
&self,
lamports: u64,
keypair: &Keypair,
pubkey: &Pubkey,
recent_blockhash: Hash
) -> Result<Signature>
impl Client for ThinClient
[src]
impl SyncClient for ThinClient
[src]
fn send_message<T: Signers>(
&self,
keypairs: &T,
message: Message
) -> TransportResult<Signature>
[src]
&self,
keypairs: &T,
message: Message
) -> TransportResult<Signature>
fn send_instruction(
&self,
keypair: &Keypair,
instruction: Instruction
) -> TransportResult<Signature>
[src]
&self,
keypair: &Keypair,
instruction: Instruction
) -> TransportResult<Signature>
fn transfer(
&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_recent_blockhash(&self) -> TransportResult<(Hash, FeeCalculator)>
[src]
fn get_recent_blockhash_with_commitment(
&self,
commitment_config: CommitmentConfig
) -> TransportResult<(Hash, FeeCalculator)>
[src]
&self,
commitment_config: CommitmentConfig
) -> TransportResult<(Hash, FeeCalculator)>
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_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 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,