pub struct Rpc {Show 14 fields
pub bank: Module,
pub auth: Module,
pub authz: Module,
pub distribution: Module,
pub evidence: Module,
pub feegrant: Module,
pub gov: Module,
pub mint: Module,
pub params: Module,
pub slashing: Module,
pub staking: Module,
pub tx: Module,
pub upgrade: Module,
pub wasm: Module,
/* private fields */
}Fields§
§bank: Module§auth: Module§authz: Module§distribution: Module§evidence: Module§feegrant: Module§gov: Module§mint: Module§params: Module§slashing: Module§staking: Module§tx: Module§upgrade: Module§wasm: ModuleImplementations§
Source§impl Rpc
impl Rpc
Sourcepub async fn new(url: &str) -> Result<Self, CosmosClient>
pub async fn new(url: &str) -> Result<Self, CosmosClient>
Sourcepub async fn attach_signer(
&mut self,
signer: Signer,
) -> Result<(), CosmosClient>
pub async fn attach_signer( &mut self, signer: Signer, ) -> Result<(), CosmosClient>
Sourcepub async fn update_sequence_id(&mut self) -> Result<(), CosmosClient>
pub async fn update_sequence_id(&mut self) -> Result<(), CosmosClient>
Sourcepub async fn sign(&mut self, tx: Cosmos) -> Result<Vec<u8>, CosmosClient>
pub async fn sign(&mut self, tx: Cosmos) -> Result<Vec<u8>, CosmosClient>
§Errors
Will return Err if :
- there is no signer attached
- cosmos
simulateendpoint fails - the is a sign or encode error
Sourcepub async fn broadcast(
&mut self,
payload: Vec<u8>,
mode: BroadcastMode,
) -> Result<Response, CosmosClient>
pub async fn broadcast( &mut self, payload: Vec<u8>, mode: BroadcastMode, ) -> Result<Response, CosmosClient>
Sourcepub async fn sign_and_broadcast(
&mut self,
tx: Cosmos,
mode: BroadcastMode,
) -> Result<Response, CosmosClient>
pub async fn sign_and_broadcast( &mut self, tx: Cosmos, mode: BroadcastMode, ) -> Result<Response, CosmosClient>
Sourcepub async fn send(
&mut self,
to: &str,
coin: Vec<Coin>,
memo: Option<&str>,
) -> Result<GetTxResponse, CosmosClient>
pub async fn send( &mut self, to: &str, coin: Vec<Coin>, memo: Option<&str>, ) -> Result<GetTxResponse, CosmosClient>
§Errors
Will return Err if :
sign_and_broadcastreturns an err- cannot find the hash of the tx on chain after 60’
- cannot Serialize
MsgSend
Sourcepub async fn stake(
&mut self,
to: &str,
coin: Coin,
memo: Option<&str>,
) -> Result<GetTxResponse, CosmosClient>
pub async fn stake( &mut self, to: &str, coin: Coin, memo: Option<&str>, ) -> Result<GetTxResponse, CosmosClient>
§Errors
Will return Err if :
sign_and_broadcastreturns an err- cannot find the hash of the tx on chain after 60’
- cannot Serialize
MsgDelegate
Sourcepub async fn unstake(
&mut self,
to: &str,
coin: Coin,
memo: Option<&str>,
) -> Result<GetTxResponse, CosmosClient>
pub async fn unstake( &mut self, to: &str, coin: Coin, memo: Option<&str>, ) -> Result<GetTxResponse, CosmosClient>
§Errors
Will return Err if :
sign_and_broadcastreturns an err- cannot find the hash of the tx on chain after 60’
- cannot Serialize
MsgUndelegate
Sourcepub async fn claim_rewards(
&mut self,
to: &str,
memo: Option<&str>,
) -> Result<GetTxResponse, CosmosClient>
pub async fn claim_rewards( &mut self, to: &str, memo: Option<&str>, ) -> Result<GetTxResponse, CosmosClient>
§Errors
Will return Err if :
sign_and_broadcastreturns an err- cannot find the hash of the tx on chain after 60’
- cannot Serialize
MsgWithdrawDelegatorReward
Sourcepub async fn ibc_send(
&mut self,
to: &str,
coin: Coin,
source_port: &str,
source_channel: &str,
timeout_height: Option<Height>,
timeout_timestamp: u64,
memo: Option<&str>,
) -> Result<GetTxResponse, CosmosClient>
pub async fn ibc_send( &mut self, to: &str, coin: Coin, source_port: &str, source_channel: &str, timeout_height: Option<Height>, timeout_timestamp: u64, memo: Option<&str>, ) -> Result<GetTxResponse, CosmosClient>
§Errors
Will return Err if :
sign_and_broadcastreturns an err- cannot find the hash of the tx on chain after 60’
- cannot Serialize
MsgWithdrawDelegatorReward
Auto Trait Implementations§
impl Freeze for Rpc
impl !RefUnwindSafe for Rpc
impl !Send for Rpc
impl !Sync for Rpc
impl Unpin for Rpc
impl !UnwindSafe for Rpc
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