Trait tendermint_rpc::Client[][src]

pub trait Client {
#[must_use]    fn perform<'life0, 'async_trait, R>(
        &'life0 self,
        request: R
    ) -> Pin<Box<dyn Future<Output = Result<R::Response>> + Send + 'async_trait>>
    where
        R: SimpleRequest,
        R: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
; #[must_use] fn abci_info<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<AbciInfo>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn abci_query<'life0, 'async_trait, V>(
        &'life0 self,
        path: Option<Path>,
        data: V,
        height: Option<Height>,
        prove: bool
    ) -> Pin<Box<dyn Future<Output = Result<AbciQuery>> + Send + 'async_trait>>
    where
        V: Into<Vec<u8>> + Send,
        V: 'async_trait,
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn block<'life0, 'async_trait, H>(
        &'life0 self,
        height: H
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        H: Into<Height> + Send,
        H: 'async_trait,
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn latest_block<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn block_results<'life0, 'async_trait, H>(
        &'life0 self,
        height: H
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        H: Into<Height> + Send,
        H: 'async_trait,
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn latest_block_results<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn blockchain<'life0, 'async_trait, H>(
        &'life0 self,
        min: H,
        max: H
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        H: Into<Height> + Send,
        H: 'async_trait,
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn broadcast_tx_async<'life0, 'async_trait>(
        &'life0 self,
        tx: Transaction
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn broadcast_tx_sync<'life0, 'async_trait>(
        &'life0 self,
        tx: Transaction
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn broadcast_tx_commit<'life0, 'async_trait>(
        &'life0 self,
        tx: Transaction
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn commit<'life0, 'async_trait, H>(
        &'life0 self,
        height: H
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        H: Into<Height> + Send,
        H: 'async_trait,
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn consensus_state<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn validators<'life0, 'async_trait, H>(
        &'life0 self,
        height: H,
        paging: Paging
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        H: Into<Height> + Send,
        H: 'async_trait,
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn latest_commit<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn health<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn genesis<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Genesis>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn net_info<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn status<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn broadcast_evidence<'life0, 'async_trait>(
        &'life0 self,
        e: Evidence
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn tx_search<'life0, 'async_trait>(
        &'life0 self,
        query: Query,
        prove: bool,
        page: u32,
        per_page: u8,
        order: Order
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... }
#[must_use] fn wait_until_healthy<'life0, 'async_trait, T>(
        &'life0 self,
        timeout: T
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        T: Into<Duration> + Send,
        T: 'async_trait,
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... } }

Provides lightweight access to the Tendermint RPC. It gives access to all endpoints with the exception of the event subscription-related ones.

To access event subscription capabilities, use a client that implements the SubscriptionClient trait.

Required methods

#[must_use]fn perform<'life0, 'async_trait, R>(
    &'life0 self,
    request: R
) -> Pin<Box<dyn Future<Output = Result<R::Response>> + Send + 'async_trait>> where
    R: SimpleRequest,
    R: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Perform a request against the RPC endpoint

Loading content...

Provided methods

#[must_use]fn abci_info<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<AbciInfo>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/abci_info: get information about the ABCI application.

#[must_use]fn abci_query<'life0, 'async_trait, V>(
    &'life0 self,
    path: Option<Path>,
    data: V,
    height: Option<Height>,
    prove: bool
) -> Pin<Box<dyn Future<Output = Result<AbciQuery>> + Send + 'async_trait>> where
    V: Into<Vec<u8>> + Send,
    V: 'async_trait,
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/abci_query: query the ABCI application

#[must_use]fn block<'life0, 'async_trait, H>(
    &'life0 self,
    height: H
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    H: Into<Height> + Send,
    H: 'async_trait,
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/block: get block at a given height.

#[must_use]fn latest_block<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/block: get the latest block.

#[must_use]fn block_results<'life0, 'async_trait, H>(
    &'life0 self,
    height: H
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    H: Into<Height> + Send,
    H: 'async_trait,
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

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

#[must_use]fn latest_block_results<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/block_results: get ABCI results for the latest block.

#[must_use]fn blockchain<'life0, 'async_trait, H>(
    &'life0 self,
    min: H,
    max: H
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    H: Into<Height> + Send,
    H: 'async_trait,
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

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

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

Returns at most 20 items.

#[must_use]fn broadcast_tx_async<'life0, 'async_trait>(
    &'life0 self,
    tx: Transaction
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/broadcast_tx_async: broadcast a transaction, returning immediately.

#[must_use]fn broadcast_tx_sync<'life0, 'async_trait>(
    &'life0 self,
    tx: Transaction
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

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

#[must_use]fn broadcast_tx_commit<'life0, 'async_trait>(
    &'life0 self,
    tx: Transaction
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/broadcast_tx_commit: broadcast a transaction, returning the response from DeliverTx.

#[must_use]fn commit<'life0, 'async_trait, H>(
    &'life0 self,
    height: H
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    H: Into<Height> + Send,
    H: 'async_trait,
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/commit: get block commit at a given height.

#[must_use]fn consensus_state<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/consensus_state: get current consensus state

#[must_use]fn validators<'life0, 'async_trait, H>(
    &'life0 self,
    height: H,
    paging: Paging
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    H: Into<Height> + Send,
    H: 'async_trait,
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/validators: get validators a given height.

#[must_use]fn latest_commit<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/commit: get the latest block commit

#[must_use]fn health<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/health: get node health.

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

#[must_use]fn genesis<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Genesis>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/genesis: get genesis file.

#[must_use]fn net_info<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

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

#[must_use]fn status<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

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

#[must_use]fn broadcast_evidence<'life0, 'async_trait>(
    &'life0 self,
    e: Evidence
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

/broadcast_evidence: broadcast an evidence.

/tx_search: search for transactions with their results.

#[must_use]fn wait_until_healthy<'life0, 'async_trait, T>(
    &'life0 self,
    timeout: T
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
    T: Into<Duration> + Send,
    T: 'async_trait,
    'life0: 'async_trait,
    Self: Sync + 'async_trait, 
[src]

Poll the /health endpoint until it returns a successful result or the given timeout has elapsed.

Loading content...

Implementors

impl Client for HttpClient[src]

impl Client for WebSocketClient[src]

impl<M: MockRequestMatcher> Client for MockClient<M>[src]

Loading content...