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

pub struct RpcClient { /* fields omitted */ }

Implementations

impl RpcClient[src]

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

pub fn new_with_commitment(
    url: String,
    commitment_config: CommitmentConfig
) -> Self
[src]

pub fn new_with_timeout(url: String, timeout: Duration) -> Self[src]

pub fn new_with_timeout_and_commitment(
    url: String,
    timeout: Duration,
    commitment_config: CommitmentConfig
) -> Self
[src]

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

pub fn new_mock_with_mocks(url: String, mocks: Mocks) -> Self[src]

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

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

pub fn commitment(&self) -> CommitmentConfig[src]

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

pub fn confirm_transaction_with_commitment(
    &self,
    signature: &Signature,
    commitment_config: CommitmentConfig
) -> RpcResult<bool>
[src]

pub fn send_transaction(
    &self,
    transaction: &Transaction
) -> ClientResult<Signature>
[src]

pub fn send_transaction_with_config(
    &self,
    transaction: &Transaction,
    config: RpcSendTransactionConfig
) -> ClientResult<Signature>
[src]

pub fn simulate_transaction(
    &self,
    transaction: &Transaction
) -> RpcResult<RpcSimulateTransactionResult>
[src]

pub fn simulate_transaction_with_config(
    &self,
    transaction: &Transaction,
    config: RpcSimulateTransactionConfig
) -> RpcResult<RpcSimulateTransactionResult>
[src]

pub fn get_snapshot_slot(&self) -> ClientResult<Slot>[src]

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

pub fn get_signature_statuses(
    &self,
    signatures: &[Signature]
) -> RpcResult<Vec<Option<TransactionStatus>>>
[src]

pub fn get_signature_statuses_with_history(
    &self,
    signatures: &[Signature]
) -> RpcResult<Vec<Option<TransactionStatus>>>
[src]

pub fn get_signature_status_with_commitment(
    &self,
    signature: &Signature,
    commitment_config: CommitmentConfig
) -> ClientResult<Option<Result<()>>>
[src]

pub fn get_signature_status_with_commitment_and_history(
    &self,
    signature: &Signature,
    commitment_config: CommitmentConfig,
    search_transaction_history: bool
) -> ClientResult<Option<Result<()>>>
[src]

pub fn get_slot(&self) -> ClientResult<Slot>[src]

pub fn get_slot_with_commitment(
    &self,
    commitment_config: CommitmentConfig
) -> ClientResult<Slot>
[src]

pub fn supply(&self) -> RpcResult<RpcSupply>[src]

pub fn supply_with_commitment(
    &self,
    commitment_config: CommitmentConfig
) -> RpcResult<RpcSupply>
[src]

pub fn total_supply(&self) -> ClientResult<u64>[src]

pub fn total_supply_with_commitment(
    &self,
    commitment_config: CommitmentConfig
) -> ClientResult<u64>
[src]

pub fn get_largest_accounts_with_config(
    &self,
    config: RpcLargestAccountsConfig
) -> RpcResult<Vec<RpcAccountBalance>>
[src]

pub fn get_vote_accounts(&self) -> ClientResult<RpcVoteAccountStatus>[src]

pub fn get_vote_accounts_with_commitment(
    &self,
    commitment_config: CommitmentConfig
) -> ClientResult<RpcVoteAccountStatus>
[src]

pub fn wait_for_max_stake(
    &self,
    commitment: CommitmentConfig,
    max_stake_percent: f32
) -> ClientResult<()>
[src]

pub fn get_cluster_nodes(&self) -> ClientResult<Vec<RpcContactInfo>>[src]

pub fn get_confirmed_block(
    &self,
    slot: Slot
) -> ClientResult<EncodedConfirmedBlock>
[src]

pub fn get_confirmed_block_with_encoding(
    &self,
    slot: Slot,
    encoding: UiTransactionEncoding
) -> ClientResult<EncodedConfirmedBlock>
[src]

pub fn get_confirmed_blocks(
    &self,
    start_slot: Slot,
    end_slot: Option<Slot>
) -> ClientResult<Vec<Slot>>
[src]

