Struct solana_banks_client::BanksClient
source · pub struct BanksClient { /* private fields */ }
Implementations§
source§impl 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<(), BanksClientError>> + '_
pub fn get_fees_with_commitment_and_context( &mut self, ctx: Context, commitment: CommitmentLevel ) -> impl Future<Output = Result<(FeeCalculator, Hash, u64), BanksClientError>> + '_
get_fee_for_message
or is_blockhash_valid
insteadpub fn get_transaction_status_with_context( &mut self, ctx: Context, signature: Signature ) -> impl Future<Output = Result<Option<TransactionStatus>, BanksClientError>> + '_
pub fn get_slot_with_context( &mut self, ctx: Context, commitment: CommitmentLevel ) -> impl Future<Output = Result<Slot, BanksClientError>> + '_
pub fn get_block_height_with_context( &mut self, ctx: Context, commitment: CommitmentLevel ) -> impl Future<Output = Result<Slot, BanksClientError>> + '_
pub fn process_transaction_with_commitment_and_context( &mut self, ctx: Context, transaction: Transaction, commitment: CommitmentLevel ) -> impl Future<Output = Result<Option<Result<()>>, BanksClientError>> + '_
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 simulate_transaction_with_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>, BanksClientError>> + '_
sourcepub fn send_transaction(
&mut self,
transaction: Transaction
) -> impl Future<Output = Result<(), BanksClientError>> + '_
pub fn send_transaction( &mut self, transaction: Transaction ) -> impl Future<Output = Result<(), BanksClientError>> + '_
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), BanksClientError>> + '_
👎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), BanksClientError>> + '_
get_fee_for_message
or is_blockhash_valid
insteadReturn 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, BanksClientError>> + '_
pub fn get_sysvar<T: Sysvar>( &mut self ) -> impl Future<Output = Result<T, BanksClientError>> + '_
Return the cluster Sysvar
sourcepub fn get_rent(
&mut self
) -> impl Future<Output = Result<Rent, BanksClientError>> + '_
pub fn get_rent( &mut self ) -> impl Future<Output = Result<Rent, BanksClientError>> + '_
Return the cluster rent
sourcepub fn get_recent_blockhash(
&mut self
) -> impl Future<Output = Result<Hash, BanksClientError>> + '_
👎Deprecated since 1.9.0: Please use get_latest_blockhash
instead
pub fn get_recent_blockhash( &mut self ) -> impl Future<Output = Result<Hash, BanksClientError>> + '_
get_latest_blockhash
insteadReturn 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<(), BanksClientError>> + '_
pub fn process_transaction_with_commitment( &mut self, transaction: Transaction, commitment: CommitmentLevel ) -> impl Future<Output = Result<(), BanksClientError>> + '_
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<(), BanksClientError>> + '_
pub fn process_transaction( &mut self, transaction: Transaction ) -> impl Future<Output = Result<(), BanksClientError>> + '_
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<(), BanksClientError>
sourcepub fn process_transactions(
&mut self,
transactions: Vec<Transaction>
) -> impl Future<Output = Result<(), BanksClientError>> + '_
pub fn process_transactions( &mut self, transactions: Vec<Transaction> ) -> impl Future<Output = Result<(), BanksClientError>> + '_
Send transactions and return until the transaction has been finalized or rejected.
sourcepub fn simulate_transaction_with_commitment(
&mut self,
transaction: Transaction,
commitment: CommitmentLevel
) -> impl Future<Output = Result<BanksTransactionResultWithSimulation, BanksClientError>> + '_
pub fn simulate_transaction_with_commitment( &mut self, transaction: Transaction, commitment: CommitmentLevel ) -> impl Future<Output = Result<BanksTransactionResultWithSimulation, BanksClientError>> + '_
Simulate a transaction at the given commitment level
sourcepub fn simulate_transaction(
&mut self,
transaction: Transaction
) -> impl Future<Output = Result<BanksTransactionResultWithSimulation, BanksClientError>> + '_
pub fn simulate_transaction( &mut self, transaction: Transaction ) -> impl Future<Output = Result<BanksTransactionResultWithSimulation, BanksClientError>> + '_
Simulate a transaction at the default commitment level
sourcepub fn get_root_slot(
&mut self
) -> impl Future<Output = Result<Slot, BanksClientError>> + '_
pub fn get_root_slot( &mut self ) -> impl Future<Output = Result<Slot, BanksClientError>> + '_
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, BanksClientError>> + '_
pub fn get_root_block_height( &mut self ) -> impl Future<Output = Result<Slot, BanksClientError>> + '_
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>, BanksClientError>> + '_
pub fn get_account_with_commitment( &mut self, address: Pubkey, commitment: CommitmentLevel ) -> impl Future<Output = Result<Option<Account>, BanksClientError>> + '_
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>, BanksClientError>> + '_
pub fn get_account( &mut self, address: Pubkey ) -> impl Future<Output = Result<Option<Account>, BanksClientError>> + '_
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, BanksClientError>> + '_
pub fn get_packed_account_data<T: Pack>( &mut self, address: Pubkey ) -> impl Future<Output = Result<T, BanksClientError>> + '_
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, BanksClientError>> + '_
pub fn get_account_data_with_borsh<T: BorshDeserialize>( &mut self, address: Pubkey ) -> impl Future<Output = Result<T, BanksClientError>> + '_
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, BanksClientError>> + '_
pub fn get_balance_with_commitment( &mut self, address: Pubkey, commitment: CommitmentLevel ) -> impl Future<Output = Result<u64, BanksClientError>> + '_
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, BanksClientError>> + '_
pub fn get_balance( &mut self, address: Pubkey ) -> impl Future<Output = Result<u64, BanksClientError>> + '_
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>, BanksClientError>> + '_
pub fn get_transaction_status( &mut self, signature: Signature ) -> impl Future<Output = Result<Option<TransactionStatus>, BanksClientError>> + '_
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>>, BanksClientError>
pub async fn get_transaction_statuses( &mut self, signatures: Vec<Signature> ) -> Result<Vec<Option<TransactionStatus>>, BanksClientError>
Same as get_transaction_status, but for multiple transactions.
pub fn get_latest_blockhash( &mut self ) -> impl Future<Output = Result<Hash, BanksClientError>> + '_
pub fn get_latest_blockhash_with_commitment( &mut self, commitment: CommitmentLevel ) -> impl Future<Output = Result<Option<(Hash, u64)>, BanksClientError>> + '_
pub fn get_latest_blockhash_with_commitment_and_context( &mut self, ctx: Context, commitment: CommitmentLevel ) -> impl Future<Output = Result<Option<(Hash, u64)>, BanksClientError>> + '_
pub fn get_fee_for_message_with_commitment_and_context( &mut self, ctx: Context, commitment: CommitmentLevel, message: Message ) -> impl Future<Output = Result<Option<u64>, BanksClientError>> + '_
Trait Implementations§
source§impl Clone for BanksClient
impl Clone for BanksClient
source§fn clone(&self) -> BanksClient
fn clone(&self) -> BanksClient
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more