1#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct BlockId {
6 #[prost(uint64, tag = "1")]
7 pub height: u64,
8 #[prost(bytes = "vec", tag = "2")]
9 pub hash: ::prost::alloc::vec::Vec<u8>,
10}
11#[derive(Clone, PartialEq, ::prost::Message)]
14pub struct BlockRange {
15 #[prost(message, optional, tag = "1")]
16 pub start: ::core::option::Option<BlockId>,
17 #[prost(message, optional, tag = "2")]
18 pub end: ::core::option::Option<BlockId>,
19}
20#[derive(Clone, PartialEq, ::prost::Message)]
24pub struct TxFilter {
25 #[prost(message, optional, tag = "1")]
27 pub block: ::core::option::Option<BlockId>,
28 #[prost(uint64, tag = "2")]
30 pub index: u64,
31 #[prost(bytes = "vec", tag = "3")]
33 pub hash: ::prost::alloc::vec::Vec<u8>,
34}
35#[derive(Clone, PartialEq, ::prost::Message)]
42pub struct RawTransaction {
43 #[prost(bytes = "vec", tag = "1")]
45 pub data: ::prost::alloc::vec::Vec<u8>,
46 #[prost(uint64, tag = "2")]
48 pub height: u64,
49}
50#[derive(Clone, PartialEq, ::prost::Message)]
54pub struct SendResponse {
55 #[prost(int32, tag = "1")]
56 pub error_code: i32,
57 #[prost(string, tag = "2")]
58 pub error_message: ::prost::alloc::string::String,
59}
60#[derive(Clone, Copy, PartialEq, ::prost::Message)]
62pub struct ChainSpec {}
63#[derive(Clone, Copy, PartialEq, ::prost::Message)]
65pub struct Empty {}
66#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct LightdInfo {
70 #[prost(string, tag = "1")]
71 pub version: ::prost::alloc::string::String,
72 #[prost(string, tag = "2")]
73 pub vendor: ::prost::alloc::string::String,
74 #[prost(bool, tag = "3")]
76 pub taddr_support: bool,
77 #[prost(string, tag = "4")]
79 pub chain_name: ::prost::alloc::string::String,
80 #[prost(uint64, tag = "5")]
82 pub sapling_activation_height: u64,
83 #[prost(string, tag = "6")]
85 pub consensus_branch_id: ::prost::alloc::string::String,
86 #[prost(uint64, tag = "7")]
88 pub block_height: u64,
89 #[prost(string, tag = "8")]
90 pub git_commit: ::prost::alloc::string::String,
91 #[prost(string, tag = "9")]
92 pub branch: ::prost::alloc::string::String,
93 #[prost(string, tag = "10")]
94 pub build_date: ::prost::alloc::string::String,
95 #[prost(string, tag = "11")]
96 pub build_user: ::prost::alloc::string::String,
97 #[prost(uint64, tag = "12")]
99 pub estimated_height: u64,
100 #[prost(string, tag = "13")]
102 pub zcashd_build: ::prost::alloc::string::String,
103 #[prost(string, tag = "14")]
105 pub zcashd_subversion: ::prost::alloc::string::String,
106 #[prost(string, tag = "15")]
108 pub donation_address: ::prost::alloc::string::String,
109}
110#[derive(Clone, PartialEq, ::prost::Message)]
113pub struct TransparentAddressBlockFilter {
114 #[prost(string, tag = "1")]
116 pub address: ::prost::alloc::string::String,
117 #[prost(message, optional, tag = "2")]
119 pub range: ::core::option::Option<BlockRange>,
120}
121#[derive(Clone, Copy, PartialEq, ::prost::Message)]
125pub struct Duration {
126 #[prost(int64, tag = "1")]
127 pub interval_us: i64,
128}
129#[derive(Clone, Copy, PartialEq, ::prost::Message)]
133pub struct PingResponse {
134 #[prost(int64, tag = "1")]
135 pub entry: i64,
136 #[prost(int64, tag = "2")]
137 pub exit: i64,
138}
139#[derive(Clone, PartialEq, ::prost::Message)]
140pub struct Address {
141 #[prost(string, tag = "1")]
142 pub address: ::prost::alloc::string::String,
143}
144#[derive(Clone, PartialEq, ::prost::Message)]
145pub struct AddressList {
146 #[prost(string, repeated, tag = "1")]
147 pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
148}
149#[derive(Clone, Copy, PartialEq, ::prost::Message)]
150pub struct Balance {
151 #[prost(int64, tag = "1")]
152 pub value_zat: i64,
153}
154#[derive(Clone, PartialEq, ::prost::Message)]
155pub struct Exclude {
156 #[prost(bytes = "vec", repeated, tag = "1")]
157 pub txid: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
158}
159#[derive(Clone, PartialEq, ::prost::Message)]
161pub struct TreeState {
162 #[prost(string, tag = "1")]
164 pub network: ::prost::alloc::string::String,
165 #[prost(uint64, tag = "2")]
167 pub height: u64,
168 #[prost(string, tag = "3")]
170 pub hash: ::prost::alloc::string::String,
171 #[prost(uint32, tag = "4")]
173 pub time: u32,
174 #[prost(string, tag = "5")]
176 pub sapling_tree: ::prost::alloc::string::String,
177 #[prost(string, tag = "6")]
179 pub orchard_tree: ::prost::alloc::string::String,
180}
181#[derive(Clone, Copy, PartialEq, ::prost::Message)]
182pub struct GetSubtreeRootsArg {
183 #[prost(uint32, tag = "1")]
185 pub start_index: u32,
186 #[prost(enumeration = "ShieldedProtocol", tag = "2")]
188 pub shielded_protocol: i32,
189 #[prost(uint32, tag = "3")]
191 pub max_entries: u32,
192}
193#[derive(Clone, PartialEq, ::prost::Message)]
194pub struct SubtreeRoot {
195 #[prost(bytes = "vec", tag = "2")]
197 pub root_hash: ::prost::alloc::vec::Vec<u8>,
198 #[prost(bytes = "vec", tag = "3")]
200 pub completing_block_hash: ::prost::alloc::vec::Vec<u8>,
201 #[prost(uint64, tag = "4")]
203 pub completing_block_height: u64,
204}
205#[derive(Clone, PartialEq, ::prost::Message)]
208pub struct GetAddressUtxosArg {
209 #[prost(string, repeated, tag = "1")]
210 pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
211 #[prost(uint64, tag = "2")]
212 pub start_height: u64,
213 #[prost(uint32, tag = "3")]
215 pub max_entries: u32,
216}
217#[derive(Clone, PartialEq, ::prost::Message)]
218pub struct GetAddressUtxosReply {
219 #[prost(string, tag = "6")]
220 pub address: ::prost::alloc::string::String,
221 #[prost(bytes = "vec", tag = "1")]
222 pub txid: ::prost::alloc::vec::Vec<u8>,
223 #[prost(int32, tag = "2")]
224 pub index: i32,
225 #[prost(bytes = "vec", tag = "3")]
226 pub script: ::prost::alloc::vec::Vec<u8>,
227 #[prost(int64, tag = "4")]
228 pub value_zat: i64,
229 #[prost(uint64, tag = "5")]
230 pub height: u64,
231}
232#[derive(Clone, PartialEq, ::prost::Message)]
233pub struct GetAddressUtxosReplyList {
234 #[prost(message, repeated, tag = "1")]
235 pub address_utxos: ::prost::alloc::vec::Vec<GetAddressUtxosReply>,
236}
237#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
238#[repr(i32)]
239pub enum ShieldedProtocol {
240 Sapling = 0,
241 Orchard = 1,
242}
243impl ShieldedProtocol {
244 pub fn as_str_name(&self) -> &'static str {
249 match self {
250 Self::Sapling => "sapling",
251 Self::Orchard => "orchard",
252 }
253 }
254 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
256 match value {
257 "sapling" => Some(Self::Sapling),
258 "orchard" => Some(Self::Orchard),
259 _ => None,
260 }
261 }
262}
263#[cfg(feature = "lightwalletd-tonic")]
265pub mod compact_tx_streamer_client {
266 #![allow(
267 unused_variables,
268 dead_code,
269 missing_docs,
270 clippy::wildcard_imports,
271 clippy::let_unit_value,
272 )]
273 use tonic::codegen::*;
274 use tonic::codegen::http::Uri;
275 #[derive(Debug, Clone)]
276 pub struct CompactTxStreamerClient<T> {
277 inner: tonic::client::Grpc<T>,
278 }
279 impl<T> CompactTxStreamerClient<T>
280 where
281 T: tonic::client::GrpcService<tonic::body::Body>,
282 T::Error: Into<StdError>,
283 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
284 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
285 {
286 pub fn new(inner: T) -> Self {
287 let inner = tonic::client::Grpc::new(inner);
288 Self { inner }
289 }
290 pub fn with_origin(inner: T, origin: Uri) -> Self {
291 let inner = tonic::client::Grpc::with_origin(inner, origin);
292 Self { inner }
293 }
294 pub fn with_interceptor<F>(
295 inner: T,
296 interceptor: F,
297 ) -> CompactTxStreamerClient<InterceptedService<T, F>>
298 where
299 F: tonic::service::Interceptor,
300 T::ResponseBody: Default,
301 T: tonic::codegen::Service<
302 http::Request<tonic::body::Body>,
303 Response = http::Response<
304 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
305 >,
306 >,
307 <T as tonic::codegen::Service<
308 http::Request<tonic::body::Body>,
309 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
310 {
311 CompactTxStreamerClient::new(InterceptedService::new(inner, interceptor))
312 }
313 #[must_use]
318 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
319 self.inner = self.inner.send_compressed(encoding);
320 self
321 }
322 #[must_use]
324 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
325 self.inner = self.inner.accept_compressed(encoding);
326 self
327 }
328 #[must_use]
332 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
333 self.inner = self.inner.max_decoding_message_size(limit);
334 self
335 }
336 #[must_use]
340 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
341 self.inner = self.inner.max_encoding_message_size(limit);
342 self
343 }
344 pub async fn get_latest_block(
346 &mut self,
347 request: impl tonic::IntoRequest<super::ChainSpec>,
348 ) -> std::result::Result<tonic::Response<super::BlockId>, tonic::Status> {
349 self.inner
350 .ready()
351 .await
352 .map_err(|e| {
353 tonic::Status::unknown(
354 format!("Service was not ready: {}", e.into()),
355 )
356 })?;
357 let codec = tonic::codec::ProstCodec::default();
358 let path = http::uri::PathAndQuery::from_static(
359 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLatestBlock",
360 );
361 let mut req = request.into_request();
362 req.extensions_mut()
363 .insert(
364 GrpcMethod::new(
365 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
366 "GetLatestBlock",
367 ),
368 );
369 self.inner.unary(req, path, codec).await
370 }
371 pub async fn get_block(
373 &mut self,
374 request: impl tonic::IntoRequest<super::BlockId>,
375 ) -> std::result::Result<
376 tonic::Response<crate::proto::compact_formats::CompactBlock>,
377 tonic::Status,
378 > {
379 self.inner
380 .ready()
381 .await
382 .map_err(|e| {
383 tonic::Status::unknown(
384 format!("Service was not ready: {}", e.into()),
385 )
386 })?;
387 let codec = tonic::codec::ProstCodec::default();
388 let path = http::uri::PathAndQuery::from_static(
389 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlock",
390 );
391 let mut req = request.into_request();
392 req.extensions_mut()
393 .insert(
394 GrpcMethod::new(
395 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
396 "GetBlock",
397 ),
398 );
399 self.inner.unary(req, path, codec).await
400 }
401 pub async fn get_block_nullifiers(
403 &mut self,
404 request: impl tonic::IntoRequest<super::BlockId>,
405 ) -> std::result::Result<
406 tonic::Response<crate::proto::compact_formats::CompactBlock>,
407 tonic::Status,
408 > {
409 self.inner
410 .ready()
411 .await
412 .map_err(|e| {
413 tonic::Status::unknown(
414 format!("Service was not ready: {}", e.into()),
415 )
416 })?;
417 let codec = tonic::codec::ProstCodec::default();
418 let path = http::uri::PathAndQuery::from_static(
419 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockNullifiers",
420 );
421 let mut req = request.into_request();
422 req.extensions_mut()
423 .insert(
424 GrpcMethod::new(
425 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
426 "GetBlockNullifiers",
427 ),
428 );
429 self.inner.unary(req, path, codec).await
430 }
431 pub async fn get_block_range(
433 &mut self,
434 request: impl tonic::IntoRequest<super::BlockRange>,
435 ) -> std::result::Result<
436 tonic::Response<
437 tonic::codec::Streaming<crate::proto::compact_formats::CompactBlock>,
438 >,
439 tonic::Status,
440 > {
441 self.inner
442 .ready()
443 .await
444 .map_err(|e| {
445 tonic::Status::unknown(
446 format!("Service was not ready: {}", e.into()),
447 )
448 })?;
449 let codec = tonic::codec::ProstCodec::default();
450 let path = http::uri::PathAndQuery::from_static(
451 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockRange",
452 );
453 let mut req = request.into_request();
454 req.extensions_mut()
455 .insert(
456 GrpcMethod::new(
457 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
458 "GetBlockRange",
459 ),
460 );
461 self.inner.server_streaming(req, path, codec).await
462 }
463 pub async fn get_block_range_nullifiers(
465 &mut self,
466 request: impl tonic::IntoRequest<super::BlockRange>,
467 ) -> std::result::Result<
468 tonic::Response<
469 tonic::codec::Streaming<crate::proto::compact_formats::CompactBlock>,
470 >,
471 tonic::Status,
472 > {
473 self.inner
474 .ready()
475 .await
476 .map_err(|e| {
477 tonic::Status::unknown(
478 format!("Service was not ready: {}", e.into()),
479 )
480 })?;
481 let codec = tonic::codec::ProstCodec::default();
482 let path = http::uri::PathAndQuery::from_static(
483 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockRangeNullifiers",
484 );
485 let mut req = request.into_request();
486 req.extensions_mut()
487 .insert(
488 GrpcMethod::new(
489 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
490 "GetBlockRangeNullifiers",
491 ),
492 );
493 self.inner.server_streaming(req, path, codec).await
494 }
495 pub async fn get_transaction(
497 &mut self,
498 request: impl tonic::IntoRequest<super::TxFilter>,
499 ) -> std::result::Result<tonic::Response<super::RawTransaction>, tonic::Status> {
500 self.inner
501 .ready()
502 .await
503 .map_err(|e| {
504 tonic::Status::unknown(
505 format!("Service was not ready: {}", e.into()),
506 )
507 })?;
508 let codec = tonic::codec::ProstCodec::default();
509 let path = http::uri::PathAndQuery::from_static(
510 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTransaction",
511 );
512 let mut req = request.into_request();
513 req.extensions_mut()
514 .insert(
515 GrpcMethod::new(
516 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
517 "GetTransaction",
518 ),
519 );
520 self.inner.unary(req, path, codec).await
521 }
522 pub async fn send_transaction(
524 &mut self,
525 request: impl tonic::IntoRequest<super::RawTransaction>,
526 ) -> std::result::Result<tonic::Response<super::SendResponse>, tonic::Status> {
527 self.inner
528 .ready()
529 .await
530 .map_err(|e| {
531 tonic::Status::unknown(
532 format!("Service was not ready: {}", e.into()),
533 )
534 })?;
535 let codec = tonic::codec::ProstCodec::default();
536 let path = http::uri::PathAndQuery::from_static(
537 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/SendTransaction",
538 );
539 let mut req = request.into_request();
540 req.extensions_mut()
541 .insert(
542 GrpcMethod::new(
543 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
544 "SendTransaction",
545 ),
546 );
547 self.inner.unary(req, path, codec).await
548 }
549 pub async fn get_taddress_txids(
553 &mut self,
554 request: impl tonic::IntoRequest<super::TransparentAddressBlockFilter>,
555 ) -> std::result::Result<
556 tonic::Response<tonic::codec::Streaming<super::RawTransaction>>,
557 tonic::Status,
558 > {
559 self.inner
560 .ready()
561 .await
562 .map_err(|e| {
563 tonic::Status::unknown(
564 format!("Service was not ready: {}", e.into()),
565 )
566 })?;
567 let codec = tonic::codec::ProstCodec::default();
568 let path = http::uri::PathAndQuery::from_static(
569 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTaddressTxids",
570 );
571 let mut req = request.into_request();
572 req.extensions_mut()
573 .insert(
574 GrpcMethod::new(
575 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
576 "GetTaddressTxids",
577 ),
578 );
579 self.inner.server_streaming(req, path, codec).await
580 }
581 pub async fn get_taddress_balance(
582 &mut self,
583 request: impl tonic::IntoRequest<super::AddressList>,
584 ) -> std::result::Result<tonic::Response<super::Balance>, tonic::Status> {
585 self.inner
586 .ready()
587 .await
588 .map_err(|e| {
589 tonic::Status::unknown(
590 format!("Service was not ready: {}", e.into()),
591 )
592 })?;
593 let codec = tonic::codec::ProstCodec::default();
594 let path = http::uri::PathAndQuery::from_static(
595 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTaddressBalance",
596 );
597 let mut req = request.into_request();
598 req.extensions_mut()
599 .insert(
600 GrpcMethod::new(
601 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
602 "GetTaddressBalance",
603 ),
604 );
605 self.inner.unary(req, path, codec).await
606 }
607 pub async fn get_taddress_balance_stream(
608 &mut self,
609 request: impl tonic::IntoStreamingRequest<Message = super::Address>,
610 ) -> std::result::Result<tonic::Response<super::Balance>, tonic::Status> {
611 self.inner
612 .ready()
613 .await
614 .map_err(|e| {
615 tonic::Status::unknown(
616 format!("Service was not ready: {}", e.into()),
617 )
618 })?;
619 let codec = tonic::codec::ProstCodec::default();
620 let path = http::uri::PathAndQuery::from_static(
621 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTaddressBalanceStream",
622 );
623 let mut req = request.into_streaming_request();
624 req.extensions_mut()
625 .insert(
626 GrpcMethod::new(
627 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
628 "GetTaddressBalanceStream",
629 ),
630 );
631 self.inner.client_streaming(req, path, codec).await
632 }
633 pub async fn get_mempool_tx(
643 &mut self,
644 request: impl tonic::IntoRequest<super::Exclude>,
645 ) -> std::result::Result<
646 tonic::Response<
647 tonic::codec::Streaming<crate::proto::compact_formats::CompactTx>,
648 >,
649 tonic::Status,
650 > {
651 self.inner
652 .ready()
653 .await
654 .map_err(|e| {
655 tonic::Status::unknown(
656 format!("Service was not ready: {}", e.into()),
657 )
658 })?;
659 let codec = tonic::codec::ProstCodec::default();
660 let path = http::uri::PathAndQuery::from_static(
661 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetMempoolTx",
662 );
663 let mut req = request.into_request();
664 req.extensions_mut()
665 .insert(
666 GrpcMethod::new(
667 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
668 "GetMempoolTx",
669 ),
670 );
671 self.inner.server_streaming(req, path, codec).await
672 }
673 pub async fn get_mempool_stream(
676 &mut self,
677 request: impl tonic::IntoRequest<super::Empty>,
678 ) -> std::result::Result<
679 tonic::Response<tonic::codec::Streaming<super::RawTransaction>>,
680 tonic::Status,
681 > {
682 self.inner
683 .ready()
684 .await
685 .map_err(|e| {
686 tonic::Status::unknown(
687 format!("Service was not ready: {}", e.into()),
688 )
689 })?;
690 let codec = tonic::codec::ProstCodec::default();
691 let path = http::uri::PathAndQuery::from_static(
692 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetMempoolStream",
693 );
694 let mut req = request.into_request();
695 req.extensions_mut()
696 .insert(
697 GrpcMethod::new(
698 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
699 "GetMempoolStream",
700 ),
701 );
702 self.inner.server_streaming(req, path, codec).await
703 }
704 pub async fn get_tree_state(
709 &mut self,
710 request: impl tonic::IntoRequest<super::BlockId>,
711 ) -> std::result::Result<tonic::Response<super::TreeState>, tonic::Status> {
712 self.inner
713 .ready()
714 .await
715 .map_err(|e| {
716 tonic::Status::unknown(
717 format!("Service was not ready: {}", e.into()),
718 )
719 })?;
720 let codec = tonic::codec::ProstCodec::default();
721 let path = http::uri::PathAndQuery::from_static(
722 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTreeState",
723 );
724 let mut req = request.into_request();
725 req.extensions_mut()
726 .insert(
727 GrpcMethod::new(
728 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
729 "GetTreeState",
730 ),
731 );
732 self.inner.unary(req, path, codec).await
733 }
734 pub async fn get_latest_tree_state(
735 &mut self,
736 request: impl tonic::IntoRequest<super::Empty>,
737 ) -> std::result::Result<tonic::Response<super::TreeState>, tonic::Status> {
738 self.inner
739 .ready()
740 .await
741 .map_err(|e| {
742 tonic::Status::unknown(
743 format!("Service was not ready: {}", e.into()),
744 )
745 })?;
746 let codec = tonic::codec::ProstCodec::default();
747 let path = http::uri::PathAndQuery::from_static(
748 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLatestTreeState",
749 );
750 let mut req = request.into_request();
751 req.extensions_mut()
752 .insert(
753 GrpcMethod::new(
754 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
755 "GetLatestTreeState",
756 ),
757 );
758 self.inner.unary(req, path, codec).await
759 }
760 pub async fn get_subtree_roots(
763 &mut self,
764 request: impl tonic::IntoRequest<super::GetSubtreeRootsArg>,
765 ) -> std::result::Result<
766 tonic::Response<tonic::codec::Streaming<super::SubtreeRoot>>,
767 tonic::Status,
768 > {
769 self.inner
770 .ready()
771 .await
772 .map_err(|e| {
773 tonic::Status::unknown(
774 format!("Service was not ready: {}", e.into()),
775 )
776 })?;
777 let codec = tonic::codec::ProstCodec::default();
778 let path = http::uri::PathAndQuery::from_static(
779 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetSubtreeRoots",
780 );
781 let mut req = request.into_request();
782 req.extensions_mut()
783 .insert(
784 GrpcMethod::new(
785 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
786 "GetSubtreeRoots",
787 ),
788 );
789 self.inner.server_streaming(req, path, codec).await
790 }
791 pub async fn get_address_utxos(
792 &mut self,
793 request: impl tonic::IntoRequest<super::GetAddressUtxosArg>,
794 ) -> std::result::Result<
795 tonic::Response<super::GetAddressUtxosReplyList>,
796 tonic::Status,
797 > {
798 self.inner
799 .ready()
800 .await
801 .map_err(|e| {
802 tonic::Status::unknown(
803 format!("Service was not ready: {}", e.into()),
804 )
805 })?;
806 let codec = tonic::codec::ProstCodec::default();
807 let path = http::uri::PathAndQuery::from_static(
808 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetAddressUtxos",
809 );
810 let mut req = request.into_request();
811 req.extensions_mut()
812 .insert(
813 GrpcMethod::new(
814 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
815 "GetAddressUtxos",
816 ),
817 );
818 self.inner.unary(req, path, codec).await
819 }
820 pub async fn get_address_utxos_stream(
821 &mut self,
822 request: impl tonic::IntoRequest<super::GetAddressUtxosArg>,
823 ) -> std::result::Result<
824 tonic::Response<tonic::codec::Streaming<super::GetAddressUtxosReply>>,
825 tonic::Status,
826 > {
827 self.inner
828 .ready()
829 .await
830 .map_err(|e| {
831 tonic::Status::unknown(
832 format!("Service was not ready: {}", e.into()),
833 )
834 })?;
835 let codec = tonic::codec::ProstCodec::default();
836 let path = http::uri::PathAndQuery::from_static(
837 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetAddressUtxosStream",
838 );
839 let mut req = request.into_request();
840 req.extensions_mut()
841 .insert(
842 GrpcMethod::new(
843 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
844 "GetAddressUtxosStream",
845 ),
846 );
847 self.inner.server_streaming(req, path, codec).await
848 }
849 pub async fn get_lightd_info(
851 &mut self,
852 request: impl tonic::IntoRequest<super::Empty>,
853 ) -> std::result::Result<tonic::Response<super::LightdInfo>, tonic::Status> {
854 self.inner
855 .ready()
856 .await
857 .map_err(|e| {
858 tonic::Status::unknown(
859 format!("Service was not ready: {}", e.into()),
860 )
861 })?;
862 let codec = tonic::codec::ProstCodec::default();
863 let path = http::uri::PathAndQuery::from_static(
864 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLightdInfo",
865 );
866 let mut req = request.into_request();
867 req.extensions_mut()
868 .insert(
869 GrpcMethod::new(
870 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
871 "GetLightdInfo",
872 ),
873 );
874 self.inner.unary(req, path, codec).await
875 }
876 pub async fn ping(
878 &mut self,
879 request: impl tonic::IntoRequest<super::Duration>,
880 ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status> {
881 self.inner
882 .ready()
883 .await
884 .map_err(|e| {
885 tonic::Status::unknown(
886 format!("Service was not ready: {}", e.into()),
887 )
888 })?;
889 let codec = tonic::codec::ProstCodec::default();
890 let path = http::uri::PathAndQuery::from_static(
891 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/Ping",
892 );
893 let mut req = request.into_request();
894 req.extensions_mut()
895 .insert(
896 GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "Ping"),
897 );
898 self.inner.unary(req, path, codec).await
899 }
900 }
901}