pub fn get_confirmed_blocks_with_limit(
    &self,
    start_slot: Slot,
    limit: usize
) -> ClientResult<Vec<Slot>>
[src]

pub fn get_confirmed_signatures_for_address(
    &self,
    address: &Pubkey,
    start_slot: Slot,
    end_slot: Slot
) -> ClientResult<Vec<Signature>>
[src]

pub fn get_confirmed_signatures_for_address2(
    &self,
    address: &Pubkey
) -> ClientResult<Vec<RpcConfirmedTransactionStatusWithSignature>>
[src]

pub fn get_confirmed_signatures_for_address2_with_config(
    &self,
    address: &Pubkey,
    config: GetConfirmedSignaturesForAddress2Config
) -> ClientResult<Vec<RpcConfirmedTransactionStatusWithSignature>>
[src]

pub fn get_confirmed_transaction(
    &self,
    signature: &Signature,
    encoding: UiTransactionEncoding
) -> ClientResult<EncodedConfirmedTransaction>
[src]

pub fn get_block_time(&self, slot: Slot) -> ClientResult<UnixTimestamp>[src]

pub fn get_epoch_info(&self) -> ClientResult<EpochInfo>[src]

pub fn get_epoch_info_with_commitment(
    &self,
    commitment_config: CommitmentConfig
) -> ClientResult<EpochInfo>
[src]

pub fn get_leader_schedule(
    &self,
    slot: Option<Slot>
) -> ClientResult<Option<RpcLeaderSchedule>>
[src]

pub fn get_leader_schedule_with_commitment(
    &self,
    slot: Option<Slot>,
    commitment_config: CommitmentConfig
) -> ClientResult<Option<RpcLeaderSchedule>>
[src]

pub fn get_epoch_schedule(&self) -> ClientResult<EpochSchedule>[src]

pub fn get_identity(&self) -> ClientResult<Pubkey>[src]

pub fn get_inflation_governor(&self) -> ClientResult<RpcInflationGovernor>[src]

pub fn get_inflation_rate(&self) -> ClientResult<RpcInflationRate>[src]

pub fn get_version(&self) -> ClientResult<RpcVersionInfo>[src]

pub fn minimum_ledger_slot(&self) -> ClientResult<Slot>[src]

pub fn send_and_confirm_transaction(
    &self,
    transaction: &Transaction
) -> ClientResult<Signature>
[src]

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

Note that get_account returns Err(..) if the account does not exist whereas get_account_with_commitment returns Ok(None) if the account does not exist.

pub fn get_account_with_commitment(
    &self,
    pubkey: &Pubkey,
    commitment_config: CommitmentConfig
) -> RpcResult<Option<Account>>
[src]

pub fn get_multiple_accounts(
    &self,
    pubkeys: &[Pubkey]
) -> ClientResult<Vec<Option<Account>>>
[src]

pub fn get_multiple_accounts_with_commitment(
    &self,
    pubkeys: &[Pubkey],
    commitment_config: CommitmentConfig
) -> RpcResult<Vec<Option<Account>>>
[src]

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

pub fn get_minimum_balance_for_rent_exemption(
    &self,
    data_len: usize
) -> ClientResult<u64>
[src]

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

Request the balance of the account pubkey.

pub fn get_balance_with_commitment(
    &self,
    pubkey: &Pubkey,
    commitment_config: CommitmentConfig
) -> RpcResult<u64>
[src]

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

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

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

Request the transaction count.

pub fn get_transaction_count_with_commitment(
    &self,
    commitment_config: CommitmentConfig
) -> ClientResult<u64>
[src]

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

pub fn get_recent_blockhash_with_commitment(
    &self,
    commitment_config: CommitmentConfig
) -> RpcResult<(Hash, FeeCalculator, Slot)>
[src]

pub fn get_fee_calculator_for_blockhash(
    &self,
    blockhash: &Hash
) -> ClientResult<Option<FeeCalculator>>
[src]

