Skip to main content

SolanaRpcClient

Struct SolanaRpcClient 

Source
pub struct SolanaRpcClient { /* private fields */ }
Expand description

Standard Solana JSON-RPC namespace.

Implementations§

Source§

impl SolanaRpcClient

Source

pub fn get_cluster_nodes(&self) -> PendingRpcRequest<Value>

Creates a pending getClusterNodes request.

Source

pub fn get_epoch_schedule(&self) -> PendingRpcRequest<Value>

Creates a pending getEpochSchedule request.

Source

pub fn get_first_available_block(&self) -> PendingRpcRequest<u64>

Creates a pending getFirstAvailableBlock request.

Source

pub fn get_genesis_hash(&self) -> PendingRpcRequest<String>

Creates a pending getGenesisHash request.

Source

pub fn get_health(&self) -> PendingRpcRequest<String>

Creates a pending getHealth request.

Source

pub fn get_highest_snapshot_slot(&self) -> PendingRpcRequest<Value>

Creates a pending getHighestSnapshotSlot request.

Source

pub fn get_identity(&self) -> PendingRpcRequest<Value>

Creates a pending getIdentity request.

Source

pub fn get_inflation_rate(&self) -> PendingRpcRequest<Value>

Creates a pending getInflationRate request.

Source

pub fn get_max_retransmit_slot(&self) -> PendingRpcRequest<u64>

Creates a pending getMaxRetransmitSlot request.

Source

pub fn get_max_shred_insert_slot(&self) -> PendingRpcRequest<u64>

Creates a pending getMaxShredInsertSlot request.

Source

pub fn get_version(&self) -> PendingRpcRequest<Value>

Creates a pending getVersion request.

Source

pub fn minimum_ledger_slot(&self) -> PendingRpcRequest<u64>

Creates a pending minimumLedgerSlot request.

Source§

impl SolanaRpcClient

Source

pub fn get_account_info<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<SolanaContextResult<Option<Value>>>>

Creates a pending getAccountInfo request from positional parameters.

Source

pub fn get_balance<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<SolanaContextResult<u64>>>

Creates a pending getBalance request from positional parameters.

Source

pub fn get_block<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<Value>>>

Creates a pending getBlock request from positional parameters.

Source

pub fn get_block_commitment<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getBlockCommitment request from positional parameters.

Source

pub fn get_block_height<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<u64>>

Creates a pending getBlockHeight request from positional parameters.

Source

pub fn get_block_production<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getBlockProduction request from positional parameters.

Source

pub fn get_block_time<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<i64>>>

Creates a pending getBlockTime request from positional parameters.

Source

pub fn get_blocks<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Vec<u64>>>

Creates a pending getBlocks request from positional parameters.

Source

pub fn get_blocks_with_limit<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Vec<u64>>>

Creates a pending getBlocksWithLimit request from positional parameters.

Source

pub fn get_epoch_info<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getEpochInfo request from positional parameters.

Source

pub fn get_fee_for_message<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<SolanaContextResult<Option<u64>>>>

Creates a pending getFeeForMessage request from positional parameters.

Source

pub fn get_inflation_governor<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getInflationGovernor request from positional parameters.

Source

pub fn get_inflation_reward<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getInflationReward request from positional parameters.

Source

pub fn get_largest_accounts<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getLargestAccounts request from positional parameters.

Source

pub fn get_latest_blockhash<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getLatestBlockhash request from positional parameters.

Source

pub fn get_leader_schedule<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<Value>>>

Creates a pending getLeaderSchedule request from positional parameters.

Source

pub fn get_minimum_balance_for_rent_exemption<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<u64>>

Creates a pending getMinimumBalanceForRentExemption request from positional parameters.

Source

pub fn get_multiple_accounts<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<SolanaContextResult<Value>>>

Creates a pending getMultipleAccounts request from positional parameters.

Source

pub fn get_parsed_transaction<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<Value>>>

Creates a pending getParsedTransaction request from positional parameters.

Source

pub fn get_priority_fee_estimate<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<PriorityFeeEstimate>>

Creates a pending getPriorityFeeEstimate request from positional parameters.

Source

pub fn get_program_accounts<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getProgramAccounts request from positional parameters.

Source

pub fn get_program_accounts_v2<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getProgramAccountsV2 request from positional parameters.

Source

pub fn get_recent_performance_samples<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getRecentPerformanceSamples request from positional parameters.

Source

pub fn get_recent_prioritization_fees<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getRecentPrioritizationFees request from positional parameters.

Source

pub fn get_signature_statuses<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getSignatureStatuses request from positional parameters.

Source

pub fn get_signatures_for_address<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getSignaturesForAddress request from positional parameters.

Source

pub fn get_slot<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<u64>>

Creates a pending getSlot request from positional parameters.

Source

pub fn get_slot_leader<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending getSlotLeader request from positional parameters.

Source

pub fn get_slot_leaders<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Vec<String>>>

Creates a pending getSlotLeaders request from positional parameters.

Source

pub fn get_stake_minimum_delegation<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<SolanaContextResult<u64>>>

Creates a pending getStakeMinimumDelegation request from positional parameters.

Source

pub fn get_supply<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getSupply request from positional parameters.

Source

pub fn get_token_account_balance<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getTokenAccountBalance request from positional parameters.

Source

pub fn get_token_accounts_by_delegate<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getTokenAccountsByDelegate request from positional parameters.

Source

pub fn get_token_accounts_by_owner<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getTokenAccountsByOwner request from positional parameters.

Source

pub fn get_token_largest_accounts<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getTokenLargestAccounts request from positional parameters.

Source

pub fn get_token_supply<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getTokenSupply request from positional parameters.

Source

pub fn get_transaction<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Option<Value>>>

Creates a pending getTransaction request from positional parameters.

Source

pub fn get_transaction_count<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<u64>>

Creates a pending getTransactionCount request from positional parameters.

Source

pub fn get_vote_accounts<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending getVoteAccounts request from positional parameters.

Source

pub fn is_blockhash_valid<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<SolanaContextResult<bool>>>

Creates a pending isBlockhashValid request from positional parameters.

Source

pub fn request_airdrop<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending requestAirdrop request from positional parameters.

Source

pub fn send_transaction<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>

Creates a pending sendTransaction request from positional parameters.

Source

pub fn simulate_transaction<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<Value>>

Creates a pending simulateTransaction request from positional parameters.

Methods from Deref<Target = RpcNamespace>§

Source

pub fn endpoint(&self) -> String

Public endpoint without credentials.

Source

pub fn request<T: DeserializeOwned>( &self, method: impl Into<String>, params: impl Serialize, ) -> Result<PendingRpcRequest<T>>

Creates a typed request using wire-compatible method and parameters.

Source

pub fn request_without_params<T: DeserializeOwned>( &self, method: impl Into<String>, ) -> PendingRpcRequest<T>

Creates a typed parameterless request.

Source

pub fn raw<T: DeserializeOwned>( &self, method: impl Into<String>, params: Option<Value>, ) -> PendingRpcRequest<T>

Alias for arbitrary methods not yet represented by a convenience method.

Source

pub fn batch(&self, calls: Vec<RpcBatchCall>) -> Result<PendingRpcBatchRequest>

Validates and creates one unsplit batch request.

Trait Implementations§

Source§

impl Clone for SolanaRpcClient

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Deref for SolanaRpcClient

Source§

type Target = RpcNamespace

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more