#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChainMetadata {
#[prost(uint32, tag = "1")]
pub sapling_commitment_tree_size: u32,
#[prost(uint32, tag = "2")]
pub orchard_commitment_tree_size: u32,
#[prost(uint32, tag = "3")]
pub ironwood_commitment_tree_size: u32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactBlock {
#[prost(uint64, tag = "2")]
pub height: u64,
#[prost(bytes = "vec", tag = "3")]
pub hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "4")]
pub prev_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "5")]
pub time: u32,
#[prost(bytes = "vec", tag = "6")]
pub header: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "7")]
pub vtx: ::prost::alloc::vec::Vec<CompactTx>,
#[prost(message, optional, tag = "8")]
pub chain_metadata: ::core::option::Option<ChainMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompactTx {
#[prost(uint64, tag = "1")]
pub index: u64,
#[prost(bytes = "vec", tag = "2")]
pub txid: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "3")]
pub fee: u32,
#[prost(message, repeated, tag = "4")]
pub spends: ::prost::alloc::vec::Vec<CompactSaplingSpend>,
#[prost(message, repeated, tag = "5")]
pub outputs: ::prost::alloc::vec::Vec<CompactSaplingOutput>,
#[prost(message, repeated, tag = "6")]
pub actions: ::prost::alloc::vec::Vec<CompactOrchardAction>,
#[prost(message, repeated, tag = "9")]
pub ironwood_actions: ::prost::alloc::vec::Vec<CompactOrchardAction>,
#[prost(message, repeated, tag = "7")]
pub vin: ::prost::alloc::vec::Vec<CompactTxIn>,
#[prost(message, repeated, tag = "8")]
pub vout: ::prost::alloc::vec::Vec<TxOut>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CompactTxIn {
#[prost(bytes = "vec", tag = "1")]
pub prevout_txid: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "2")]
pub prevout_index: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TxOut {
#[prost(uint64, tag = "1")]
pub value: u64,
#[prost(bytes = "vec", tag = "2")]
pub script_pub_key: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CompactSaplingSpend {
#[prost(bytes = "vec", tag = "1")]
pub nf: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CompactSaplingOutput {
#[prost(bytes = "vec", tag = "1")]
pub cmu: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub ephemeral_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CompactOrchardAction {
#[prost(bytes = "vec", tag = "1")]
pub nullifier: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
pub cmx: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub ephemeral_key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "4")]
pub ciphertext: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BlockId {
#[prost(uint64, tag = "1")]
pub height: u64,
#[prost(bytes = "vec", tag = "2")]
pub hash: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BlockRange {
#[prost(message, optional, tag = "1")]
pub start: ::core::option::Option<BlockId>,
#[prost(message, optional, tag = "2")]
pub end: ::core::option::Option<BlockId>,
#[prost(enumeration = "PoolType", repeated, tag = "3")]
pub pool_types: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TxFilter {
#[prost(message, optional, tag = "1")]
pub block: ::core::option::Option<BlockId>,
#[prost(uint64, tag = "2")]
pub index: u64,
#[prost(bytes = "vec", tag = "3")]
pub hash: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RawTransaction {
#[prost(bytes = "vec", tag = "1")]
pub data: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "2")]
pub height: u64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SendResponse {
#[prost(int32, tag = "1")]
pub error_code: i32,
#[prost(string, tag = "2")]
pub error_message: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChainSpec {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Empty {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LightdInfo {
#[prost(string, tag = "1")]
pub version: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub vendor: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub taddr_support: bool,
#[prost(string, tag = "4")]
pub chain_name: ::prost::alloc::string::String,
#[prost(uint64, tag = "5")]
pub sapling_activation_height: u64,
#[prost(string, tag = "6")]
pub consensus_branch_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "7")]
pub block_height: u64,
#[prost(string, tag = "8")]
pub git_commit: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub branch: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub build_date: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub build_user: ::prost::alloc::string::String,
#[prost(uint64, tag = "12")]
pub estimated_height: u64,
#[prost(string, tag = "13")]
pub zcashd_build: ::prost::alloc::string::String,
#[prost(string, tag = "14")]
pub zcashd_subversion: ::prost::alloc::string::String,
#[prost(string, tag = "15")]
pub donation_address: ::prost::alloc::string::String,
#[prost(string, tag = "16")]
pub upgrade_name: ::prost::alloc::string::String,
#[prost(uint64, tag = "17")]
pub upgrade_height: u64,
#[prost(string, tag = "18")]
pub lightwallet_protocol_version: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TransparentAddressBlockFilter {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub range: ::core::option::Option<BlockRange>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Duration {
#[prost(int64, tag = "1")]
pub interval_us: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PingResponse {
#[prost(int64, tag = "1")]
pub entry: i64,
#[prost(int64, tag = "2")]
pub exit: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Address {
#[prost(string, tag = "1")]
pub address: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AddressList {
#[prost(string, repeated, tag = "1")]
pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Balance {
#[prost(int64, tag = "1")]
pub value_zat: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetMempoolTxRequest {
#[prost(bytes = "vec", repeated, tag = "1")]
pub exclude_txid_suffixes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(enumeration = "PoolType", repeated, tag = "3")]
pub pool_types: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TreeState {
#[prost(string, tag = "1")]
pub network: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub height: u64,
#[prost(string, tag = "3")]
pub hash: ::prost::alloc::string::String,
#[prost(uint32, tag = "4")]
pub time: u32,
#[prost(string, tag = "5")]
pub sapling_tree: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub orchard_tree: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub ironwood_tree: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSubtreeRootsArg {
#[prost(uint32, tag = "1")]
pub start_index: u32,
#[prost(enumeration = "ShieldedProtocol", tag = "2")]
pub shielded_protocol: i32,
#[prost(uint32, tag = "3")]
pub max_entries: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubtreeRoot {
#[prost(bytes = "vec", tag = "2")]
pub root_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub completing_block_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(uint64, tag = "4")]
pub completing_block_height: u64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAddressUtxosArg {
#[prost(string, repeated, tag = "1")]
pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint64, tag = "2")]
pub start_height: u64,
#[prost(uint32, tag = "3")]
pub max_entries: u32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAddressUtxosReply {
#[prost(string, tag = "6")]
pub address: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "1")]
pub txid: ::prost::alloc::vec::Vec<u8>,
#[prost(int32, tag = "2")]
pub index: i32,
#[prost(bytes = "vec", tag = "3")]
pub script: ::prost::alloc::vec::Vec<u8>,
#[prost(int64, tag = "4")]
pub value_zat: i64,
#[prost(uint64, tag = "5")]
pub height: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAddressUtxosReplyList {
#[prost(message, repeated, tag = "1")]
pub address_utxos: ::prost::alloc::vec::Vec<GetAddressUtxosReply>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PoolType {
Invalid = 0,
Transparent = 1,
Sapling = 2,
Orchard = 3,
Ironwood = 4,
}
impl PoolType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Invalid => "POOL_TYPE_INVALID",
Self::Transparent => "TRANSPARENT",
Self::Sapling => "SAPLING",
Self::Orchard => "ORCHARD",
Self::Ironwood => "IRONWOOD",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"POOL_TYPE_INVALID" => Some(Self::Invalid),
"TRANSPARENT" => Some(Self::Transparent),
"SAPLING" => Some(Self::Sapling),
"ORCHARD" => Some(Self::Orchard),
"IRONWOOD" => Some(Self::Ironwood),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ShieldedProtocol {
Sapling = 0,
Orchard = 1,
Ironwood = 2,
}
impl ShieldedProtocol {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Sapling => "sapling",
Self::Orchard => "orchard",
Self::Ironwood => "ironwood",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"sapling" => Some(Self::Sapling),
"orchard" => Some(Self::Orchard),
"ironwood" => Some(Self::Ironwood),
_ => None,
}
}
}
pub mod compact_tx_streamer_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::wildcard_imports, clippy::let_unit_value)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct CompactTxStreamerClient<T> {
inner: tonic::client::Grpc<T>,
}
impl CompactTxStreamerClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> CompactTxStreamerClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(inner: T, interceptor: F) -> CompactTxStreamerClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::Body>>>::Error:
Into<StdError> + std::marker::Send + std::marker::Sync,
{
CompactTxStreamerClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get_latest_block(
&mut self,
request: impl tonic::IntoRequest<super::ChainSpec>,
) -> std::result::Result<tonic::Response<super::BlockId>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLatestBlock");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetLatestBlock"));
self.inner.unary(req, path, codec).await
}
pub async fn get_block(
&mut self,
request: impl tonic::IntoRequest<super::BlockId>,
) -> std::result::Result<tonic::Response<super::CompactBlock>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlock");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetBlock"));
self.inner.unary(req, path, codec).await
}
#[deprecated]
pub async fn get_block_nullifiers(
&mut self,
request: impl tonic::IntoRequest<super::BlockId>,
) -> std::result::Result<tonic::Response<super::CompactBlock>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockNullifiers");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetBlockNullifiers"));
self.inner.unary(req, path, codec).await
}
pub async fn get_block_range(
&mut self,
request: impl tonic::IntoRequest<super::BlockRange>,
) -> std::result::Result<tonic::Response<tonic::codec::Streaming<super::CompactBlock>>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockRange");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetBlockRange"));
self.inner.server_streaming(req, path, codec).await
}
#[deprecated]
pub async fn get_block_range_nullifiers(
&mut self,
request: impl tonic::IntoRequest<super::BlockRange>,
) -> std::result::Result<tonic::Response<tonic::codec::Streaming<super::CompactBlock>>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockRangeNullifiers",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetBlockRangeNullifiers"));
self.inner.server_streaming(req, path, codec).await
}
pub async fn get_transaction(
&mut self,
request: impl tonic::IntoRequest<super::TxFilter>,
) -> std::result::Result<tonic::Response<super::RawTransaction>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTransaction");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetTransaction"));
self.inner.unary(req, path, codec).await
}
pub async fn send_transaction(
&mut self,
request: impl tonic::IntoRequest<super::RawTransaction>,
) -> std::result::Result<tonic::Response<super::SendResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/SendTransaction");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "SendTransaction"));
self.inner.unary(req, path, codec).await
}
pub async fn get_taddress_txids(
&mut self,
request: impl tonic::IntoRequest<super::TransparentAddressBlockFilter>,
) -> std::result::Result<tonic::Response<tonic::codec::Streaming<super::RawTransaction>>, tonic::Status>
{
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTaddressTxids");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetTaddressTxids"));
self.inner.server_streaming(req, path, codec).await
}
pub async fn get_taddress_transactions(
&mut self,
request: impl tonic::IntoRequest<super::TransparentAddressBlockFilter>,
) -> std::result::Result<tonic::Response<tonic::codec::Streaming<super::RawTransaction>>, tonic::Status>
{
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTaddressTransactions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetTaddressTransactions"));
self.inner.server_streaming(req, path, codec).await
}
pub async fn get_taddress_balance(
&mut self,
request: impl tonic::IntoRequest<super::AddressList>,
) -> std::result::Result<tonic::Response<super::Balance>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTaddressBalance");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetTaddressBalance"));
self.inner.unary(req, path, codec).await
}
pub async fn get_taddress_balance_stream(
&mut self,
request: impl tonic::IntoStreamingRequest<Message = super::Address>,
) -> std::result::Result<tonic::Response<super::Balance>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTaddressBalanceStream",
);
let mut req = request.into_streaming_request();
req.extensions_mut()
.insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetTaddressBalanceStream"));
self.inner.client_streaming(req, path, codec).await
}
pub async fn get_mempool_tx(
&mut self,
request: impl tonic::IntoRequest<super::GetMempoolTxRequest>,
) -> std::result::Result<tonic::Response<tonic::codec::Streaming<super::CompactTx>>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetMempoolTx");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetMempoolTx"));
self.inner.server_streaming(req, path, codec).await
}
pub async fn get_mempool_stream(
&mut self,
request: impl tonic::IntoRequest<super::Empty>,
) -> std::result::Result<tonic::Response<tonic::codec::Streaming<super::RawTransaction>>, tonic::Status>
{
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetMempoolStream");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetMempoolStream"));
self.inner.server_streaming(req, path, codec).await
}
pub async fn get_tree_state(
&mut self,
request: impl tonic::IntoRequest<super::BlockId>,
) -> std::result::Result<tonic::Response<super::TreeState>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTreeState");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetTreeState"));
self.inner.unary(req, path, codec).await
}
pub async fn get_latest_tree_state(
&mut self,
request: impl tonic::IntoRequest<super::Empty>,
) -> std::result::Result<tonic::Response<super::TreeState>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLatestTreeState");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetLatestTreeState"));
self.inner.unary(req, path, codec).await
}
pub async fn get_subtree_roots(
&mut self,
request: impl tonic::IntoRequest<super::GetSubtreeRootsArg>,
) -> std::result::Result<tonic::Response<tonic::codec::Streaming<super::SubtreeRoot>>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetSubtreeRoots");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetSubtreeRoots"));
self.inner.server_streaming(req, path, codec).await
}
pub async fn get_address_utxos(
&mut self,
request: impl tonic::IntoRequest<super::GetAddressUtxosArg>,
) -> std::result::Result<tonic::Response<super::GetAddressUtxosReplyList>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetAddressUtxos");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetAddressUtxos"));
self.inner.unary(req, path, codec).await
}
pub async fn get_address_utxos_stream(
&mut self,
request: impl tonic::IntoRequest<super::GetAddressUtxosArg>,
) -> std::result::Result<tonic::Response<tonic::codec::Streaming<super::GetAddressUtxosReply>>, tonic::Status>
{
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path =
http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetAddressUtxosStream");
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetAddressUtxosStream"));
self.inner.server_streaming(req, path, codec).await
}
pub async fn get_lightd_info(
&mut self,
request: impl tonic::IntoRequest<super::Empty>,
) -> std::result::Result<tonic::Response<super::LightdInfo>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLightdInfo");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "GetLightdInfo"));
self.inner.unary(req, path, codec).await
}
pub async fn ping(
&mut self,
request: impl tonic::IntoRequest<super::Duration>,
) -> std::result::Result<tonic::Response<super::PingResponse>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| tonic::Status::unknown(format!("Service was not ready: {}", e.into())))?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static("/cash.z.wallet.sdk.rpc.CompactTxStreamer/Ping");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new("cash.z.wallet.sdk.rpc.CompactTxStreamer", "Ping"));
self.inner.unary(req, path, codec).await
}
}
}