[][src]Trait solana_program_test::BanksClientExt

pub trait BanksClientExt {
#[must_use]    fn send_transaction<'life0, 'async_trait>(
        &'life0 mut self,
        transaction: Transaction
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_recent_blockhash<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Hash, Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_fees<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<(FeeCalculator, Hash, u64), Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_rent<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Rent, Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn process_transaction_with_commitment<'life0, 'async_trait>(
        &'life0 mut self,
        transaction: Transaction,
        commitment: CommitmentLevel
    ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn process_transaction<'life0, 'async_trait>(
        &'life0 mut self,
        transaction: Transaction
    ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_transaction_status<'life0, 'async_trait>(
        &'life0 mut self,
        signature: Signature
    ) -> Pin<Box<dyn Future<Output = Result<Option<TransactionStatus>, Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_transaction_statuses<'life0, 'async_trait>(
        &'life0 mut self,
        signatures: Vec<Signature>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<TransactionStatus>>, Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_root_slot<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_account_with_commitment<'life0, 'async_trait>(
        &'life0 mut self,
        address: Pubkey,
        commitment: CommitmentLevel
    ) -> Pin<Box<dyn Future<Output = Result<Option<Account>, Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_account<'life0, 'async_trait>(
        &'life0 mut self,
        address: Pubkey
    ) -> Pin<Box<dyn Future<Output = Result<Option<Account>, Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_balance_with_commitment<'life0, 'async_trait>(
        &'life0 mut self,
        address: Pubkey,
        commitment: CommitmentLevel
    ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn get_balance<'life0, 'async_trait>(
        &'life0 mut self,
        address: Pubkey
    ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Required methods

#[must_use]fn send_transaction<'life0, 'async_trait>(
    &'life0 mut self,
    transaction: Transaction
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

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.

#[must_use]fn get_recent_blockhash<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Hash, Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

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.

#[must_use]fn get_fees<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(FeeCalculator, Hash, u64), Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

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.

#[must_use]fn get_rent<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Rent, Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Return the cluster rent

#[must_use]fn process_transaction_with_commitment<'life0, 'async_trait>(
    &'life0 mut self,
    transaction: Transaction,
    commitment: CommitmentLevel
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Send a transaction and return after the transaction has been rejected or reached the given level of commitment.

#[must_use]fn process_transaction<'life0, 'async_trait>(
    &'life0 mut self,
    transaction: Transaction
) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Send a transaction and return after the transaction has been finalized or rejected.

#[must_use]fn get_transaction_status<'life0, 'async_trait>(
    &'life0 mut self,
    signature: Signature
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionStatus>, Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

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.

#[must_use]fn get_transaction_statuses<'life0, 'async_trait>(
    &'life0 mut self,
    signatures: Vec<Signature>
) -> Pin<Box<dyn Future<Output = Result<Vec<Option<TransactionStatus>>, Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Same as get_transaction_status, but for multiple transactions.

#[must_use]fn get_root_slot<'life0, 'async_trait>(
    &'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Return the most recent rooted slot height. All transactions at or below this height are said to be finalized. The cluster will not fork to a higher slot height.

#[must_use]fn get_account_with_commitment<'life0, 'async_trait>(
    &'life0 mut self,
    address: Pubkey,
    commitment: CommitmentLevel
) -> Pin<Box<dyn Future<Output = Result<Option<Account>, Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

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.

#[must_use]fn get_account<'life0, 'async_trait>(
    &'life0 mut self,
    address: Pubkey
) -> Pin<Box<dyn Future<Output = Result<Option<Account>, Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

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.

#[must_use]fn get_balance_with_commitment<'life0, 'async_trait>(
    &'life0 mut self,
    address: Pubkey,
    commitment: CommitmentLevel
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Return the balance in lamports of an account at the given address at the slot corresponding to the given commitment level.

#[must_use]fn get_balance<'life0, 'async_trait>(
    &'life0 mut self,
    address: Pubkey
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Return the balance in lamports of an account at the given address at the time of the most recent root slot.

Loading content...

Implementors

impl BanksClientExt for BanksClient<Channel<BanksRequest, BanksResponse>>[src]

Loading content...