Trait dock_poa_rpc::PoAApiClient
source · pub trait PoAApiClient<BlockHash, AccountId, Balance>: ClientTwhere
BlockHash: Send + Sync + 'static + Serialize,
AccountId: Send + Sync + 'static + DeserializeOwned,
Balance: Send + Sync + 'static + DeserializeOwned,{
// Provided methods
fn treasury_account<'life0, 'async_trait>(
&'life0 self,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = RpcResult<AccountId>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn treasury_balance<'life0, 'async_trait>(
&'life0 self,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = RpcResult<Balance>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Client implementation for the PoAApi
RPC API.
Provided Methods§
sourcefn treasury_account<'life0, 'async_trait>(
&'life0 self,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = RpcResult<AccountId>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn treasury_account<'life0, 'async_trait>( &'life0 self, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<AccountId>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Return account address of treasury. The account address can then be used to query the chain for balance
sourcefn treasury_balance<'life0, 'async_trait>(
&'life0 self,
at: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = RpcResult<Balance>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn treasury_balance<'life0, 'async_trait>( &'life0 self, at: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = RpcResult<Balance>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Return free balance of treasury account. In the context of PoA, only free balance makes sense for treasury. But just in case, to check all kinds of balance (locked, reserved, etc), get the account address with above call and query the chain.