pub struct CompactTxStreamerClient<T> { /* private fields */ }lightwalletd-tonic only.Implementations§
Source§impl<T> CompactTxStreamerClient<T>
impl<T> CompactTxStreamerClient<T>
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> CompactTxStreamerClient<InterceptedService<T, F>>
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn get_latest_block(
&mut self,
request: impl IntoRequest<ChainSpec>,
) -> Result<Response<BlockId>, Status>
pub async fn get_latest_block( &mut self, request: impl IntoRequest<ChainSpec>, ) -> Result<Response<BlockId>, Status>
Return the BlockID of the block at the tip of the best chain
Sourcepub async fn get_block(
&mut self,
request: impl IntoRequest<BlockId>,
) -> Result<Response<CompactBlock>, Status>
pub async fn get_block( &mut self, request: impl IntoRequest<BlockId>, ) -> Result<Response<CompactBlock>, Status>
Return the compact block corresponding to the given block identifier.
The returned CompactBlock includes transaction data for all value
pools, including transparent inputs (vin) and outputs (vout). This
differs from GetBlockRange, which supports filtering by pool type and
defaults to returning only shielded (Sapling, Orchard, and Ironwood)
data. Clients that require only data for specific pools should use
GetBlockRange with the appropriate poolTypes set.
Note: the single null-outpoint input for coinbase transactions is
omitted from the vin field of the corresponding CompactTx. See the
documentation of the CompactTx message for details.
Sourcepub async fn get_block_nullifiers(
&mut self,
request: impl IntoRequest<BlockId>,
) -> Result<Response<CompactBlock>, Status>
👎Deprecated
pub async fn get_block_nullifiers( &mut self, request: impl IntoRequest<BlockId>, ) -> Result<Response<CompactBlock>, Status>
Return a compact block containing only nullifier information for the shielded pools (Sapling spend nullifiers, Orchard action nullifiers, and Ironwood action nullifiers). Transparent transaction data, Sapling outputs, full Orchard/Ironwood action data, and commitment tree sizes are not included.
Note: this method is deprecated; use GetBlockRange with the
appropriate poolTypes instead.
Sourcepub async fn get_block_range(
&mut self,
request: impl IntoRequest<BlockRange>,
) -> Result<Response<Streaming<CompactBlock>>, Status>
pub async fn get_block_range( &mut self, request: impl IntoRequest<BlockRange>, ) -> Result<Response<Streaming<CompactBlock>>, Status>
Return a list of consecutive compact blocks in the specified range,
which is inclusive of range.end.
If range.start <= range.end, blocks are returned increasing height order; otherwise blocks are returned in decreasing height order.
Sourcepub async fn get_block_range_nullifiers(
&mut self,
request: impl IntoRequest<BlockRange>,
) -> Result<Response<Streaming<CompactBlock>>, Status>
👎Deprecated
pub async fn get_block_range_nullifiers( &mut self, request: impl IntoRequest<BlockRange>, ) -> Result<Response<Streaming<CompactBlock>>, Status>
Return a stream of compact blocks for the specified range, where each
block contains only nullifier information for the shielded pools
(Sapling spend nullifiers, Orchard action nullifiers, and Ironwood action
nullifiers). Transparent transaction data, Sapling outputs, full
Orchard/Ironwood action data, and commitment tree sizes are not included.
Implementations MUST ignore any
PoolType::TRANSPARENT member of the poolTypes field of the request.
Note: this method is deprecated; use GetBlockRange with the
appropriate poolTypes instead.
Sourcepub async fn get_transaction(
&mut self,
request: impl IntoRequest<TxFilter>,
) -> Result<Response<RawTransaction>, Status>
pub async fn get_transaction( &mut self, request: impl IntoRequest<TxFilter>, ) -> Result<Response<RawTransaction>, Status>
Return the requested full (not compact) transaction (as from zcashd)
Sourcepub async fn send_transaction(
&mut self,
request: impl IntoRequest<RawTransaction>,
) -> Result<Response<SendResponse>, Status>
pub async fn send_transaction( &mut self, request: impl IntoRequest<RawTransaction>, ) -> Result<Response<SendResponse>, Status>
Submit the given transaction to the Zcash network
Sourcepub async fn get_taddress_txids(
&mut self,
request: impl IntoRequest<TransparentAddressBlockFilter>,
) -> Result<Response<Streaming<RawTransaction>>, Status>
pub async fn get_taddress_txids( &mut self, request: impl IntoRequest<TransparentAddressBlockFilter>, ) -> Result<Response<Streaming<RawTransaction>>, Status>
Return RawTransactions that match the given transparent address filter.
Note: This function is misnamed, it returns complete RawTransaction values, not TxIds.
NOTE: this method is deprecated, please use GetTaddressTransactions instead.
Sourcepub async fn get_taddress_transactions(
&mut self,
request: impl IntoRequest<TransparentAddressBlockFilter>,
) -> Result<Response<Streaming<RawTransaction>>, Status>
pub async fn get_taddress_transactions( &mut self, request: impl IntoRequest<TransparentAddressBlockFilter>, ) -> Result<Response<Streaming<RawTransaction>>, Status>
Return the transactions corresponding to the given t-address within the given block range. Mempool transactions are not included in the results.
pub async fn get_taddress_balance( &mut self, request: impl IntoRequest<AddressList>, ) -> Result<Response<Balance>, Status>
pub async fn get_taddress_balance_stream( &mut self, request: impl IntoStreamingRequest<Message = Address>, ) -> Result<Response<Balance>, Status>
Sourcepub async fn get_mempool_tx(
&mut self,
request: impl IntoRequest<GetMempoolTxRequest>,
) -> Result<Response<Streaming<CompactTx>>, Status>
pub async fn get_mempool_tx( &mut self, request: impl IntoRequest<GetMempoolTxRequest>, ) -> Result<Response<Streaming<CompactTx>>, Status>
Returns a stream of the compact transaction representation for transactions
currently in the mempool. The results of this operation may be a few
seconds out of date. If the exclude_txid_suffixes list is empty,
return all transactions; otherwise return all except those in the
exclude_txid_suffixes list (if any); this allows the client to avoid
receiving transactions that it already has (from an earlier call to this
RPC). The transaction IDs in the exclude_txid_suffixes list can be
shortened to any number of bytes to make the request more
bandwidth-efficient; if two or more transactions in the mempool match a
txid suffix, none of the matching transactions are excluded. Txid
suffixes in the exclude list that don’t match any transactions in the
mempool are ignored.
Sourcepub async fn get_mempool_stream(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<Streaming<RawTransaction>>, Status>
pub async fn get_mempool_stream( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<Streaming<RawTransaction>>, Status>
Return a stream of current Mempool transactions. This will keep the output stream open while there are mempool transactions. It will close the returned stream when a new block is mined.
Sourcepub async fn get_tree_state(
&mut self,
request: impl IntoRequest<BlockId>,
) -> Result<Response<TreeState>, Status>
pub async fn get_tree_state( &mut self, request: impl IntoRequest<BlockId>, ) -> Result<Response<TreeState>, Status>
GetTreeState returns the note commitment tree state corresponding to the given block. See section 3.7 of the Zcash protocol specification. It returns several other useful values also (even though they can be obtained using GetBlock). The block can be specified by either height or hash.
pub async fn get_latest_tree_state( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<TreeState>, Status>
Sourcepub async fn get_subtree_roots(
&mut self,
request: impl IntoRequest<GetSubtreeRootsArg>,
) -> Result<Response<Streaming<SubtreeRoot>>, Status>
pub async fn get_subtree_roots( &mut self, request: impl IntoRequest<GetSubtreeRootsArg>, ) -> Result<Response<Streaming<SubtreeRoot>>, Status>
Returns a stream of information about roots of subtrees of the note commitment tree for the specified shielded pool (Sapling, Orchard, or Ironwood).
pub async fn get_address_utxos( &mut self, request: impl IntoRequest<GetAddressUtxosArg>, ) -> Result<Response<GetAddressUtxosReplyList>, Status>
pub async fn get_address_utxos_stream( &mut self, request: impl IntoRequest<GetAddressUtxosArg>, ) -> Result<Response<Streaming<GetAddressUtxosReply>>, Status>
Sourcepub async fn get_lightd_info(
&mut self,
request: impl IntoRequest<Empty>,
) -> Result<Response<LightdInfo>, Status>
pub async fn get_lightd_info( &mut self, request: impl IntoRequest<Empty>, ) -> Result<Response<LightdInfo>, Status>
Return information about this lightwalletd instance and the blockchain
Sourcepub async fn ping(
&mut self,
request: impl IntoRequest<Duration>,
) -> Result<Response<PingResponse>, Status>
pub async fn ping( &mut self, request: impl IntoRequest<Duration>, ) -> Result<Response<PingResponse>, Status>
Testing-only, requires lightwalletd –ping-very-insecure (do not enable in production)
Trait Implementations§
Source§impl<T: Clone> Clone for CompactTxStreamerClient<T>
impl<T: Clone> Clone for CompactTxStreamerClient<T>
Auto Trait Implementations§
impl<T> !Freeze for CompactTxStreamerClient<T>
impl<T> RefUnwindSafe for CompactTxStreamerClient<T>where
Grpc<T>: RefUnwindSafe,
impl<T> Send for CompactTxStreamerClient<T>where
Grpc<T>: Send,
impl<T> Sync for CompactTxStreamerClient<T>where
Grpc<T>: Sync,
impl<T> Unpin for CompactTxStreamerClient<T>where
Grpc<T>: Unpin,
impl<T> UnsafeUnpin for CompactTxStreamerClient<T>where
Grpc<T>: UnsafeUnpin,
impl<T> UnwindSafe for CompactTxStreamerClient<T>where
Grpc<T>: UnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PossiblyOption<T> for T
impl<T> PossiblyOption<T> for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.