Skip to main content

GrpcIndexer

Struct GrpcIndexer 

Source
pub struct GrpcIndexer { /* private fields */ }
Expand description

gRPC-backed Indexer that connects to a Zcash chain indexer (server).

Implementations§

Source§

impl GrpcIndexer

Source

pub async fn new(uri: Uri) -> Result<Self, GetClientError>

Source

pub fn uri(&self) -> &Uri

Returns URI the gRPC client(s) are connected to.

Source

pub async fn get_clear_net_client(&self) -> CompactTxStreamerClient<Channel>

Returns the “surface net” gRPC client where the IP address is not obfuscated.

Trait Implementations§

Source§

impl Clone for GrpcIndexer

Source§

fn clone(&self) -> GrpcIndexer

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GrpcIndexer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Indexer for GrpcIndexer

Source§

async fn get_lightd_info( &mut self, timeout: Duration, ) -> Result<LightdInfo, Status>

Return server metadata (chain name, block height, version, etc.). Read more
Source§

async fn get_latest_block( &mut self, timeout: Duration, ) -> Result<BlockId, Status>

Return the height and hash of the chain tip. Read more
Source§

async fn send_transaction( &mut self, tx: RawTransaction, timeout: Duration, ) -> Result<String, Status>

Submit a raw transaction to the network. Read more
Source§

async fn get_tree_state( &mut self, block_id: BlockId, timeout: Duration, ) -> Result<TreeState, Status>

Fetch the note commitment tree state for the given block. Read more
Source§

async fn get_block( &mut self, block_id: BlockId, timeout: Duration, ) -> Result<CompactBlock, Status>

Return the compact block at the given height. Read more
Source§

async fn get_block_nullifiers( &mut self, block_id: BlockId, timeout: Duration, ) -> Result<CompactBlock, Status>

👎Deprecated:

use get_block instead

Return the compact block at the given height, containing only nullifiers. Read more
Source§

async fn get_block_range( &mut self, range: BlockRange, timeout: Duration, ) -> Result<Streaming<CompactBlock>, Status>

Return a stream of consecutive compact blocks for the given range. Read more
Source§

async fn get_block_range_nullifiers( &mut self, range: BlockRange, timeout: Duration, ) -> Result<Streaming<CompactBlock>, Status>

👎Deprecated:

use get_block_range instead

Return a stream of consecutive compact blocks (nullifiers only) for the given range. Read more
Source§

async fn get_transaction( &mut self, filter: TxFilter, timeout: Duration, ) -> Result<RawTransaction, Status>

Return the full serialized transaction matching the given filter. Read more
Source§

async fn get_mempool_tx( &mut self, request: GetMempoolTxRequest, timeout: Duration, ) -> Result<Streaming<CompactTx>, Status>

Return a stream of compact transactions currently in the mempool. Read more
Source§

async fn get_mempool_stream( &mut self, timeout: Duration, ) -> Result<Streaming<RawTransaction>, Status>

Return a stream of raw mempool transactions. Read more
Source§

async fn get_latest_tree_state( &mut self, timeout: Duration, ) -> Result<TreeState, Status>

Return the note commitment tree state at the chain tip. Read more
Source§

async fn get_subtree_roots( &mut self, arg: GetSubtreeRootsArg, timeout: Duration, ) -> Result<Streaming<SubtreeRoot>, Status>

Return a stream of subtree roots for the given shielded protocol. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more