[−][src]Struct solana_client::rpc_client::RpcClient
Methods
impl RpcClient
[src]
pub fn new(url: String) -> 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 confirm_transaction(&self, signature: &str) -> Result<bool>
[src]
pub fn confirm_transaction_with_commitment(
&self,
signature: &str,
commitment_config: CommitmentConfig
) -> RpcResponse<bool>
[src]
&self,
signature: &str,
commitment_config: CommitmentConfig
) -> RpcResponse<bool>
pub fn send_transaction(
&self,
transaction: &Transaction
) -> Result<String, ClientError>
[src]
&self,
transaction: &Transaction
) -> Result<String, ClientError>
pub fn get_signature_status(
&self,
signature: &str
) -> Result<Option<Result<()>>, ClientError>
[src]
&self,
signature: &str
) -> Result<Option<Result<()>>, ClientError>
pub fn get_signature_status_with_commitment(
&self,
signature: &str,
commitment_config: CommitmentConfig
) -> Result<Option<Result<()>>, ClientError>
[src]
&self,
signature: &str,
commitment_config: CommitmentConfig
) -> Result<Option<Result<()>>, ClientError>
pub fn get_slot(&self) -> Result<Slot>
[src]
pub fn get_slot_with_commitment(
&self,
commitment_config: CommitmentConfig
) -> Result<Slot>
[src]
&self,
commitment_config: CommitmentConfig
) -> Result<Slot>
pub fn get_vote_accounts(&self) -> Result<RpcVoteAccountStatus>
[src]
pub fn get_vote_accounts_with_commitment(
&self,
commitment_config: CommitmentConfig
) -> Result<RpcVoteAccountStatus>
[src]
&self,
commitment_config: CommitmentConfig
) -> Result<RpcVoteAccountStatus>
pub fn get_cluster_nodes(&self) -> Result<Vec<RpcContactInfo>>
[src]
pub fn get_confirmed_block(&self, slot: Slot) -> Result<RpcConfirmedBlock>
[src]
pub fn get_confirmed_blocks(
&self,
start_slot: Slot,
end_slot: Option<Slot>
) -> Result<Vec<Slot>>
[src]
&self,
start_slot: Slot,
end_slot: Option<Slot>
) -> Result<Vec<Slot>>
pub fn get_block_time(&self, slot: Slot) -> Result<UnixTimestamp>
[src]
pub fn get_epoch_info(&self) -> Result<RpcEpochInfo>
[src]
pub fn get_epoch_info_with_commitment(
&self,
commitment_config: CommitmentConfig
) -> Result<RpcEpochInfo>
[src]
&self,
commitment_config: CommitmentConfig
) -> Result<RpcEpochInfo>
pub fn get_leader_schedule(
&self,
slot: Option<Slot>
) -> Result<Option<RpcLeaderSchedule>>
[src]
&self,
slot: Option<Slot>
) -> Result<Option<RpcLeaderSchedule>>
pub fn get_leader_schedule_with_commitment(
&self,
slot: Option<Slot>,
commitment_config: CommitmentConfig
) -> Result<Option<RpcLeaderSchedule>>
[src]
&self,
slot: Option<Slot>,
commitment_config: CommitmentConfig
) -> Result<Option<RpcLeaderSchedule>>
pub fn get_epoch_schedule(&self) -> Result<EpochSchedule>
[src]
pub fn get_identity(&self) -> Result<Pubkey>
[src]
pub fn get_inflation(&self) -> Result<Inflation>
[src]
pub fn get_version(&self) -> Result<RpcVersionInfo>
[src]
pub fn minimum_ledger_slot(&self) -> Result<Slot>
[src]
pub fn send_and_confirm_transaction<T: Signers>(
&self,
transaction: &mut Transaction,
signer_keys: &T
) -> Result<String, ClientError>
[src]
&self,
transaction: &mut Transaction,
signer_keys: &T
) -> Result<String, ClientError>
pub fn send_and_confirm_transactions<T: Signers>(
&self,
transactions: Vec<Transaction>,
signer_keys: &T
) -> Result<(), Box<dyn Error>>
[src]
&self,
transactions: Vec<Transaction>,
signer_keys: &T
) -> Result<(), Box<dyn Error>>
pub fn resign_transaction<T: Signers>(
&self,
tx: &mut Transaction,
signer_keys: &T
) -> Result<(), ClientError>
[src]
&self,
tx: &mut Transaction,
signer_keys: &T
) -> Result<(), ClientError>
pub fn retry_get_balance(
&self,
pubkey: &Pubkey,
retries: usize
) -> Result<Option<u64>, Box<dyn Error>>
[src]
&self,
pubkey: &Pubkey,
retries: usize
) -> Result<Option<u64>, Box<dyn Error>>
pub fn get_account(&self, pubkey: &Pubkey) -> Result<Account>
[src]
pub fn get_account_with_commitment(
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> RpcResponse<Option<Account>>
[src]
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> RpcResponse<Option<Account>>
pub fn get_account_data(&self, pubkey: &Pubkey) -> Result<Vec<u8>>
[src]
pub fn get_minimum_balance_for_rent_exemption(
&self,
data_len: usize
) -> Result<u64>
[src]
&self,
data_len: usize
) -> Result<u64>
pub fn get_balance(&self, pubkey: &Pubkey) -> Result<u64>
[src]
Request the balance of the account pubkey
.
pub fn get_balance_with_commitment(
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> RpcResponse<u64>
[src]
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> RpcResponse<u64>
pub fn get_program_accounts(
&self,
pubkey: &Pubkey
) -> Result<Vec<(Pubkey, Account)>>
[src]
&self,
pubkey: &Pubkey
) -> Result<Vec<(Pubkey, Account)>>
pub fn get_transaction_count(&self) -> Result<u64>
[src]
Request the transaction count.
pub fn get_transaction_count_with_commitment(
&self,
commitment_config: CommitmentConfig
) -> Result<u64>
[src]
&self,
commitment_config: CommitmentConfig
) -> Result<u64>
pub fn get_recent_blockhash(&self) -> Result<(Hash, FeeCalculator)>
[src]
pub fn get_recent_blockhash_with_commitment(
&self,
commitment_config: CommitmentConfig
) -> RpcResponse<(Hash, FeeCalculator)>
[src]
&self,
commitment_config: CommitmentConfig
) -> RpcResponse<(Hash, FeeCalculator)>
pub fn get_fee_calculator_for_blockhash(
&self,
blockhash: &Hash
) -> Result<Option<FeeCalculator>>
[src]
&self,
blockhash: &Hash
) -> Result<Option<FeeCalculator>>
pub fn get_fee_rate_governor(&self) -> RpcResponse<FeeRateGovernor>
[src]
pub fn get_new_blockhash(
&self,
blockhash: &Hash
) -> Result<(Hash, FeeCalculator)>
[src]
&self,
blockhash: &Hash
) -> Result<(Hash, FeeCalculator)>
pub fn get_genesis_hash(&self) -> Result<Hash>
[src]
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_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_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(&self, signature: &Signature) -> Result<()>
[src]
Poll the server to confirm a transaction.
pub fn poll_for_signature_with_commitment(
&self,
signature: &Signature,
commitment_config: CommitmentConfig
) -> Result<()>
[src]
&self,
signature: &Signature,
commitment_config: CommitmentConfig
) -> Result<()>
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]
&self,
signature: &Signature,
min_confirmed_blocks: usize
) -> Result<usize>
Poll the server to confirm a transaction.
pub fn get_num_blocks_since_signature_confirmation(
&self,
signature: &Signature
) -> Result<usize>
[src]
&self,
signature: &Signature
) -> Result<usize>
pub fn validator_exit(&self) -> Result<bool>
[src]
pub fn send(
&self,
request: &RpcRequest,
params: Value,
retries: usize
) -> Result<Value, ClientError>
[src]
&self,
request: &RpcRequest,
params: Value,
retries: usize
) -> Result<Value, ClientError>
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]
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>,