1#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
7pub struct BlockId {
8 #[prost(uint64, tag = "1")]
9 pub height: u64,
10 #[prost(bytes = "vec", tag = "2")]
11 pub hash: ::prost::alloc::vec::Vec<u8>,
12}
13#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
24pub struct BlockRange {
25 #[prost(message, optional, tag = "1")]
26 pub start: ::core::option::Option<BlockId>,
27 #[prost(message, optional, tag = "2")]
28 pub end: ::core::option::Option<BlockId>,
29 #[prost(enumeration = "PoolType", repeated, tag = "3")]
30 pub pool_types: ::prost::alloc::vec::Vec<i32>,
31}
32#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
36pub struct TxFilter {
37 #[prost(message, optional, tag = "1")]
39 pub block: ::core::option::Option<BlockId>,
40 #[prost(uint64, tag = "2")]
42 pub index: u64,
43 #[prost(bytes = "vec", tag = "3")]
45 pub hash: ::prost::alloc::vec::Vec<u8>,
46}
47#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
54pub struct RawTransaction {
55 #[prost(bytes = "vec", tag = "1")]
57 pub data: ::prost::alloc::vec::Vec<u8>,
58 #[prost(uint64, tag = "2")]
77 pub height: u64,
78}
79#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
83pub struct SendResponse {
84 #[prost(int32, tag = "1")]
85 pub error_code: i32,
86 #[prost(string, tag = "2")]
87 pub error_message: ::prost::alloc::string::String,
88}
89#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
91pub struct ChainSpec {}
92#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
94pub struct Empty {}
95#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
98pub struct LightdInfo {
99 #[prost(string, tag = "1")]
100 pub version: ::prost::alloc::string::String,
101 #[prost(string, tag = "2")]
102 pub vendor: ::prost::alloc::string::String,
103 #[prost(bool, tag = "3")]
105 pub taddr_support: bool,
106 #[prost(string, tag = "4")]
108 pub chain_name: ::prost::alloc::string::String,
109 #[prost(uint64, tag = "5")]
111 pub sapling_activation_height: u64,
112 #[prost(string, tag = "6")]
114 pub consensus_branch_id: ::prost::alloc::string::String,
115 #[prost(uint64, tag = "7")]
117 pub block_height: u64,
118 #[prost(string, tag = "8")]
119 pub git_commit: ::prost::alloc::string::String,
120 #[prost(string, tag = "9")]
121 pub branch: ::prost::alloc::string::String,
122 #[prost(string, tag = "10")]
123 pub build_date: ::prost::alloc::string::String,
124 #[prost(string, tag = "11")]
125 pub build_user: ::prost::alloc::string::String,
126 #[prost(uint64, tag = "12")]
128 pub estimated_height: u64,
129 #[prost(string, tag = "13")]
131 pub zcashd_build: ::prost::alloc::string::String,
132 #[prost(string, tag = "14")]
134 pub zcashd_subversion: ::prost::alloc::string::String,
135 #[prost(string, tag = "15")]
137 pub donation_address: ::prost::alloc::string::String,
138 #[prost(string, tag = "16")]
140 pub upgrade_name: ::prost::alloc::string::String,
141 #[prost(uint64, tag = "17")]
143 pub upgrade_height: u64,
144 #[prost(string, tag = "18")]
146 pub lightwallet_protocol_version: ::prost::alloc::string::String,
147}
148#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
156pub struct TransparentAddressBlockFilter {
157 #[prost(string, tag = "1")]
159 pub address: ::prost::alloc::string::String,
160 #[prost(message, optional, tag = "2")]
162 pub range: ::core::option::Option<BlockRange>,
163}
164#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
168pub struct Duration {
169 #[prost(int64, tag = "1")]
170 pub interval_us: i64,
171}
172#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
176pub struct PingResponse {
177 #[prost(int64, tag = "1")]
178 pub entry: i64,
179 #[prost(int64, tag = "2")]
180 pub exit: i64,
181}
182#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
183pub struct Address {
184 #[prost(string, tag = "1")]
185 pub address: ::prost::alloc::string::String,
186}
187#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
188pub struct AddressList {
189 #[prost(string, repeated, tag = "1")]
190 pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
191}
192#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
193pub struct Balance {
194 #[prost(int64, tag = "1")]
195 pub value_zat: i64,
196}
197#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
199pub struct GetMempoolTxRequest {
200 #[prost(bytes = "vec", repeated, tag = "1")]
207 pub exclude_txid_suffixes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
208 #[prost(enumeration = "PoolType", repeated, tag = "3")]
213 pub pool_types: ::prost::alloc::vec::Vec<i32>,
214}
215#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
217pub struct TreeState {
218 #[prost(string, tag = "1")]
220 pub network: ::prost::alloc::string::String,
221 #[prost(uint64, tag = "2")]
223 pub height: u64,
224 #[prost(string, tag = "3")]
226 pub hash: ::prost::alloc::string::String,
227 #[prost(uint32, tag = "4")]
229 pub time: u32,
230 #[prost(string, tag = "5")]
232 pub sapling_tree: ::prost::alloc::string::String,
233 #[prost(string, tag = "6")]
235 pub orchard_tree: ::prost::alloc::string::String,
236 #[prost(string, tag = "7")]
238 pub ironwood_tree: ::prost::alloc::string::String,
239}
240#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
241pub struct GetSubtreeRootsArg {
242 #[prost(uint32, tag = "1")]
244 pub start_index: u32,
245 #[prost(enumeration = "ShieldedProtocol", tag = "2")]
247 pub shielded_protocol: i32,
248 #[prost(uint32, tag = "3")]
250 pub max_entries: u32,
251}
252#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
253pub struct SubtreeRoot {
254 #[prost(bytes = "vec", tag = "2")]
256 pub root_hash: ::prost::alloc::vec::Vec<u8>,
257 #[prost(bytes = "vec", tag = "3")]
259 pub completing_block_hash: ::prost::alloc::vec::Vec<u8>,
260 #[prost(uint64, tag = "4")]
262 pub completing_block_height: u64,
263}
264#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
267pub struct GetAddressUtxosArg {
268 #[prost(string, repeated, tag = "1")]
269 pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
270 #[prost(uint64, tag = "2")]
271 pub start_height: u64,
272 #[prost(uint32, tag = "3")]
274 pub max_entries: u32,
275}
276#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
277pub struct GetAddressUtxosReply {
278 #[prost(string, tag = "6")]
279 pub address: ::prost::alloc::string::String,
280 #[prost(bytes = "vec", tag = "1")]
281 pub txid: ::prost::alloc::vec::Vec<u8>,
282 #[prost(int32, tag = "2")]
283 pub index: i32,
284 #[prost(bytes = "vec", tag = "3")]
285 pub script: ::prost::alloc::vec::Vec<u8>,
286 #[prost(int64, tag = "4")]
287 pub value_zat: i64,
288 #[prost(uint64, tag = "5")]
289 pub height: u64,
290}
291#[derive(Clone, PartialEq, ::prost::Message)]
292pub struct GetAddressUtxosReplyList {
293 #[prost(message, repeated, tag = "1")]
294 pub address_utxos: ::prost::alloc::vec::Vec<GetAddressUtxosReply>,
295}
296#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
298#[repr(i32)]
299pub enum PoolType {
300 Invalid = 0,
301 Transparent = 1,
302 Sapling = 2,
303 Orchard = 3,
304 Ironwood = 4,
305}
306impl PoolType {
307 pub fn as_str_name(&self) -> &'static str {
312 match self {
313 Self::Invalid => "POOL_TYPE_INVALID",
314 Self::Transparent => "TRANSPARENT",
315 Self::Sapling => "SAPLING",
316 Self::Orchard => "ORCHARD",
317 Self::Ironwood => "IRONWOOD",
318 }
319 }
320 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
322 match value {
323 "POOL_TYPE_INVALID" => Some(Self::Invalid),
324 "TRANSPARENT" => Some(Self::Transparent),
325 "SAPLING" => Some(Self::Sapling),
326 "ORCHARD" => Some(Self::Orchard),
327 "IRONWOOD" => Some(Self::Ironwood),
328 _ => None,
329 }
330 }
331}
332#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
333#[repr(i32)]
334pub enum ShieldedProtocol {
335 Sapling = 0,
336 Orchard = 1,
337 Ironwood = 2,
338}
339impl ShieldedProtocol {
340 pub fn as_str_name(&self) -> &'static str {
345 match self {
346 Self::Sapling => "sapling",
347 Self::Orchard => "orchard",
348 Self::Ironwood => "ironwood",
349 }
350 }
351 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
353 match value {
354 "sapling" => Some(Self::Sapling),
355 "orchard" => Some(Self::Orchard),
356 "ironwood" => Some(Self::Ironwood),
357 _ => None,
358 }
359 }
360}
361#[cfg(feature = "lightwalletd-tonic")]
363pub mod compact_tx_streamer_client {
364 #![allow(
365 unused_variables,
366 dead_code,
367 missing_docs,
368 clippy::wildcard_imports,
369 clippy::let_unit_value,
370 )]
371 use tonic::codegen::*;
372 use tonic::codegen::http::Uri;
373 #[derive(Debug, Clone)]
374 pub struct CompactTxStreamerClient<T> {
375 inner: tonic::client::Grpc<T>,
376 }
377 impl<T> CompactTxStreamerClient<T>
378 where
379 T: tonic::client::GrpcService<tonic::body::Body>,
380 T::Error: Into<StdError>,
381 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
382 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
383 {
384 pub fn new(inner: T) -> Self {
385 let inner = tonic::client::Grpc::new(inner);
386 Self { inner }
387 }
388 pub fn with_origin(inner: T, origin: Uri) -> Self {
389 let inner = tonic::client::Grpc::with_origin(inner, origin);
390 Self { inner }
391 }
392 pub fn with_interceptor<F>(
393 inner: T,
394 interceptor: F,
395 ) -> CompactTxStreamerClient<InterceptedService<T, F>>
396 where
397 F: tonic::service::Interceptor,
398 T::ResponseBody: Default,
399 T: tonic::codegen::Service<
400 http::Request<tonic::body::Body>,
401 Response = http::Response<
402 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
403 >,
404 >,
405 <T as tonic::codegen::Service<
406 http::Request<tonic::body::Body>,
407 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
408 {
409 CompactTxStreamerClient::new(InterceptedService::new(inner, interceptor))
410 }
411 #[must_use]
416 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
417 self.inner = self.inner.send_compressed(encoding);
418 self
419 }
420 #[must_use]
422 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
423 self.inner = self.inner.accept_compressed(encoding);
424 self
425 }
426 #[must_use]
430 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
431 self.inner = self.inner.max_decoding_message_size(limit);
432 self
433 }
434 #[must_use]
438 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
439 self.inner = self.inner.max_encoding_message_size(limit);
440 self
441 }
442 pub async fn get_latest_block(
444 &mut self,
445 request: impl tonic::IntoRequest<super::ChainSpec>,
446 ) -> std::result::Result<tonic::Response<super::BlockId>, tonic::Status> {
447 self.inner
448 .ready()
449 .await
450 .map_err(|e| {
451 tonic::Status::unknown(
452 format!("Service was not ready: {}", e.into()),
453 )
454 })?;
455 let codec = tonic_prost::ProstCodec::default();
456 let path = http::uri::PathAndQuery::from_static(
457 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLatestBlock",
458 );
459 let mut req = request.into_request();
460 req.extensions_mut()
461 .insert(
462 GrpcMethod::new(
463 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
464 "GetLatestBlock",
465 ),
466 );
467 self.inner.unary(req, path, codec).await
468 }
469 pub async fn get_block(
482 &mut self,
483 request: impl tonic::IntoRequest<super::BlockId>,
484 ) -> std::result::Result<
485 tonic::Response<crate::proto::compact_formats::CompactBlock>,
486 tonic::Status,
487 > {
488 self.inner
489 .ready()
490 .await
491 .map_err(|e| {
492 tonic::Status::unknown(
493 format!("Service was not ready: {}", e.into()),
494 )
495 })?;
496 let codec = tonic_prost::ProstCodec::default();
497 let path = http::uri::PathAndQuery::from_static(
498 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlock",
499 );
500 let mut req = request.into_request();
501 req.extensions_mut()
502 .insert(
503 GrpcMethod::new(
504 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
505 "GetBlock",
506 ),
507 );
508 self.inner.unary(req, path, codec).await
509 }
510 #[deprecated]
519 pub async fn get_block_nullifiers(
520 &mut self,
521 request: impl tonic::IntoRequest<super::BlockId>,
522 ) -> std::result::Result<
523 tonic::Response<crate::proto::compact_formats::CompactBlock>,
524 tonic::Status,
525 > {
526 self.inner
527 .ready()
528 .await
529 .map_err(|e| {
530 tonic::Status::unknown(
531 format!("Service was not ready: {}", e.into()),
532 )
533 })?;
534 let codec = tonic_prost::ProstCodec::default();
535 let path = http::uri::PathAndQuery::from_static(
536 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockNullifiers",
537 );
538 let mut req = request.into_request();
539 req.extensions_mut()
540 .insert(
541 GrpcMethod::new(
542 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
543 "GetBlockNullifiers",
544 ),
545 );
546 self.inner.unary(req, path, codec).await
547 }
548 pub async fn get_block_range(
554 &mut self,
555 request: impl tonic::IntoRequest<super::BlockRange>,
556 ) -> std::result::Result<
557 tonic::Response<
558 tonic::codec::Streaming<crate::proto::compact_formats::CompactBlock>,
559 >,
560 tonic::Status,
561 > {
562 self.inner
563 .ready()
564 .await
565 .map_err(|e| {
566 tonic::Status::unknown(
567 format!("Service was not ready: {}", e.into()),
568 )
569 })?;
570 let codec = tonic_prost::ProstCodec::default();
571 let path = http::uri::PathAndQuery::from_static(
572 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockRange",
573 );
574 let mut req = request.into_request();
575 req.extensions_mut()
576 .insert(
577 GrpcMethod::new(
578 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
579 "GetBlockRange",
580 ),
581 );
582 self.inner.server_streaming(req, path, codec).await
583 }
584 #[deprecated]
595 pub async fn get_block_range_nullifiers(
596 &mut self,
597 request: impl tonic::IntoRequest<super::BlockRange>,
598 ) -> std::result::Result<
599 tonic::Response<
600 tonic::codec::Streaming<crate::proto::compact_formats::CompactBlock>,
601 >,
602 tonic::Status,
603 > {
604 self.inner
605 .ready()
606 .await
607 .map_err(|e| {
608 tonic::Status::unknown(
609 format!("Service was not ready: {}", e.into()),
610 )
611 })?;
612 let codec = tonic_prost::ProstCodec::default();
613 let path = http::uri::PathAndQuery::from_static(
614 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockRangeNullifiers",
615 );
616 let mut req = request.into_request();
617 req.extensions_mut()
618 .insert(
619 GrpcMethod::new(
620 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
621 "GetBlockRangeNullifiers",
622 ),
623 );
624 self.inner.server_streaming(req, path, codec).await
625 }
626 pub async fn get_transaction(
628 &mut self,
629 request: impl tonic::IntoRequest<super::TxFilter>,
630 ) -> std::result::Result<tonic::Response<super::RawTransaction>, tonic::Status> {
631 self.inner
632 .ready()
633 .await
634 .map_err(|e| {
635 tonic::Status::unknown(
636 format!("Service was not ready: {}", e.into()),
637 )
638 })?;
639 let codec = tonic_prost::ProstCodec::default();
640 let path = http::uri::PathAndQuery::from_static(
641 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTransaction",
642 );
643 let mut req = request.into_request();
644 req.extensions_mut()
645 .insert(
646 GrpcMethod::new(
647 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
648 "GetTransaction",
649 ),
650 );
651 self.inner.unary(req, path, codec).await
652 }
653 pub async fn send_transaction(
655 &mut self,
656 request: impl tonic::IntoRequest<super::RawTransaction>,
657 ) -> std::result::Result<tonic::Response<super::SendResponse>, tonic::Status> {
658 self.inner
659 .ready()
660 .await
661 .map_err(|e| {
662 tonic::Status::unknown(
663 format!("Service was not ready: {}", e.into()),
664 )
665 })?;
666 let codec = tonic_prost::ProstCodec::default();
667 let path = http::uri::PathAndQuery::from_static(
668 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/SendTransaction",
669 );
670 let mut req = request.into_request();
671 req.extensions_mut()
672 .insert(
673 GrpcMethod::new(
674 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
675 "SendTransaction",
676 ),
677 );
678 self.inner.unary(req, path, codec).await
679 }
680 pub async fn get_taddress_txids(
685 &mut self,
686 request: impl tonic::IntoRequest<super::TransparentAddressBlockFilter>,
687 ) -> std::result::Result<
688 tonic::Response<tonic::codec::Streaming<super::RawTransaction>>,
689 tonic::Status,
690 > {
691 self.inner
692 .ready()
693 .await
694 .map_err(|e| {
695 tonic::Status::unknown(
696 format!("Service was not ready: {}", e.into()),
697 )
698 })?;
699 let codec = tonic_prost::ProstCodec::default();
700 let path = http::uri::PathAndQuery::from_static(
701 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTaddressTxids",
702 );
703 let mut req = request.into_request();
704 req.extensions_mut()
705 .insert(
706 GrpcMethod::new(
707 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
708 "GetTaddressTxids",
709 ),
710 );
711 self.inner.server_streaming(req, path, codec).await
712 }
713 pub async fn get_taddress_transactions(
716 &mut self,
717 request: impl tonic::IntoRequest<super::TransparentAddressBlockFilter>,
718 ) -> std::result::Result<
719 tonic::Response<tonic::codec::Streaming<super::RawTransaction>>,
720 tonic::Status,
721 > {
722 self.inner
723 .ready()
724 .await
725 .map_err(|e| {
726 tonic::Status::unknown(
727 format!("Service was not ready: {}", e.into()),
728 )
729 })?;
730 let codec = tonic_prost::ProstCodec::default();
731 let path = http::uri::PathAndQuery::from_static(
732 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTaddressTransactions",
733 );
734 let mut req = request.into_request();
735 req.extensions_mut()
736 .insert(
737 GrpcMethod::new(
738 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
739 "GetTaddressTransactions",
740 ),
741 );
742 self.inner.server_streaming(req, path, codec).await
743 }
744 pub async fn get_taddress_balance(
745 &mut self,
746 request: impl tonic::IntoRequest<super::AddressList>,
747 ) -> std::result::Result<tonic::Response<super::Balance>, tonic::Status> {
748 self.inner
749 .ready()
750 .await
751 .map_err(|e| {
752 tonic::Status::unknown(
753 format!("Service was not ready: {}", e.into()),
754 )
755 })?;
756 let codec = tonic_prost::ProstCodec::default();
757 let path = http::uri::PathAndQuery::from_static(
758 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTaddressBalance",
759 );
760 let mut req = request.into_request();
761 req.extensions_mut()
762 .insert(
763 GrpcMethod::new(
764 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
765 "GetTaddressBalance",
766 ),
767 );
768 self.inner.unary(req, path, codec).await
769 }
770 pub async fn get_taddress_balance_stream(
771 &mut self,
772 request: impl tonic::IntoStreamingRequest<Message = super::Address>,
773 ) -> std::result::Result<tonic::Response<super::Balance>, tonic::Status> {
774 self.inner
775 .ready()
776 .await
777 .map_err(|e| {
778 tonic::Status::unknown(
779 format!("Service was not ready: {}", e.into()),
780 )
781 })?;
782 let codec = tonic_prost::ProstCodec::default();
783 let path = http::uri::PathAndQuery::from_static(
784 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTaddressBalanceStream",
785 );
786 let mut req = request.into_streaming_request();
787 req.extensions_mut()
788 .insert(
789 GrpcMethod::new(
790 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
791 "GetTaddressBalanceStream",
792 ),
793 );
794 self.inner.client_streaming(req, path, codec).await
795 }
796 pub async fn get_mempool_tx(
809 &mut self,
810 request: impl tonic::IntoRequest<super::GetMempoolTxRequest>,
811 ) -> std::result::Result<
812 tonic::Response<
813 tonic::codec::Streaming<crate::proto::compact_formats::CompactTx>,
814 >,
815 tonic::Status,
816 > {
817 self.inner
818 .ready()
819 .await
820 .map_err(|e| {
821 tonic::Status::unknown(
822 format!("Service was not ready: {}", e.into()),
823 )
824 })?;
825 let codec = tonic_prost::ProstCodec::default();
826 let path = http::uri::PathAndQuery::from_static(
827 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetMempoolTx",
828 );
829 let mut req = request.into_request();
830 req.extensions_mut()
831 .insert(
832 GrpcMethod::new(
833 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
834 "GetMempoolTx",
835 ),
836 );
837 self.inner.server_streaming(req, path, codec).await
838 }
839 pub async fn get_mempool_stream(
842 &mut self,
843 request: impl tonic::IntoRequest<super::Empty>,
844 ) -> std::result::Result<
845 tonic::Response<tonic::codec::Streaming<super::RawTransaction>>,
846 tonic::Status,
847 > {
848 self.inner
849 .ready()
850 .await
851 .map_err(|e| {
852 tonic::Status::unknown(
853 format!("Service was not ready: {}", e.into()),
854 )
855 })?;
856 let codec = tonic_prost::ProstCodec::default();
857 let path = http::uri::PathAndQuery::from_static(
858 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetMempoolStream",
859 );
860 let mut req = request.into_request();
861 req.extensions_mut()
862 .insert(
863 GrpcMethod::new(
864 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
865 "GetMempoolStream",
866 ),
867 );
868 self.inner.server_streaming(req, path, codec).await
869 }
870 pub async fn get_tree_state(
875 &mut self,
876 request: impl tonic::IntoRequest<super::BlockId>,
877 ) -> std::result::Result<tonic::Response<super::TreeState>, tonic::Status> {
878 self.inner
879 .ready()
880 .await
881 .map_err(|e| {
882 tonic::Status::unknown(
883 format!("Service was not ready: {}", e.into()),
884 )
885 })?;
886 let codec = tonic_prost::ProstCodec::default();
887 let path = http::uri::PathAndQuery::from_static(
888 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTreeState",
889 );
890 let mut req = request.into_request();
891 req.extensions_mut()
892 .insert(
893 GrpcMethod::new(
894 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
895 "GetTreeState",
896 ),
897 );
898 self.inner.unary(req, path, codec).await
899 }
900 pub async fn get_latest_tree_state(
901 &mut self,
902 request: impl tonic::IntoRequest<super::Empty>,
903 ) -> std::result::Result<tonic::Response<super::TreeState>, tonic::Status> {
904 self.inner
905 .ready()
906 .await
907 .map_err(|e| {
908 tonic::Status::unknown(
909 format!("Service was not ready: {}", e.into()),
910 )
911 })?;
912 let codec = tonic_prost::ProstCodec::default();
913 let path = http::uri::PathAndQuery::from_static(
914 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLatestTreeState",
915 );
916 let mut req = request.into_request();
917 req.extensions_mut()
918 .insert(
919 GrpcMethod::new(
920 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
921 "GetLatestTreeState",
922 ),
923 );
924 self.inner.unary(req, path, codec).await
925 }
926 pub async fn get_subtree_roots(
929 &mut self,
930 request: impl tonic::IntoRequest<super::GetSubtreeRootsArg>,
931 ) -> std::result::Result<
932 tonic::Response<tonic::codec::Streaming<super::SubtreeRoot>>,
933 tonic::Status,
934 > {
935 self.inner
936 .ready()
937 .await
938 .map_err(|e| {
939 tonic::Status::unknown(
940 format!("Service was not ready: {}", e.into()),
941 )
942 })?;
943 let codec = tonic_prost::ProstCodec::default();
944 let path = http::uri::PathAndQuery::from_static(
945 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetSubtreeRoots",
946 );
947 let mut req = request.into_request();
948 req.extensions_mut()
949 .insert(
950 GrpcMethod::new(
951 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
952 "GetSubtreeRoots",
953 ),
954 );
955 self.inner.server_streaming(req, path, codec).await
956 }
957 pub async fn get_address_utxos(
958 &mut self,
959 request: impl tonic::IntoRequest<super::GetAddressUtxosArg>,
960 ) -> std::result::Result<
961 tonic::Response<super::GetAddressUtxosReplyList>,
962 tonic::Status,
963 > {
964 self.inner
965 .ready()
966 .await
967 .map_err(|e| {
968 tonic::Status::unknown(
969 format!("Service was not ready: {}", e.into()),
970 )
971 })?;
972 let codec = tonic_prost::ProstCodec::default();
973 let path = http::uri::PathAndQuery::from_static(
974 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetAddressUtxos",
975 );
976 let mut req = request.into_request();
977 req.extensions_mut()
978 .insert(
979 GrpcMethod::new(
980 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
981 "GetAddressUtxos",
982 ),
983 );
984 self.inner.unary(req, path, codec).await
985 }
986 pub async fn get_address_utxos_stream(
987 &mut self,
988 request: impl tonic::IntoRequest<super::GetAddressUtxosArg>,
989 ) -> std::result::Result<
990 tonic::Response<tonic::codec::Streaming<super::GetAddressUtxosReply>>,
991 tonic::Status,
992 > {
993 self.inner
994 .ready()
995 .await
996 .map_err(|e| {
997 tonic::Status::unknown(
998 format!("Service was not ready: {}", e.into()),
999 )
1000 })?;
1001 let codec = tonic_prost::ProstCodec::default();
1002 let path = http::uri::PathAndQuery::from_static(
1003 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetAddressUtxosStream",
1004 );
1005 let mut req = request.into_request();
1006 req.extensions_mut()
1007 .insert(
1008 GrpcMethod::new(
1009 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
1010 "GetAddressUtxosStream",
1011 ),
1012 );
1013 self.inner.server_streaming(req, path, codec).await
1014 }
1015 pub async fn get_lightd_info(
1017 &mut self,
1018 request: impl tonic::IntoRequest<super::Empty>,
1019 ) -> std::result::Result<tonic::Response<super::LightdInfo>, tonic::Status> {
1020 self.inner
1021 .ready()
1022 .await
1023 .map_err(|e| {
1024 tonic::Status::unknown(
1025 format!("Service was not ready: {}", e.into()),
1026 )
1027 })?;
1028 let codec = tonic_prost::ProstCodec::default();
1029 let path = http::uri::PathAndQuery::from_static(
1030 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLightdInfo",
1031 );
1032 let mut req = request.into_request();
1033 req.extensions_mut()
1034 .insert(
1035 GrpcMethod::new(
1036 "cash.z.wallet.sdk.rpc.CompactTxStreamer",
1037 "GetLightdInfo",
1038 ),
1039 );
1040 self.inner.unary(req, path, codec).await
1041 }
1042 pub async fn ping(
1044 &mut self,
1045 request: impl tonic::IntoRequest<super::Duration>,
1046 ) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status> {
1047 self.inner
1048 .ready()
1049 .await
1050 .map_err(|e| {
1051 tonic::Status::unknown(
1052 format!("Service was not ready: {}", e.into()),
1053 )
1054 })?;
1055 let codec = tonic_prost::ProstCodec::default();
1056 let path = http::uri::PathAndQuery::from_static(
1057 "/cash.z.wallet.sdk.rpc.CompactTxStreamer/Ping",
1058 );
1059 let mut req = request.into_request();
1060 req.extensions_mut()
1061 .insert(
1062 GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "Ping"),
1063 );
1064 self.inner.unary(req, path, codec).await
1065 }
1066 }
1067}