Struct solana_client::rpc_client::RpcClient [−][src]
Implementations
impl RpcClient
[src]
pub fn new(url: String) -> Self
[src]
pub fn new_with_commitment(
url: String,
commitment_config: CommitmentConfig
) -> Self
[src]
url: String,
commitment_config: CommitmentConfig
) -> Self
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]
url: String,
timeout: Duration,
commitment_config: CommitmentConfig
) -> Self
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]
&self,
signature: &Signature,
commitment_config: CommitmentConfig
) -> RpcResult<bool>
pub fn send_transaction(
&self,
transaction: &Transaction
) -> ClientResult<Signature>
[src]
&self,
transaction: &Transaction
) -> ClientResult<Signature>
pub fn send_transaction_with_config(
&self,
transaction: &Transaction,
config: RpcSendTransactionConfig
) -> ClientResult<Signature>
[src]
&self,
transaction: &Transaction,
config: RpcSendTransactionConfig
) -> ClientResult<Signature>
pub fn simulate_transaction(
&self,
transaction: &Transaction
) -> RpcResult<RpcSimulateTransactionResult>
[src]
&self,
transaction: &Transaction
) -> RpcResult<RpcSimulateTransactionResult>
pub fn simulate_transaction_with_config(
&self,
transaction: &Transaction,
config: RpcSimulateTransactionConfig
) -> RpcResult<RpcSimulateTransactionResult>
[src]
&self,
transaction: &Transaction,
config: RpcSimulateTransactionConfig
) -> RpcResult<RpcSimulateTransactionResult>
pub fn get_snapshot_slot(&self) -> ClientResult<Slot>
[src]
pub fn get_signature_status(
&self,
signature: &Signature
) -> ClientResult<Option<Result<()>>>
[src]
&self,
signature: &Signature
) -> ClientResult<Option<Result<()>>>
pub fn get_signature_statuses(
&self,
signatures: &[Signature]
) -> RpcResult<Vec<Option<TransactionStatus>>>
[src]
&self,
signatures: &[Signature]
) -> RpcResult<Vec<Option<TransactionStatus>>>
pub fn get_signature_statuses_with_history(
&self,
signatures: &[Signature]
) -> RpcResult<Vec<Option<TransactionStatus>>>
[src]
&self,
signatures: &[Signature]
) -> RpcResult<Vec<Option<TransactionStatus>>>
pub fn get_signature_status_with_commitment(
&self,
signature: &Signature,
commitment_config: CommitmentConfig
) -> ClientResult<Option<Result<()>>>
[src]
&self,
signature: &Signature,
commitment_config: CommitmentConfig
) -> ClientResult<Option<Result<()>>>
pub fn get_signature_status_with_commitment_and_history(
&self,
signature: &Signature,
commitment_config: CommitmentConfig,
search_transaction_history: bool
) -> ClientResult<Option<Result<()>>>
[src]
&self,
signature: &Signature,
commitment_config: CommitmentConfig,
search_transaction_history: bool
) -> ClientResult<Option<Result<()>>>
pub fn get_slot(&self) -> ClientResult<Slot>
[src]
pub fn get_slot_with_commitment(
&self,
commitment_config: CommitmentConfig
) -> ClientResult<Slot>
[src]
&self,
commitment_config: CommitmentConfig
) -> ClientResult<Slot>
pub fn supply(&self) -> RpcResult<RpcSupply>
[src]
pub fn supply_with_commitment(
&self,
commitment_config: CommitmentConfig
) -> RpcResult<RpcSupply>
[src]
&self,
commitment_config: CommitmentConfig
) -> RpcResult<RpcSupply>
pub fn total_supply(&self) -> ClientResult<u64>
[src]
pub fn total_supply_with_commitment(
&self,
commitment_config: CommitmentConfig
) -> ClientResult<u64>
[src]
&self,
commitment_config: CommitmentConfig
) -> ClientResult<u64>
pub fn get_largest_accounts_with_config(
&self,
config: RpcLargestAccountsConfig
) -> RpcResult<Vec<RpcAccountBalance>>
[src]
&self,
config: RpcLargestAccountsConfig
) -> RpcResult<Vec<RpcAccountBalance>>
pub fn get_vote_accounts(&self) -> ClientResult<RpcVoteAccountStatus>
[src]
pub fn get_vote_accounts_with_commitment(
&self,
commitment_config: CommitmentConfig
) -> ClientResult<RpcVoteAccountStatus>
[src]
&self,
commitment_config: CommitmentConfig
) -> ClientResult<RpcVoteAccountStatus>
pub fn wait_for_max_stake(
&self,
commitment: CommitmentConfig,
max_stake_percent: f32
) -> ClientResult<()>
[src]
&self,
commitment: CommitmentConfig,
max_stake_percent: f32
) -> ClientResult<()>
pub fn get_cluster_nodes(&self) -> ClientResult<Vec<RpcContactInfo>>
[src]
pub fn get_confirmed_block(
&self,
slot: Slot
) -> ClientResult<EncodedConfirmedBlock>
[src]
&self,
slot: Slot
) -> ClientResult<EncodedConfirmedBlock>
pub fn get_confirmed_block_with_encoding(
&self,
slot: Slot,
encoding: UiTransactionEncoding
) -> ClientResult<EncodedConfirmedBlock>
[src]
&self,
slot: Slot,
encoding: UiTransactionEncoding
) -> ClientResult<EncodedConfirmedBlock>
pub fn get_confirmed_blocks(
&self,
start_slot: Slot,
end_slot: Option<Slot>
) -> ClientResult<Vec<Slot>>
[src]
&self,
start_slot: Slot,
end_slot: Option<Slot>
) -> ClientResult<Vec<Slot>>
pub fn get_confirmed_blocks_with_limit(
&self,
start_slot: Slot,
limit: usize
) -> ClientResult<Vec<Slot>>
[src]
&self,
start_slot: Slot,
limit: usize
) -> ClientResult<Vec<Slot>>
pub fn get_confirmed_signatures_for_address(
&self,
address: &Pubkey,
start_slot: Slot,
end_slot: Slot
) -> ClientResult<Vec<Signature>>
[src]
&self,
address: &Pubkey,
start_slot: Slot,
end_slot: Slot
) -> ClientResult<Vec<Signature>>
pub fn get_confirmed_signatures_for_address2(
&self,
address: &Pubkey
) -> ClientResult<Vec<RpcConfirmedTransactionStatusWithSignature>>
[src]
&self,
address: &Pubkey
) -> ClientResult<Vec<RpcConfirmedTransactionStatusWithSignature>>
pub fn get_confirmed_signatures_for_address2_with_config(
&self,
address: &Pubkey,
config: GetConfirmedSignaturesForAddress2Config
) -> ClientResult<Vec<RpcConfirmedTransactionStatusWithSignature>>
[src]
&self,
address: &Pubkey,
config: GetConfirmedSignaturesForAddress2Config
) -> ClientResult<Vec<RpcConfirmedTransactionStatusWithSignature>>
pub fn get_confirmed_transaction(
&self,
signature: &Signature,
encoding: UiTransactionEncoding
) -> ClientResult<EncodedConfirmedTransaction>
[src]
&self,
signature: &Signature,
encoding: UiTransactionEncoding
) -> ClientResult<EncodedConfirmedTransaction>
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]
&self,
commitment_config: CommitmentConfig
) -> ClientResult<EpochInfo>
pub fn get_leader_schedule(
&self,
slot: Option<Slot>
) -> ClientResult<Option<RpcLeaderSchedule>>
[src]
&self,
slot: Option<Slot>
) -> ClientResult<Option<RpcLeaderSchedule>>
pub fn get_leader_schedule_with_commitment(
&self,
slot: Option<Slot>,
commitment_config: CommitmentConfig
) -> ClientResult<Option<RpcLeaderSchedule>>
[src]
&self,
slot: Option<Slot>,
commitment_config: CommitmentConfig
) -> ClientResult<Option<RpcLeaderSchedule>>
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]
&self,
transaction: &Transaction
) -> ClientResult<Signature>
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]
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> RpcResult<Option<Account>>
pub fn get_multiple_accounts(
&self,
pubkeys: &[Pubkey]
) -> ClientResult<Vec<Option<Account>>>
[src]
&self,
pubkeys: &[Pubkey]
) -> ClientResult<Vec<Option<Account>>>
pub fn get_multiple_accounts_with_commitment(
&self,
pubkeys: &[Pubkey],
commitment_config: CommitmentConfig
) -> RpcResult<Vec<Option<Account>>>
[src]
&self,
pubkeys: &[Pubkey],
commitment_config: CommitmentConfig
) -> RpcResult<Vec<Option<Account>>>
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]
&self,
data_len: usize
) -> ClientResult<u64>
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]
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> RpcResult<u64>
pub fn get_program_accounts(
&self,
pubkey: &Pubkey
) -> ClientResult<Vec<(Pubkey, Account)>>
[src]
&self,
pubkey: &Pubkey
) -> ClientResult<Vec<(Pubkey, Account)>>
pub fn get_program_accounts_with_config(
&self,
pubkey: &Pubkey,
config: RpcProgramAccountsConfig
) -> ClientResult<Vec<(Pubkey, Account)>>
[src]
&self,
pubkey: &Pubkey,
config: RpcProgramAccountsConfig
) -> ClientResult<Vec<(Pubkey, Account)>>
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]
&self,
commitment_config: CommitmentConfig
) -> ClientResult<u64>
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]
&self,
commitment_config: CommitmentConfig
) -> RpcResult<(Hash, FeeCalculator, Slot)>
pub fn get_fee_calculator_for_blockhash(
&self,
blockhash: &Hash
) -> ClientResult<Option<FeeCalculator>>
[src]
&self,
blockhash: &Hash
) -> ClientResult<Option<FeeCalculator>>
pub fn get_fee_calculator_for_blockhash_with_commitment(
&self,
blockhash: &Hash,
commitment_config: CommitmentConfig
) -> RpcResult<Option<FeeCalculator>>
[src]
&self,
blockhash: &Hash,
commitment_config: CommitmentConfig
) -> RpcResult<Option<FeeCalculator>>
pub fn get_fee_rate_governor(&self) -> RpcResult<FeeRateGovernor>
[src]
pub fn get_new_blockhash(
&self,
blockhash: &Hash
) -> ClientResult<(Hash, FeeCalculator)>
[src]
&self,
blockhash: &Hash
) -> ClientResult<(Hash, FeeCalculator)>
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]
&self,
pubkey: &Pubkey
) -> ClientResult<Option<UiTokenAccount>>
pub fn get_token_account_with_commitment(
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> RpcResult<Option<UiTokenAccount>>
[src]
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> RpcResult<Option<UiTokenAccount>>
pub fn get_token_account_balance(
&self,
pubkey: &Pubkey
) -> ClientResult<UiTokenAmount>
[src]
&self,
pubkey: &Pubkey
) -> ClientResult<UiTokenAmount>
pub fn get_token_account_balance_with_commitment(
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> RpcResult<UiTokenAmount>
[src]
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> RpcResult<UiTokenAmount>
pub fn get_token_accounts_by_delegate(
&self,
delegate: &Pubkey,
token_account_filter: TokenAccountsFilter
) -> ClientResult<Vec<RpcKeyedAccount>>
[src]
&self,
delegate: &Pubkey,
token_account_filter: TokenAccountsFilter
) -> ClientResult<Vec<RpcKeyedAccount>>
pub fn get_token_accounts_by_delegate_with_commitment(
&self,
delegate: &Pubkey,
token_account_filter: TokenAccountsFilter,
commitment_config: CommitmentConfig
) -> RpcResult<Vec<RpcKeyedAccount>>
[src]
&self,
delegate: &Pubkey,
token_account_filter: TokenAccountsFilter,
commitment_config: CommitmentConfig
) -> RpcResult<Vec<RpcKeyedAccount>>
pub fn get_token_accounts_by_owner(
&self,
owner: &Pubkey,
token_account_filter: TokenAccountsFilter
) -> ClientResult<Vec<RpcKeyedAccount>>
[src]
&self,
owner: &Pubkey,
token_account_filter: TokenAccountsFilter
) -> ClientResult<Vec<RpcKeyedAccount>>
pub fn get_token_accounts_by_owner_with_commitment(
&self,
owner: &Pubkey,
token_account_filter: TokenAccountsFilter,
commitment_config: CommitmentConfig
) -> RpcResult<Vec<RpcKeyedAccount>>
[src]
&self,
owner: &Pubkey,
token_account_filter: TokenAccountsFilter,
commitment_config: CommitmentConfig
) -> RpcResult<Vec<RpcKeyedAccount>>
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]
&self,
mint: &Pubkey,
commitment_config: CommitmentConfig
) -> RpcResult<UiTokenAmount>
pub fn poll_get_balance_with_commitment(
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> ClientResult<u64>
[src]
&self,
pubkey: &Pubkey,
commitment_config: CommitmentConfig
) -> ClientResult<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) -> ClientResult<()>
[src]
Poll the server to confirm a transaction.
pub fn poll_for_signature_with_commitment(
&self,
signature: &Signature,
commitment_config: CommitmentConfig
) -> ClientResult<()>
[src]
&self,
signature: &Signature,
commitment_config: CommitmentConfig
) -> ClientResult<()>
Poll the server to confirm a transaction.
pub fn poll_for_signature_confirmation(
&self,
signature: &Signature,
min_confirmed_blocks: usize
) -> ClientResult<usize>
[src]
&self,
signature: &Signature,
min_confirmed_blocks: usize
) -> ClientResult<usize>
Poll the server to confirm a transaction.
pub fn get_num_blocks_since_signature_confirmation(
&self,
signature: &Signature
) -> ClientResult<usize>
[src]
&self,
signature: &Signature
) -> ClientResult<usize>
pub fn send_and_confirm_transaction_with_spinner(
&self,
transaction: &Transaction
) -> ClientResult<Signature>
[src]
&self,
transaction: &Transaction
) -> ClientResult<Signature>
pub fn send_and_confirm_transaction_with_spinner_and_commitment(
&self,
transaction: &Transaction,
commitment: CommitmentConfig
) -> ClientResult<Signature>
[src]
&self,
transaction: &Transaction,
commitment: CommitmentConfig
) -> ClientResult<Signature>
pub fn send_and_confirm_transaction_with_spinner_and_config(
&self,
transaction: &Transaction,
commitment: CommitmentConfig,
config: RpcSendTransactionConfig
) -> ClientResult<Signature>
[src]
&self,
transaction: &Transaction,
commitment: CommitmentConfig,
config: RpcSendTransactionConfig
) -> ClientResult<Signature>
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]
T: DeserializeOwned,
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,
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>,