pub fn get_fee_calculator_for_blockhash_with_commitment(
    &self,
    blockhash: &Hash,
    commitment_config: CommitmentConfig
) -> RpcResult<Option<FeeCalculator>>
[src]

pub fn get_fee_rate_governor(&self) -> RpcResult<FeeRateGovernor>[src]

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

pub fn get_first_available_block(&self) -> ClientResult<Slot>[src]

pub fn get_genesis_hash(&self) -> ClientResult<Hash>[src]

pub fn get_health(&self) -> ClientResult<()>[src]

pub fn get_token_account(
    &self,
    pubkey: &Pubkey
) -> ClientResult<Option<UiTokenAccount>>
[src]

pub fn get_token_account_with_commitment(
    &self,
    pubkey: &Pubkey,
    commitment_config: CommitmentConfig
) -> RpcResult<Option<UiTokenAccount>>
[src]

pub fn get_token_account_balance(
    &self,
    pubkey: &Pubkey
) -> ClientResult<UiTokenAmount>
[src]

pub fn get_token_account_balance_with_commitment(
    &self,
    pubkey: &Pubkey,
    commitment_config: CommitmentConfig
) -> RpcResult<UiTokenAmount>
[src]

pub fn get_token_accounts_by_delegate(
    &self,
    delegate: &Pubkey,
    token_account_filter: TokenAccountsFilter
) -> ClientResult<Vec<RpcKeyedAccount>>
[src]

pub fn get_token_accounts_by_delegate_with_commitment(
    &self,
    delegate: &Pubkey,
    token_account_filter: TokenAccountsFilter,
    commitment_config: CommitmentConfig
) -> RpcResult<Vec<RpcKeyedAccount>>
[src]

pub fn get_token_accounts_by_owner(
    &self,
    owner: &Pubkey,
    token_account_filter: TokenAccountsFilter
) -> ClientResult<Vec<RpcKeyedAccount>>
[src]

pub fn get_token_accounts_by_owner_with_commitment(
    &self,
    owner: &Pubkey,
    token_account_filter: TokenAccountsFilter,
    commitment_config: CommitmentConfig
) -> RpcResult<Vec<RpcKeyedAccount>>
[src]

pub fn get_token_supply(&self, mint: &Pubkey) -> ClientResult<UiTokenAmount>[src]

pub fn get_token_supply_with_commitment(
    &self,
    mint: &Pubkey,
    commitment_config: CommitmentConfig
) -> RpcResult<UiTokenAmount>
[src]

pub fn poll_get_balance_with_commitment(
    &self,
    pubkey: &Pubkey,
    commitment_config: CommitmentConfig
) -> ClientResult<u64>
[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(&self, signature: &Signature) -> ClientResult<()>[src]

Poll the server to confirm a transaction.

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

Poll the server to confirm a transaction.

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

Poll the server to confirm a transaction.

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

pub fn send_and_confirm_transaction_with_spinner(
    &self,
    transaction: &Transaction
) -> ClientResult<Signature>
[src]

pub fn send_and_confirm_transaction_with_spinner_and_commitment(
    &self,
    transaction: &Transaction,
    commitment: CommitmentConfig
) -> ClientResult<Signature>
[src]

pub fn send_and_confirm_transaction_with_spinner_and_config(
    &self,
    transaction: &Transaction,
    commitment: CommitmentConfig,
    config: RpcSendTransactionConfig
) -> ClientResult<Signature>
[src]

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

pub fn get_evm_transaction_count(&self, address: &Address) -> ClientResult<U256>[src]

pub fn get_evm_balance(&self, address: &Address) -> ClientResult<U256>[src]

pub fn send<T>(&self, request: RpcRequest, params: Value) -> ClientResult<T> where
    T: DeserializeOwned
[src]

Auto Trait Implementations

impl !RefUnwindSafe for RpcClient

impl Send for RpcClient

impl Sync for RpcClient

impl Unpin for RpcClient

impl !UnwindSafe for RpcClient

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]