pub struct BaseClient {
pub auth_client: QueryClient<Channel>,
pub bank_client: QueryClient<Channel>,
pub gevulot_client: QueryClient<Channel>,
pub gov_client: QueryClient<Channel>,
pub tendermint_client: ServiceClient<Channel>,
pub tx_client: ServiceClient<Channel>,
pub address: Option<String>,
pub pub_key: Option<PublicKey>,
pub account_sequence: Option<u64>,
/* private fields */
}
Expand description
BaseClient is a struct that provides various functionalities to interact with the blockchain.
Fields§
§auth_client: QueryClient<Channel>
§bank_client: QueryClient<Channel>
§gevulot_client: QueryClient<Channel>
§gov_client: QueryClient<Channel>
§tendermint_client: ServiceClient<Channel>
§tx_client: ServiceClient<Channel>
§address: Option<String>
§pub_key: Option<PublicKey>
§account_sequence: Option<u64>
Implementations§
Source§impl BaseClient
impl BaseClient
Sourcepub fn set_signer(&mut self, signer: GevulotSigner)
pub fn set_signer(&mut self, signer: GevulotSigner)
Sourcepub async fn get_account(&mut self, address: &str) -> Result<BaseAccount>
pub async fn get_account(&mut self, address: &str) -> Result<BaseAccount>
Sourcepub async fn get_account_balance(&mut self, address: &str) -> Result<Coin>
pub async fn get_account_balance(&mut self, address: &str) -> Result<Coin>
Sourcepub async fn simulate_msg<M: Message + Name>(
&mut self,
msg: M,
memo: &str,
account_number: u64,
sequence: u64,
) -> Result<SimulateResponse>
pub async fn simulate_msg<M: Message + Name>( &mut self, msg: M, memo: &str, account_number: u64, sequence: u64, ) -> Result<SimulateResponse>
Sourcepub async fn send_msg<M: Message + Name + Clone>(
&mut self,
msg: M,
memo: &str,
) -> Result<String>
pub async fn send_msg<M: Message + Name + Clone>( &mut self, msg: M, memo: &str, ) -> Result<String>
Sourcepub async fn send_msg_sync<M: Message + Name + Clone, R: Message + Default>(
&mut self,
msg: M,
memo: &str,
) -> Result<R>
pub async fn send_msg_sync<M: Message + Name + Clone, R: Message + Default>( &mut self, msg: M, memo: &str, ) -> Result<R>
Sourcepub async fn current_block(&mut self) -> Result<Block>
pub async fn current_block(&mut self) -> Result<Block>
Retrieves the latest block from the blockchain.
§Returns
A Result containing the latest Block or an error.
Sourcepub async fn get_block_by_height(&mut self, height: i64) -> Result<Block>
pub async fn get_block_by_height(&mut self, height: i64) -> Result<Block>
Sourcepub async fn wait_for_block(&mut self, height: i64) -> Result<Block>
pub async fn wait_for_block(&mut self, height: i64) -> Result<Block>
Sourcepub async fn get_tx_response(&mut self, tx_hash: &str) -> Result<TxResponse>
pub async fn get_tx_response(&mut self, tx_hash: &str) -> Result<TxResponse>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for BaseClient
impl !RefUnwindSafe for BaseClient
impl Send for BaseClient
impl Sync for BaseClient
impl Unpin for BaseClient
impl !UnwindSafe for BaseClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request