pub trait CompactTxStreamer: Send + Sync + 'static {
    type GetBlockRangeStream: Stream<Item = Result<CompactBlock, Status>> + Send + 'static;
    type GetBlockRangeNullifiersStream: 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 GetSubtreeRootsStream: Stream<Item = Result<SubtreeRoot, Status>> + Send + 'static;
    type GetAddressUtxosStreamStream: Stream<Item = Result<GetAddressUtxosReply, Status>> + Send + 'static;

Show 19 methods // Required 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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: 'async_trait; fn get_block_nullifiers<'life0, 'async_trait>( &'life0 self, request: Request<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<Response<CompactBlock>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: 'async_trait; fn get_block_range_nullifiers<'life0, 'async_trait>( &'life0 self, request: Request<BlockRange>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetBlockRangeNullifiersStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: 'async_trait; fn get_latest_tree_state<'life0, 'async_trait>( &'life0 self, request: Request<Empty>, ) -> Pin<Box<dyn Future<Output = Result<Response<TreeState>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_subtree_roots<'life0, 'async_trait>( &'life0 self, request: Request<GetSubtreeRootsArg>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetSubtreeRootsStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: '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 Self: 'async_trait, 'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with CompactTxStreamerServer.

Required Associated Types§

source

type GetBlockRangeStream: Stream<Item = Result<CompactBlock, Status>> + Send + 'static

Server streaming response type for the GetBlockRange method.

source

type GetBlockRangeNullifiersStream: Stream<Item = Result<CompactBlock, Status>> + Send + 'static

Server streaming response type for the GetBlockRangeNullifiers method.

source

type GetTaddressTxidsStream: Stream<Item = Result<RawTransaction, Status>> + Send + 'static

Server streaming response type for the GetTaddressTxids method.

source

type GetMempoolTxStream: Stream<Item = Result<CompactTx, Status>> + Send + 'static

Server streaming response type for the GetMempoolTx method.

source

type GetMempoolStreamStream: Stream<Item = Result<RawTransaction, Status>> + Send + 'static

Server streaming response type for the GetMempoolStream method.

source

type GetSubtreeRootsStream: Stream<Item = Result<SubtreeRoot, Status>> + Send + 'static

Server streaming response type for the GetSubtreeRoots method.

source

type GetAddressUtxosStreamStream: Stream<Item = Result<GetAddressUtxosReply, Status>> + Send + 'static

Server streaming response type for the GetAddressUtxosStream method.

Required Methods§

source

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 Self: 'async_trait, 'life0: 'async_trait,

Return the height of the tip of the best chain

source

fn get_block<'life0, 'async_trait>( &'life0 self, request: Request<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<Response<CompactBlock>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return the compact block corresponding to the given block identifier

source

fn get_block_nullifiers<'life0, 'async_trait>( &'life0 self, request: Request<BlockId>, ) -> Pin<Box<dyn Future<Output = Result<Response<CompactBlock>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Same as GetBlock except actions contain only nullifiers

source

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 Self: 'async_trait, 'life0: 'async_trait,

Return a list of consecutive compact blocks

source

fn get_block_range_nullifiers<'life0, 'async_trait>( &'life0 self, request: Request<BlockRange>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetBlockRangeNullifiersStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Same as GetBlockRange except actions contain only nullifiers

source

fn get_transaction<'life0, 'async_trait>( &'life0 self, request: Request<TxFilter>, ) -> Pin<Box<dyn Future<Output = Result<Response<RawTransaction>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return the requested full (not compact) transaction (as from zcashd)

source

fn send_transaction<'life0, 'async_trait>( &'life0 self, request: Request<RawTransaction>, ) -> Pin<Box<dyn Future<Output = Result<Response<SendResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Submit the given transaction to the Zcash network

source

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 Self: 'async_trait, 'life0: 'async_trait,

Return the txids corresponding to the given t-address within the given block range

source

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 Self: 'async_trait, 'life0: 'async_trait,

source

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 Self: 'async_trait, 'life0: 'async_trait,

source

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 Self: 'async_trait, 'life0: '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.

source

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 Self: 'async_trait, 'life0: 'async_trait,

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.

source

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 Self: 'async_trait, 'life0: 'async_trait,

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.

source

fn get_latest_tree_state<'life0, 'async_trait>( &'life0 self, request: Request<Empty>, ) -> Pin<Box<dyn Future<Output = Result<Response<TreeState>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_subtree_roots<'life0, 'async_trait>( &'life0 self, request: Request<GetSubtreeRootsArg>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::GetSubtreeRootsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns a stream of information about roots of subtrees of the Sapling and Orchard note commitment trees.

source

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 Self: 'async_trait, 'life0: 'async_trait,

source

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 Self: 'async_trait, 'life0: 'async_trait,

source

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 Self: 'async_trait, 'life0: 'async_trait,

Return information about this lightwalletd instance and the blockchain

source

fn ping<'life0, 'async_trait>( &'life0 self, request: Request<Duration>, ) -> Pin<Box<dyn Future<Output = Result<Response<PingResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Testing-only, requires lightwalletd –ping-very-insecure (do not enable in production)

Implementors§