Skip to main content

zcash_client_backend/proto/
service.rs

1// This file is @generated by prost-build.
2/// A BlockID message contains identifiers to select a block: a height or a
3/// hash. Support for specification by hash is not mandatory. (If `hash` is
4/// non-empty, the rpc may return an error.) This field is present to support
5/// a possible future upgrade.
6#[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/// BlockRange specifies a series of blocks from start to end inclusive.
14/// Both BlockIDs must be heights; specification by hash is not yet supported.
15///
16/// If no pool types are specified, the server should default to the legacy
17/// behavior of returning only data relevant to the shielded (Sapling, Orchard,
18/// and Ironwood) pools; otherwise, the server should prune `CompactBlock`s
19/// returned to include only data relevant to the requested pool types. Clients MUST
20/// verify that the version of the server they are connected to are capable
21/// of returning pruned and/or transparent data before setting `poolTypes`
22/// to a non-empty value.
23#[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/// A TxFilter contains the information needed to identify a particular
33/// transaction: either a block and an index, or a direct transaction hash.
34/// Currently, only specification by hash is supported.
35#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
36pub struct TxFilter {
37    /// block identifier, height or hash
38    #[prost(message, optional, tag = "1")]
39    pub block: ::core::option::Option<BlockId>,
40    /// index within the block
41    #[prost(uint64, tag = "2")]
42    pub index: u64,
43    /// transaction ID (hash, txid)
44    #[prost(bytes = "vec", tag = "3")]
45    pub hash: ::prost::alloc::vec::Vec<u8>,
46}
47/// RawTransaction contains the complete transaction data. It also optionally includes
48/// the block height in which the transaction was included, or, when returned
49/// by GetMempoolStream(), the latest block height.
50///
51/// FIXME: the documentation here about mempool status contradicts the documentation
52/// for the `height` field. See <https://github.com/zcash/librustzcash/issues/1484>
53#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
54pub struct RawTransaction {
55    /// The serialized representation of the Zcash transaction.
56    #[prost(bytes = "vec", tag = "1")]
57    pub data: ::prost::alloc::vec::Vec<u8>,
58    /// The height at which the transaction is mined, or a sentinel value.
59    ///
60    /// Due to an error in the original protobuf definition, it is necessary to
61    /// reinterpret the result of the `getrawtransaction` RPC call. Zcashd will
62    /// return the int64 value `-1` for the height of transactions that appear
63    /// in the block index, but which are not mined in the main chain. Here, the
64    /// height field of `RawTransaction` was erroneously created as a `uint64`,
65    /// and as such we must map the response from the zcashd RPC API to be
66    /// representable within this space. Additionally, the `height` field will
67    /// be absent for transactions in the mempool, resulting in the default
68    /// value of `0` being set. Therefore, the meanings of the `height` field of
69    /// the `RawTransaction` type are as follows:
70    ///
71    /// * height 0: the transaction is in the mempool
72    /// * height 0xffffffffffffffff: the transaction has been mined on a fork that
73    ///    is not currently the main chain
74    /// * any other height: the transaction has been mined in the main chain at the
75    ///    given height
76    #[prost(uint64, tag = "2")]
77    pub height: u64,
78}
79/// A SendResponse encodes an error code and a string. It is currently used
80/// only by SendTransaction(). If error code is zero, the operation was
81/// successful; if non-zero, it and the message specify the failure.
82#[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/// Chainspec is a placeholder to allow specification of a particular chain fork.
90#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
91pub struct ChainSpec {}
92/// Empty is for gRPCs that take no arguments, currently only GetLightdInfo.
93#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
94pub struct Empty {}
95/// LightdInfo returns various information about this lightwalletd instance
96/// and the state of the blockchain.
97#[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    /// true
104    #[prost(bool, tag = "3")]
105    pub taddr_support: bool,
106    /// either "main" or "test"
107    #[prost(string, tag = "4")]
108    pub chain_name: ::prost::alloc::string::String,
109    /// depends on mainnet or testnet
110    #[prost(uint64, tag = "5")]
111    pub sapling_activation_height: u64,
112    /// protocol identifier, see consensus/upgrades.cpp
113    #[prost(string, tag = "6")]
114    pub consensus_branch_id: ::prost::alloc::string::String,
115    /// latest block on the best chain
116    #[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    /// less than tip height if zcashd is syncing
127    #[prost(uint64, tag = "12")]
128    pub estimated_height: u64,
129    /// example: "v4.1.1-877212414"
130    #[prost(string, tag = "13")]
131    pub zcashd_build: ::prost::alloc::string::String,
132    /// example: "/MagicBean:4.1.1/"
133    #[prost(string, tag = "14")]
134    pub zcashd_subversion: ::prost::alloc::string::String,
135    /// Zcash donation UA address
136    #[prost(string, tag = "15")]
137    pub donation_address: ::prost::alloc::string::String,
138    /// name of next pending network upgrade, empty if none scheduled
139    #[prost(string, tag = "16")]
140    pub upgrade_name: ::prost::alloc::string::String,
141    /// height of next pending upgrade, zero if none is scheduled
142    #[prost(uint64, tag = "17")]
143    pub upgrade_height: u64,
144    /// version of <https://github.com/zcash/lightwallet-protocol> served by this server
145    #[prost(string, tag = "18")]
146    pub lightwallet_protocol_version: ::prost::alloc::string::String,
147}
148/// TransparentAddressBlockFilter restricts the results of the GRPC methods that
149/// use it to the transactions that involve the given address and were mined in
150/// the specified block range. Non-default values for both the address and the
151/// block range must be specified. Mempool transactions are not included.
152///
153/// The `poolTypes` field of the `range` argument should be ignored.
154/// Implementations MAY consider it an error if any pool types are specified.
155#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
156pub struct TransparentAddressBlockFilter {
157    /// t-address
158    #[prost(string, tag = "1")]
159    pub address: ::prost::alloc::string::String,
160    /// start, end heights only
161    #[prost(message, optional, tag = "2")]
162    pub range: ::core::option::Option<BlockRange>,
163}
164/// Duration is currently used only for testing, so that the Ping rpc
165/// can simulate a delay, to create many simultaneous connections. Units
166/// are microseconds.
167#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
168pub struct Duration {
169    #[prost(int64, tag = "1")]
170    pub interval_us: i64,
171}
172/// PingResponse is used to indicate concurrency, how many Ping rpcs
173/// are executing upon entry and upon exit (after the delay).
174/// This rpc is used for testing only.
175#[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/// Request parameters for the `GetMempoolTx` RPC.
198#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
199pub struct GetMempoolTxRequest {
200    /// A list of transaction ID byte string suffixes that should be excluded
201    /// from the response. These suffixes may be produced either directly from
202    /// the underlying txid bytes, or, if the source values are encoded txid
203    /// strings, by truncating the hexadecimal representation of each
204    /// transaction ID to an even number of characters, and then hex-decoding
205    /// and then byte-reversing this value to obtain the byte representation.
206    #[prost(bytes = "vec", repeated, tag = "1")]
207    pub exclude_txid_suffixes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
208    /// The server must prune `CompactTx`s returned to include only data
209    /// relevant to the requested pool types. If no pool types are specified,
210    /// the server should default to the legacy behavior of returning only data
211    /// relevant to the shielded (Sapling, Orchard, and Ironwood) pools.
212    #[prost(enumeration = "PoolType", repeated, tag = "3")]
213    pub pool_types: ::prost::alloc::vec::Vec<i32>,
214}
215/// The TreeState is derived from the Zcash z_gettreestate rpc.
216#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
217pub struct TreeState {
218    /// "main" or "test"
219    #[prost(string, tag = "1")]
220    pub network: ::prost::alloc::string::String,
221    /// block height
222    #[prost(uint64, tag = "2")]
223    pub height: u64,
224    /// block id
225    #[prost(string, tag = "3")]
226    pub hash: ::prost::alloc::string::String,
227    /// Unix epoch time when the block was mined
228    #[prost(uint32, tag = "4")]
229    pub time: u32,
230    /// sapling commitment tree state
231    #[prost(string, tag = "5")]
232    pub sapling_tree: ::prost::alloc::string::String,
233    /// orchard commitment tree state
234    #[prost(string, tag = "6")]
235    pub orchard_tree: ::prost::alloc::string::String,
236    /// ironwood commitment tree state
237    #[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    /// Index identifying where to start returning subtree roots
243    #[prost(uint32, tag = "1")]
244    pub start_index: u32,
245    /// Shielded protocol to return subtree roots for
246    #[prost(enumeration = "ShieldedProtocol", tag = "2")]
247    pub shielded_protocol: i32,
248    /// Maximum number of entries to return, or 0 for all entries.
249    #[prost(uint32, tag = "3")]
250    pub max_entries: u32,
251}
252#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
253pub struct SubtreeRoot {
254    /// The 32-byte Merkle root of the subtree.
255    #[prost(bytes = "vec", tag = "2")]
256    pub root_hash: ::prost::alloc::vec::Vec<u8>,
257    /// The hash of the block that completed this subtree.
258    #[prost(bytes = "vec", tag = "3")]
259    pub completing_block_hash: ::prost::alloc::vec::Vec<u8>,
260    /// The height of the block that completed this subtree in the main chain.
261    #[prost(uint64, tag = "4")]
262    pub completing_block_height: u64,
263}
264/// Results are sorted by height, which makes it easy to issue another
265/// request that picks up from where the previous left off.
266#[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    /// zero means unlimited
273    #[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/// An identifier for a Zcash value pool.
297#[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    /// String value of the enum field names used in the ProtoBuf definition.
308    ///
309    /// The values are not transformed in any way and thus are considered stable
310    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
311    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    /// Creates an enum from field names used in the ProtoBuf definition.
321    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    /// String value of the enum field names used in the ProtoBuf definition.
341    ///
342    /// The values are not transformed in any way and thus are considered stable
343    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
344    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    /// Creates an enum from field names used in the ProtoBuf definition.
352    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/// Generated client implementations.
362#[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        /// Compress requests with the given encoding.
412        ///
413        /// This requires the server to support it otherwise it might respond with an
414        /// error.
415        #[must_use]
416        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
417            self.inner = self.inner.send_compressed(encoding);
418            self
419        }
420        /// Enable decompressing responses.
421        #[must_use]
422        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
423            self.inner = self.inner.accept_compressed(encoding);
424            self
425        }
426        /// Limits the maximum size of a decoded message.
427        ///
428        /// Default: `4MB`
429        #[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        /// Limits the maximum size of an encoded message.
435        ///
436        /// Default: `usize::MAX`
437        #[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        /// Return the BlockID of the block at the tip of the best chain
443        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        /// Return the compact block corresponding to the given block identifier.
470        ///
471        /// The returned `CompactBlock` includes transaction data for all value
472        /// pools, including transparent inputs (`vin`) and outputs (`vout`). This
473        /// differs from `GetBlockRange`, which supports filtering by pool type and
474        /// defaults to returning only shielded (Sapling, Orchard, and Ironwood)
475        /// data. Clients that require only data for specific pools should use
476        /// `GetBlockRange` with the appropriate `poolTypes` set.
477        ///
478        /// Note: the single null-outpoint input for coinbase transactions is
479        /// omitted from the `vin` field of the corresponding `CompactTx`. See the
480        /// documentation of the `CompactTx` message for details.
481        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        /// Return a compact block containing only nullifier information for the
511        /// shielded pools (Sapling spend nullifiers, Orchard action nullifiers, and
512        /// Ironwood action nullifiers). Transparent transaction data, Sapling
513        /// outputs, full Orchard/Ironwood action data, and commitment tree sizes are
514        /// not included.
515        ///
516        /// Note: this method is deprecated; use `GetBlockRange` with the
517        /// appropriate `poolTypes` instead.
518        #[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        /// Return a list of consecutive compact blocks in the specified range,
549        /// which is inclusive of `range.end`.
550        ///
551        /// If range.start <= range.end, blocks are returned increasing height order;
552        /// otherwise blocks are returned in decreasing height order.
553        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        /// Return a stream of compact blocks for the specified range, where each
585        /// block contains only nullifier information for the shielded pools
586        /// (Sapling spend nullifiers, Orchard action nullifiers, and Ironwood action
587        /// nullifiers). Transparent transaction data, Sapling outputs, full
588        /// Orchard/Ironwood action data, and commitment tree sizes are not included.
589        /// Implementations MUST ignore any
590        /// `PoolType::TRANSPARENT` member of the `poolTypes` field of the request.
591        ///
592        /// Note: this method is deprecated; use `GetBlockRange` with the
593        /// appropriate `poolTypes` instead.
594        #[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        /// Return the requested full (not compact) transaction (as from zcashd)
627        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        /// Submit the given transaction to the Zcash network
654        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        /// Return RawTransactions that match the given transparent address filter.
681        ///
682        /// Note: This function is misnamed, it returns complete `RawTransaction` values, not TxIds.
683        /// NOTE: this method is deprecated, please use GetTaddressTransactions instead.
684        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        /// Return the transactions corresponding to the given t-address within the given block range.
714        /// Mempool transactions are not included in the results.
715        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        /// Returns a stream of the compact transaction representation for transactions
797        /// currently in the mempool. The results of this operation may be a few
798        /// seconds out of date. If the `exclude_txid_suffixes` list is empty,
799        /// return all transactions; otherwise return all *except* those in the
800        /// `exclude_txid_suffixes` list (if any); this allows the client to avoid
801        /// receiving transactions that it already has (from an earlier call to this
802        /// RPC). The transaction IDs in the `exclude_txid_suffixes` list can be
803        /// shortened to any number of bytes to make the request more
804        /// bandwidth-efficient; if two or more transactions in the mempool match a
805        /// txid suffix, none of the matching transactions are excluded. Txid
806        /// suffixes in the exclude list that don't match any transactions in the
807        /// mempool are ignored.
808        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        /// Return a stream of current Mempool transactions. This will keep the output stream open while
840        /// there are mempool transactions. It will close the returned stream when a new block is mined.
841        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        /// GetTreeState returns the note commitment tree state corresponding to the given block.
871        /// See section 3.7 of the Zcash protocol specification. It returns several other useful
872        /// values also (even though they can be obtained using GetBlock).
873        /// The block can be specified by either height or hash.
874        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        /// Returns a stream of information about roots of subtrees of the note commitment tree
927        /// for the specified shielded pool (Sapling, Orchard, or Ironwood).
928        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        /// Return information about this lightwalletd instance and the blockchain
1016        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        /// Testing-only, requires lightwalletd --ping-very-insecure (do not enable in production)
1043        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}