[][src]Struct solana_client::rpc_client::RpcClient

pub struct RpcClient { /* fields omitted */ }

Methods

impl RpcClient[src]

pub fn new(url: String) -> Self[src]

pub fn new_mock(url: String) -> Self[src]

pub fn new_socket(addr: SocketAddr) -> Self[src]

pub fn new_socket_with_timeout(addr: SocketAddr, timeout: Duration) -> Self[src]

pub fn send_transaction(
    &self,
    transaction: &Transaction
) -> Result<String, ClientError>
[src]

pub fn get_signature_status(
    &self,
    signature: &str
) -> Result<Option<Result<()>>, ClientError>
[src]

pub fn get_slot(&self) -> Result<u64>[src]

pub fn get_version(&self) -> Result<String>[src]

pub fn send_and_confirm_transaction<T: KeypairUtil>(
    &self,
    transaction: &mut Transaction,
    signer_keys: &[&T]
) -> Result<String, ClientError>
[src]

pub fn send_and_confirm_transactions<T: KeypairUtil>(
    &self,
    transactions: Vec<Transaction>,
    signer_keys: &[&T]
) -> Result<(), Box<dyn Error>>
[src]

pub fn resign_transaction<T: KeypairUtil>(
    &self,
    tx: &mut Transaction,
    signer_keys: &[&T]
) -> Result<(), ClientError>
[src]

pub fn retry_get_balance(
    &self,
    pubkey: &Pubkey,
    retries: usize
) -> Result<Option<u64>, Box<dyn Error>>
[src]

pub fn get_account(&self, pubkey: &Pubkey) -> Result<Account>[src]

pub fn get_account_data(&self, pubkey: &Pubkey) -> Result<Vec<u8>>[src]

pub fn get_balance(&self, pubkey: &Pubkey) -> Result<u64>[src]

Request the balance of the user holding pubkey. This method blocks until the server sends a response. If the response packet is dropped by the network, this method will hang indefinitely.

pub fn get_program_accounts(
    &self,
    pubkey: &Pubkey
) -> Result<Vec<(Pubkey, Account)>>
[src]

pub fn get_transaction_count(&self) -> Result<u64>[src]

Request the transaction count. If the response packet is dropped by the network, this method will try again 5 times.

pub fn get_recent_blockhash(&self) -> Result<(Hash, FeeCalculator)>[src]

pub fn get_new_blockhash(
    &self,
    blockhash: &Hash
) -> Result<(Hash, FeeCalculator)>
[src]

pub fn get_genesis_blockhash(&self) -> Result<Hash>[src]

pub fn poll_balance_with_timeout(
    &self,
    pubkey: &Pubkey,
    polling_frequency: &Duration,
    timeout: &Duration
) -> Result<u64>
[src]

pub fn poll_get_balance(&self, pubkey: &Pubkey) -> Result<u64>[src]

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

pub fn poll_for_signature(&self, signature: &Signature) -> Result<()>[src]

Poll the server to confirm a transaction.

pub fn check_signature(&self, signature: &Signature) -> bool[src]

Check a signature in the bank.

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

Poll the server to confirm a transaction.

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

pub fn fullnode_exit(&self) -> Result<bool>[src]

pub fn retry_make_rpc_request(
    &self,
    request: &RpcRequest,
    params: Option<Value>,
    retries: usize
) -> Result<Value, ClientError>
[src]

Auto Trait Implementations

Blanket Implementations

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

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

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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