Struct solana_banks_client::BanksClient
source · [−]pub struct BanksClient { /* private fields */ }
Implementations
sourceimpl BanksClient
impl BanksClient
pub fn new<C>(
config: Config,
transport: C
) -> NewClient<TarpcClient, RequestDispatch<BanksRequest, BanksResponse, C>> where
C: Transport<ClientMessage<BanksRequest>, Response<BanksResponse>>,
pub fn send_transaction_with_context(
&mut self,
ctx: Context,
transaction: Transaction
) -> impl Future<Output = Result<()>> + '_
pub fn get_fees_with_commitment_and_context(
&mut self,
ctx: Context,
commitment: CommitmentLevel
) -> impl Future<Output = Result<(FeeCalculator, Hash, u64)>> + '_
Please use get_fee_for_message
or is_blockhash_valid
instead
pub fn get_transaction_status_with_context(
&mut self,
ctx: Context,
signature: Signature
) -> impl Future<Output = Result<Option<TransactionStatus>>> + '_
pub fn get_slot_with_context(
&mut self,
ctx: Context,
commitment: CommitmentLevel
) -> impl Future<Output = Result<Slot>> + '_
pub fn get_block_height_with_context(
&mut self,
ctx: Context,
commitment: CommitmentLevel
) -> impl Future<Output = Result<Slot>> + '_
pub fn process_transaction_with_commitment_and_context(
&mut self,
ctx: Context,
transaction: Transaction,
commitment: CommitmentLevel
) -> impl Future<Output = Result<Option<Result<()>>>> + '_
pub fn process_transaction_with_preflight_and_commitment_and_context(
&mut self,
ctx: Context,
transaction: Transaction,
commitment: CommitmentLevel
) -> impl Future<Output = Result<BanksTransactionResultWithSimulation, BanksClientError>> + '_
pub fn get_account_with_commitment_and_context(
&mut self,
ctx: Context,
address: Pubkey,
commitment: CommitmentLevel
) -> impl Future<Output = Result<Option<Account>>> + '_
sourcepub fn send_transaction(
&mut self,
transaction: Transaction
) -> impl Future<Output = Result<()>> + '_
pub fn send_transaction(
&mut self,
transaction: Transaction
) -> impl Future<Output = Result<()>> + '_
Send a transaction and return immediately. The server will resend the transaction until either it is accepted by the cluster or the transaction’s blockhash expires.
sourcepub fn get_fees(
&mut self
) -> impl Future<Output = Result<(FeeCalculator, Hash, u64)>> + '_
👎 Deprecated since 1.9.0: Please use get_fee_for_message
or is_blockhash_valid
instead
pub fn get_fees(
&mut self
) -> impl Future<Output = Result<(FeeCalculator, Hash, u64)>> + '_
Please use get_fee_for_message
or is_blockhash_valid
instead
Return the fee parameters associated with a recent, rooted blockhash. The cluster will use the transaction’s blockhash to look up these same fee parameters and use them to calculate the transaction fee.
sourcepub fn get_sysvar<T: Sysvar>(&mut self) -> impl Future<Output = Result<T>> + '_
pub fn get_sysvar<T: Sysvar>(&mut self) -> impl Future<Output = Result<T>> + '_
Return the cluster Sysvar
sourcepub fn get_recent_blockhash(
&mut self
) -> impl Future<Output = Result<Hash>> + '_
👎 Deprecated since 1.9.0: Please use get_latest_blockhash
instead
pub fn get_recent_blockhash(
&mut self
) -> impl Future<Output = Result<Hash>> + '_
Please use get_latest_blockhash
instead
Return a recent, rooted blockhash from the server. The cluster will only accept
transactions with a blockhash that has not yet expired. Use the get_fees
method to get both a blockhash and the blockhash’s last valid slot.
sourcepub fn process_transaction_with_commitment(
&mut self,
transaction: Transaction,
commitment: CommitmentLevel
) -> impl Future<Output = Result<()>> + '_
pub fn process_transaction_with_commitment(
&mut self,
transaction: Transaction,
commitment: CommitmentLevel
) -> impl Future<Output = Result<()>> + '_
Send a transaction and return after the transaction has been rejected or reached the given level of commitment.
sourcepub fn process_transaction_with_preflight_and_commitment(
&mut self,
transaction: Transaction,
commitment: CommitmentLevel
) -> impl Future<Output = Result<(), BanksClientError>> + '_
pub fn process_transaction_with_preflight_and_commitment(
&mut self,
transaction: Transaction,
commitment: CommitmentLevel
) -> impl Future<Output = Result<(), BanksClientError>> + '_
Send a transaction and return any preflight (sanitization or simulation) errors, or return after the transaction has been rejected or reached the given level of commitment.
sourcepub fn process_transaction_with_preflight(
&mut self,
transaction: Transaction
) -> impl Future<Output = Result<(), BanksClientError>> + '_
pub fn process_transaction_with_preflight(
&mut self,
transaction: Transaction
) -> impl Future<Output = Result<(), BanksClientError>> + '_
Send a transaction and return any preflight (sanitization or simulation) errors, or return after the transaction has been finalized or rejected.
sourcepub fn process_transaction(
&mut self,
transaction: Transaction
) -> impl Future<Output = Result<()>> + '_
pub fn process_transaction(
&mut self,
transaction: Transaction
) -> impl Future<Output = Result<()>> + '_
Send a transaction and return until the transaction has been finalized or rejected.
pub async fn process_transactions_with_commitment(
&mut self,
transactions: Vec<Transaction>,
commitment: CommitmentLevel
) -> Result<()>
sourcepub fn process_transactions(
&mut self,
transactions: Vec<Transaction>
) -> impl Future<Output = Result<()>> + '_
pub fn process_transactions(
&mut self,
transactions: Vec<Transaction>
) -> impl Future<Output = Result<()>> + '_
Send transactions and return until the transaction has been finalized or rejected.
sourcepub fn get_root_slot(&mut self) -> impl Future<Output = Result<Slot>> + '_
pub fn get_root_slot(&mut self) -> impl Future<Output = Result<Slot>> + '_
Return the most recent rooted slot. All transactions at or below this slot are said to be finalized. The cluster will not fork to a higher slot.
sourcepub fn get_root_block_height(
&mut self
) -> impl Future<Output = Result<Slot>> + '_
pub fn get_root_block_height(
&mut self
) -> impl Future<Output = Result<Slot>> + '_
Return the most recent rooted block height. All transactions at or below this height are said to be finalized. The cluster will not fork to a higher block height.
sourcepub fn get_account_with_commitment(
&mut self,
address: Pubkey,
commitment: CommitmentLevel
) -> impl Future<Output = Result<Option<Account>>> + '_
pub fn get_account_with_commitment(
&mut self,
address: Pubkey,
commitment: CommitmentLevel
) -> impl Future<Output = Result<Option<Account>>> + '_
Return the account at the given address at the slot corresponding to the given commitment level. If the account is not found, None is returned.
sourcepub fn get_account(
&mut self,
address: Pubkey
) -> impl Future<Output = Result<Option<Account>>> + '_
pub fn get_account(
&mut self,
address: Pubkey
) -> impl Future<Output = Result<Option<Account>>> + '_
Return the account at the given address at the time of the most recent root slot. If the account is not found, None is returned.
sourcepub fn get_packed_account_data<T: Pack>(
&mut self,
address: Pubkey
) -> impl Future<Output = Result<T>> + '_
pub fn get_packed_account_data<T: Pack>(
&mut self,
address: Pubkey
) -> impl Future<Output = Result<T>> + '_
Return the unpacked account data at the given address If the account is not found, an error is returned
sourcepub fn get_account_data_with_borsh<T: BorshDeserialize>(
&mut self,
address: Pubkey
) -> impl Future<Output = Result<T>> + '_
pub fn get_account_data_with_borsh<T: BorshDeserialize>(
&mut self,
address: Pubkey
) -> impl Future<Output = Result<T>> + '_
Return the unpacked account data at the given address If the account is not found, an error is returned
sourcepub fn get_balance_with_commitment(
&mut self,
address: Pubkey,
commitment: CommitmentLevel
) -> impl Future<Output = Result<u64>> + '_
pub fn get_balance_with_commitment(
&mut self,
address: Pubkey,
commitment: CommitmentLevel
) -> impl Future<Output = Result<u64>> + '_
Return the balance in lamports of an account at the given address at the slot corresponding to the given commitment level.
sourcepub fn get_balance(
&mut self,
address: Pubkey
) -> impl Future<Output = Result<u64>> + '_
pub fn get_balance(
&mut self,
address: Pubkey
) -> impl Future<Output = Result<u64>> + '_
Return the balance in lamports of an account at the given address at the time of the most recent root slot.
sourcepub fn get_transaction_status(
&mut self,
signature: Signature
) -> impl Future<Output = Result<Option<TransactionStatus>>> + '_
pub fn get_transaction_status(
&mut self,
signature: Signature
) -> impl Future<Output = Result<Option<TransactionStatus>>> + '_
Return the status of a transaction with a signature matching the transaction’s first signature. Return None if the transaction is not found, which may be because the blockhash was expired or the fee-paying account had insufficient funds to pay the transaction fee. Note that servers rarely store the full transaction history. This method may return None if the transaction status has been discarded.
sourcepub async fn get_transaction_statuses(
&mut self,
signatures: Vec<Signature>
) -> Result<Vec<Option<TransactionStatus>>>
pub async fn get_transaction_statuses(
&mut self,
signatures: Vec<Signature>
) -> Result<Vec<Option<TransactionStatus>>>
Same as get_transaction_status, but for multiple transactions.
pub fn get_latest_blockhash(
&mut self
) -> impl Future<Output = Result<Hash>> + '_
pub fn get_latest_blockhash_with_commitment(
&mut self,
commitment: CommitmentLevel
) -> impl Future<Output = Result<Option<(Hash, u64)>>> + '_
pub fn get_latest_blockhash_with_commitment_and_context(
&mut self,
ctx: Context,
commitment: CommitmentLevel
) -> impl Future<Output = Result<Option<(Hash, u64)>>> + '_
pub fn get_fee_for_message_with_commitment_and_context(
&mut self,
ctx: Context,
commitment: CommitmentLevel,
message: Message
) -> impl Future<Output = Result<Option<u64>>> + '_
Trait Implementations
sourceimpl Clone for BanksClient
impl Clone for BanksClient
sourcefn clone(&self) -> BanksClient
fn clone(&self) -> BanksClient
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for BanksClient
impl Send for BanksClient
impl Sync for BanksClient
impl Unpin for BanksClient
impl !UnwindSafe for BanksClient
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
pub default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more