pub trait CompactTxStreamer: Send + Sync + 'static {
type GetBlockRangeStream: Stream<Item = Result<CompactBlock, Status>> + Send + 'static;
type GetTaddressTxidsStream: Stream<Item = Result<RawTransaction, Status>> + Send + 'static;
type GetMempoolTxStream: Stream<Item = Result<CompactTx, Status>> + Send + 'static;
type GetMempoolStreamStream: Stream<Item = Result<RawTransaction, Status>> + Send + 'static;
type GetAddressUtxosStreamStream: Stream<Item = Result<GetAddressUtxosReply, Status>> + Send + 'static;
Show 15 methods
fn get_latest_block<'life0, 'async_trait>(
&'life0 self,
request: Request<ChainSpec>
) -> Pin<Box<dyn Future<Output = Result<Response<BlockId>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_block<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockId>
) -> Pin<Box<dyn Future<Output = Result<Response<CompactBlock>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_block_range<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockRange>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetBlockRangeStream>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_transaction<'life0, 'async_trait>(
&'life0 self,
request: Request<TxFilter>
) -> Pin<Box<dyn Future<Output = Result<Response<RawTransaction>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn send_transaction<'life0, 'async_trait>(
&'life0 self,
request: Request<RawTransaction>
) -> Pin<Box<dyn Future<Output = Result<Response<SendResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_taddress_txids<'life0, 'async_trait>(
&'life0 self,
request: Request<TransparentAddressBlockFilter>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetTaddressTxidsStream>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_taddress_balance<'life0, 'async_trait>(
&'life0 self,
request: Request<AddressList>
) -> Pin<Box<dyn Future<Output = Result<Response<Balance>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_taddress_balance_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<Address>>
) -> Pin<Box<dyn Future<Output = Result<Response<Balance>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_mempool_tx<'life0, 'async_trait>(
&'life0 self,
request: Request<Exclude>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetMempoolTxStream>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_mempool_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetMempoolStreamStream>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_tree_state<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockId>
) -> Pin<Box<dyn Future<Output = Result<Response<TreeState>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_address_utxos<'life0, 'async_trait>(
&'life0 self,
request: Request<GetAddressUtxosArg>
) -> Pin<Box<dyn Future<Output = Result<Response<GetAddressUtxosReplyList>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_address_utxos_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<GetAddressUtxosArg>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetAddressUtxosStreamStream>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_lightd_info<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>
) -> Pin<Box<dyn Future<Output = Result<Response<LightdInfo>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn ping<'life0, 'async_trait>(
&'life0 self,
request: Request<Duration>
) -> Pin<Box<dyn Future<Output = Result<Response<PingResponse>, Status>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with CompactTxStreamerServer.
Required Associated Types
type GetBlockRangeStream: Stream<Item = Result<CompactBlock, Status>> + Send + 'static
type GetBlockRangeStream: Stream<Item = Result<CompactBlock, Status>> + Send + 'static
Server streaming response type for the GetBlockRange method.
type GetTaddressTxidsStream: Stream<Item = Result<RawTransaction, Status>> + Send + 'static
type GetTaddressTxidsStream: Stream<Item = Result<RawTransaction, Status>> + Send + 'static
Server streaming response type for the GetTaddressTxids method.
Server streaming response type for the GetMempoolTx method.
type GetMempoolStreamStream: Stream<Item = Result<RawTransaction, Status>> + Send + 'static
type GetMempoolStreamStream: Stream<Item = Result<RawTransaction, Status>> + Send + 'static
Server streaming response type for the GetMempoolStream method.
type GetAddressUtxosStreamStream: Stream<Item = Result<GetAddressUtxosReply, Status>> + Send + 'static
type GetAddressUtxosStreamStream: Stream<Item = Result<GetAddressUtxosReply, Status>> + Send + 'static
Server streaming response type for the GetAddressUtxosStream method.
Required Methods
Return the height of the tip of the best chain
Return the compact block corresponding to the given block identifier
fn get_block_range<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockRange>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetBlockRangeStream>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_range<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockRange>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetBlockRangeStream>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Return a list of consecutive compact blocks
Return the requested full (not compact) transaction (as from zcashd)
fn send_transaction<'life0, 'async_trait>(
&'life0 self,
request: Request<RawTransaction>
) -> Pin<Box<dyn Future<Output = Result<Response<SendResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn send_transaction<'life0, 'async_trait>(
&'life0 self,
request: Request<RawTransaction>
) -> Pin<Box<dyn Future<Output = Result<Response<SendResponse>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Submit the given transaction to the Zcash network
fn get_taddress_txids<'life0, 'async_trait>(
&'life0 self,
request: Request<TransparentAddressBlockFilter>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetTaddressTxidsStream>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_taddress_txids<'life0, 'async_trait>(
&'life0 self,
request: Request<TransparentAddressBlockFilter>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetTaddressTxidsStream>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Return the txids corresponding to the given t-address within the given block range
fn get_taddress_balance<'life0, 'async_trait>(
&'life0 self,
request: Request<AddressList>
) -> Pin<Box<dyn Future<Output = Result<Response<Balance>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_taddress_balance_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<Address>>
) -> Pin<Box<dyn Future<Output = Result<Response<Balance>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Return the compact transactions currently in the mempool; the results can be a few seconds out of date. If the Exclude list is empty, return all transactions; otherwise return all except those in the Exclude list (if any); this allows the client to avoid receiving transactions that it already has (from an earlier call to this rpc). The transaction IDs in the Exclude list can be shortened to any number of bytes to make the request more bandwidth-efficient; if two or more transactions in the mempool match a shortened txid, they are all sent (none is excluded). Transactions in the exclude list that don’t exist in the mempool are ignored.
Return a stream of current Mempool transactions. This will keep the output stream open while there are mempool transactions. It will close the returned stream when a new block is mined.
GetTreeState returns the note commitment tree state corresponding to the given block. See section 3.7 of the Zcash protocol specification. It returns several other useful values also (even though they can be obtained using GetBlock). The block can be specified by either height or hash.
fn get_address_utxos<'life0, 'async_trait>(
&'life0 self,
request: Request<GetAddressUtxosArg>
) -> Pin<Box<dyn Future<Output = Result<Response<GetAddressUtxosReplyList>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_address_utxos_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<GetAddressUtxosArg>
) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetAddressUtxosStreamStream>, Status>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Return information about this lightwalletd instance and the blockchain
Testing-only, requires lightwalletd –ping-very-insecure (do not enable in production)