[−][src]Struct tendermint::rpc::Client
Tendermint RPC client.
Presently supports JSONRPC via HTTP.
Methods
impl Client
[src]
pub fn new(address: &Address) -> Result<Self, Error>
[src]
Create a new Tendermint RPC client, connecting to the given address
pub fn abci_info(&self) -> Result<AbciInfo, Error>
[src]
/abci_info
: get information about the ABCI application.
pub fn abci_query<D>(
&self,
path: Option<Path>,
data: D,
height: Option<Height>,
prove: bool
) -> Result<AbciQuery, Error> where
D: Into<Vec<u8>>,
[src]
&self,
path: Option<Path>,
data: D,
height: Option<Height>,
prove: bool
) -> Result<AbciQuery, Error> where
D: Into<Vec<u8>>,
/abci_query
: query the ABCI application
pub fn block<H>(&self, height: H) -> Result<Response, Error> where
H: Into<Height>,
[src]
H: Into<Height>,
/block
: get block at a given height.
pub fn latest_block(&self) -> Result<Response, Error>
[src]
/block
: get the latest block.
pub fn block_results<H>(&self, height: H) -> Result<Response, Error> where
H: Into<Height>,
[src]
H: Into<Height>,
/block_results
: get ABCI results for a block at a particular height.
pub fn latest_block_results(&self) -> Result<Response, Error>
[src]
/block_results
: get ABCI results for the latest block.
pub fn blockchain<H>(&self, min: H, max: H) -> Result<Response, Error> where
H: Into<Height>,
[src]
H: Into<Height>,
/blockchain
: get block headers for min
<= height
<= max
.
Block headers are returned in descending order (highest first).
Returns at most 20 items.
pub fn broadcast_tx_async(&self, tx: Transaction) -> Result<Response, Error>
[src]
/broadcast_tx_async
: broadcast a transaction, returning immediately.
pub fn broadcast_tx_sync(&self, tx: Transaction) -> Result<Response, Error>
[src]
/broadcast_tx_sync
: broadcast a transaction, returning the response
from CheckTx
.
pub fn broadcast_tx_commit(&self, tx: Transaction) -> Result<Response, Error>
[src]
/broadcast_tx_sync
: broadcast a transaction, returning the response
from CheckTx
.
pub fn commit<H>(&self, height: H) -> Result<Response, Error> where
H: Into<Height>,
[src]
H: Into<Height>,
/commit
: get block commit at a given height.
pub fn latest_commit(&self) -> Result<Response, Error>
[src]
/commit
: get the latest block commit
pub 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 fn genesis(&self) -> Result<Genesis, Error>
[src]
/genesis
: get genesis file.
pub fn net_info(&self) -> Result<Response, Error>
[src]
/net_info
: obtain information about P2P and other network connections.
pub 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 fn perform<R>(&self, request: R) -> Result<R::Response, Error> where
R: Request,
[src]
R: Request,
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Typeable for T where
T: Any,
T: Any,