pub struct GrpcIndexer { /* private fields */ }Expand description
gRPC-backed Indexer that connects to a Zcash chain indexer (server).
Implementations§
Source§impl GrpcIndexer
impl GrpcIndexer
pub async fn new(uri: Uri) -> Result<Self, GetClientError>
Sourcepub async fn get_clear_net_client(&self) -> CompactTxStreamerClient<Channel>
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
impl Clone for GrpcIndexer
Source§fn clone(&self) -> GrpcIndexer
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GrpcIndexer
impl Debug for GrpcIndexer
Source§impl Indexer for GrpcIndexer
impl Indexer for GrpcIndexer
Source§async fn get_lightd_info(
&mut self,
timeout: Duration,
) -> Result<LightdInfo, Status>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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§
impl !Freeze for GrpcIndexer
impl !RefUnwindSafe for GrpcIndexer
impl !UnwindSafe for GrpcIndexer
impl Send for GrpcIndexer
impl Sync for GrpcIndexer
impl Unpin for GrpcIndexer
impl UnsafeUnpin for GrpcIndexer
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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