Struct solana_client::thin_client::ThinClient [−][src]
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]
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 validator_exit(&self) -> TransportResult<bool>
[src]
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]
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 Client 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)>
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]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> 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> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,