BankQuery

Trait BankQuery 

Source
pub trait BankQuery: ClientAbciQuery + Sized {
    // Provided methods
    fn bank_query_balance<'life0, 'async_trait>(
        &'life0 self,
        address: Address,
        denom: Denom,
    ) -> Pin<Box<dyn Future<Output = Result<BalanceResponse, BankError>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn bank_query_balances<'life0, 'async_trait>(
        &'life0 self,
        address: Address,
        pagination: Option<PaginationRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<BalancesResponse, BankError>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn bank_query_spendable_balances<'life0, 'async_trait>(
        &'life0 self,
        address: Address,
        pagination: Option<PaginationRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<BalancesResponse, BankError>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn bank_query_supply<'life0, 'async_trait>(
        &'life0 self,
        denom: Denom,
    ) -> Pin<Box<dyn Future<Output = Result<BalanceResponse, BankError>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn bank_query_total_supply<'life0, 'async_trait>(
        &'life0 self,
        pagination: Option<PaginationRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<BalancesResponse, BankError>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn bank_query_denom_metadata<'life0, 'async_trait>(
        &'life0 self,
        denom: Denom,
    ) -> Pin<Box<dyn Future<Output = Result<DenomMetadataResponse, BankError>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn bank_query_denoms_metadata<'life0, 'async_trait>(
        &'life0 self,
        pagination: Option<PaginationRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<DenomsMetadataResponse, BankError>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn bank_query_params<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<ParamsResponse, BankError>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}

Provided Methods§

Source

fn bank_query_balance<'life0, 'async_trait>( &'life0 self, address: Address, denom: Denom, ) -> Pin<Box<dyn Future<Output = Result<BalanceResponse, BankError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Query the amount of denom currently held by an address

Source

fn bank_query_balances<'life0, 'async_trait>( &'life0 self, address: Address, pagination: Option<PaginationRequest>, ) -> Pin<Box<dyn Future<Output = Result<BalancesResponse, BankError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Query all denom balances held by an address

Source

fn bank_query_spendable_balances<'life0, 'async_trait>( &'life0 self, address: Address, pagination: Option<PaginationRequest>, ) -> Pin<Box<dyn Future<Output = Result<BalancesResponse, BankError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Get total spendable balance for an address (not currently locked away via delegation for example)

Source

fn bank_query_supply<'life0, 'async_trait>( &'life0 self, denom: Denom, ) -> Pin<Box<dyn Future<Output = Result<BalanceResponse, BankError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Query global supply of denom for all accounts

Source

fn bank_query_total_supply<'life0, 'async_trait>( &'life0 self, pagination: Option<PaginationRequest>, ) -> Pin<Box<dyn Future<Output = Result<BalancesResponse, BankError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Query global supply of all denoms for all accounts

Source

fn bank_query_denom_metadata<'life0, 'async_trait>( &'life0 self, denom: Denom, ) -> Pin<Box<dyn Future<Output = Result<DenomMetadataResponse, BankError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Query bank metadata for a single denom

Source

fn bank_query_denoms_metadata<'life0, 'async_trait>( &'life0 self, pagination: Option<PaginationRequest>, ) -> Pin<Box<dyn Future<Output = Result<DenomsMetadataResponse, BankError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Query bank metadata for all denoms

Source

fn bank_query_params<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ParamsResponse, BankError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Query bank module cosmos sdk params

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> BankQuery for T
where T: ClientAbciQuery,