[][src]Struct tendermint::rpc::Client

pub struct Client { /* fields omitted */ }

Tendermint RPC client.

Presently supports JSONRPC via HTTP.

Methods

impl Client[src]

pub async fn new<'_>(address: &'_ Address) -> Result<Self, Error>[src]

Create a new Tendermint RPC client, connecting to the given address

pub async fn abci_info<'_>(&'_ self) -> Result<AbciInfo, Error>[src]

/abci_info: get information about the ABCI application.

pub async fn abci_query<'_>(
    &'_ self,
    path: Option<Path>,
    data: impl Into<Vec<u8>>,
    height: Option<Height>,
    prove: bool
) -> Result<AbciQuery, Error>
[src]

/abci_query: query the ABCI application

pub async fn block<'_>(
    &'_ self,
    height: impl Into<Height>
) -> Result<Response, Error>
[src]

/block: get block at a given height.

pub async fn latest_block<'_>(&'_ self) -> Result<Response, Error>[src]

/block: get the latest block.

pub async fn block_results<'_, H>(
    &'_ self,
    height: H
) -> Result<Response, Error> where
    H: Into<Height>, 
[src]

/block_results: get ABCI results for a block at a particular height.

pub async fn latest_block_results<'_>(&'_ self) -> Result<Response, Error>[src]

/block_results: get ABCI results for the latest block.

pub async fn blockchain<'_>(
    &'_ self,
    min: impl Into<Height>,
    max: impl Into<Height>
) -> Result<Response, Error>
[src]

/blockchain: get block headers for min <= height <= max.

Block headers are returned in descending order (highest first).

Returns at most 20 items.

pub async fn broadcast_tx_async<'_>(
    &'_ self,
    tx: Transaction
) -> Result<Response, Error>
[src]

/broadcast_tx_async: broadcast a transaction, returning immediately.

pub async fn broadcast_tx_sync<'_>(
    &'_ self,
    tx: Transaction
) -> Result<Response, Error>
[src]

/broadcast_tx_sync: broadcast a transaction, returning the response from CheckTx.

pub async fn broadcast_tx_commit<'_>(
    &'_ self,
    tx: Transaction
) -> Result<Response, Error>
[src]

/broadcast_tx_sync: broadcast a transaction, returning the response from CheckTx.

pub async fn commit<'_>(
    &'_ self,
    height: impl Into<Height>
) -> Result<Response, Error>
[src]

/commit: get block commit at a given height.

pub async fn latest_commit<'_>(&'_ self) -> Result<Response, Error>[src]

/commit: get the latest block commit

pub async fn health<'_>(&'_ self) -> Result<(), Error>[src]

/health: get node health.

Returns empty result (200 OK) on success, no response in case of an error.

pub async fn genesis<'_>(&'_ self) -> Result<Genesis, Error>[src]

/genesis: get genesis file.

pub async fn net_info<'_>(&'_ self) -> Result<Response, Error>[src]

/net_info: obtain information about P2P and other network connections.

pub async fn status<'_>(&'_ self) -> Result<Response, Error>[src]

/status: get Tendermint status including node info, pubkey, latest block hash, app hash, block height and time.

pub async fn perform<'_, R>(&'_ self, request: R) -> Result<R::Response, Error> where
    R: Request
[src]

Perform a request against the RPC endpoint

Auto Trait Implementations

impl Send for Client

impl Sync for Client

impl Unpin for Client

impl UnwindSafe for Client

impl RefUnwindSafe for Client

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self