pub struct InxClient<T> { /* private fields */ }Implementations§
Source§impl<T> InxClient<T>where
T: GrpcService<UnsyncBoxBody<Bytes, Status>>,
<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::Error: Into<Box<dyn Error + Send + Sync>>,
<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody: Body<Data = Bytes> + Send + 'static,
<<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Send + Sync>> + Send,
impl<T> InxClient<T>where
T: GrpcService<UnsyncBoxBody<Bytes, Status>>,
<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::Error: Into<Box<dyn Error + Send + Sync>>,
<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody: Body<Data = Bytes> + Send + 'static,
<<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Send + Sync>> + Send,
pub fn new(inner: T) -> InxClient<T>
pub fn with_origin(inner: T, origin: Uri) -> InxClient<T>
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InxClient<InterceptedService<T, F>>where
F: Interceptor,
<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody: Default,
T: Service<Request<UnsyncBoxBody<Bytes, Status>>, Response = Response<<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody>>,
<T as Service<Request<UnsyncBoxBody<Bytes, Status>>>>::Error: Into<Box<dyn Error + Send + Sync>> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> InxClient<T>
pub fn send_compressed(self, encoding: CompressionEncoding) -> InxClient<T>
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> InxClient<T>
pub fn accept_compressed(self, encoding: CompressionEncoding) -> InxClient<T>
Enable decompressing responses.
Sourcepub async fn read_node_status(
&mut self,
request: impl IntoRequest<NoParams>,
) -> Result<Response<NodeStatus>, Status>
pub async fn read_node_status( &mut self, request: impl IntoRequest<NoParams>, ) -> Result<Response<NodeStatus>, Status>
Node
pub async fn listen_to_node_status( &mut self, request: impl IntoRequest<NodeStatusRequest>, ) -> Result<Response<Streaming<NodeStatus>>, Status>
pub async fn read_node_configuration( &mut self, request: impl IntoRequest<NoParams>, ) -> Result<Response<NodeConfiguration>, Status>
pub async fn read_protocol_parameters( &mut self, request: impl IntoRequest<MilestoneRequest>, ) -> Result<Response<RawProtocolParameters>, Status>
Sourcepub async fn read_milestone(
&mut self,
request: impl IntoRequest<MilestoneRequest>,
) -> Result<Response<Milestone>, Status>
pub async fn read_milestone( &mut self, request: impl IntoRequest<MilestoneRequest>, ) -> Result<Response<Milestone>, Status>
Milestones
pub async fn listen_to_latest_milestones( &mut self, request: impl IntoRequest<NoParams>, ) -> Result<Response<Streaming<Milestone>>, Status>
pub async fn listen_to_confirmed_milestones( &mut self, request: impl IntoRequest<MilestoneRangeRequest>, ) -> Result<Response<Streaming<MilestoneAndProtocolParameters>>, Status>
pub async fn compute_white_flag( &mut self, request: impl IntoRequest<WhiteFlagRequest>, ) -> Result<Response<WhiteFlagResponse>, Status>
pub async fn read_milestone_cone( &mut self, request: impl IntoRequest<MilestoneRequest>, ) -> Result<Response<Streaming<BlockWithMetadata>>, Status>
pub async fn read_milestone_cone_metadata( &mut self, request: impl IntoRequest<MilestoneRequest>, ) -> Result<Response<Streaming<BlockMetadata>>, Status>
Sourcepub async fn listen_to_blocks(
&mut self,
request: impl IntoRequest<NoParams>,
) -> Result<Response<Streaming<Block>>, Status>
pub async fn listen_to_blocks( &mut self, request: impl IntoRequest<NoParams>, ) -> Result<Response<Streaming<Block>>, Status>
Blocks
pub async fn listen_to_solid_blocks( &mut self, request: impl IntoRequest<NoParams>, ) -> Result<Response<Streaming<BlockMetadata>>, Status>
pub async fn listen_to_referenced_blocks( &mut self, request: impl IntoRequest<NoParams>, ) -> Result<Response<Streaming<BlockMetadata>>, Status>
pub async fn submit_block( &mut self, request: impl IntoRequest<RawBlock>, ) -> Result<Response<BlockId>, Status>
pub async fn read_block( &mut self, request: impl IntoRequest<BlockId>, ) -> Result<Response<RawBlock>, Status>
pub async fn read_block_metadata( &mut self, request: impl IntoRequest<BlockId>, ) -> Result<Response<BlockMetadata>, Status>
Sourcepub async fn request_tips(
&mut self,
request: impl IntoRequest<TipsRequest>,
) -> Result<Response<TipsResponse>, Status>
pub async fn request_tips( &mut self, request: impl IntoRequest<TipsRequest>, ) -> Result<Response<TipsResponse>, Status>
Tips
pub async fn listen_to_tips_metrics( &mut self, request: impl IntoRequest<TipsMetricRequest>, ) -> Result<Response<Streaming<TipsMetric>>, Status>
pub async fn listen_to_tip_score_updates( &mut self, request: impl IntoRequest<NoParams>, ) -> Result<Response<Streaming<BlockMetadata>>, Status>
Sourcepub async fn read_unspent_outputs(
&mut self,
request: impl IntoRequest<NoParams>,
) -> Result<Response<Streaming<UnspentOutput>>, Status>
pub async fn read_unspent_outputs( &mut self, request: impl IntoRequest<NoParams>, ) -> Result<Response<Streaming<UnspentOutput>>, Status>
UTXO
Sourcepub async fn listen_to_ledger_updates(
&mut self,
request: impl IntoRequest<MilestoneRangeRequest>,
) -> Result<Response<Streaming<LedgerUpdate>>, Status>
pub async fn listen_to_ledger_updates( &mut self, request: impl IntoRequest<MilestoneRangeRequest>, ) -> Result<Response<Streaming<LedgerUpdate>>, Status>
A stream that yields updates to the ledger. A LedgerUpdate represents a batch to be applied to the ledger.
It first sends a BEGIN, then all the consumed outputs, then all the created outputs and finally an END.
BEGIN and END will also be sent for milestones that did not mutate the ledger.
The counts in the batch markers can be used to sanity check that everything arrived and to pre-allocate space if needed.
pub async fn listen_to_treasury_updates( &mut self, request: impl IntoRequest<MilestoneRangeRequest>, ) -> Result<Response<Streaming<TreasuryUpdate>>, Status>
pub async fn read_output( &mut self, request: impl IntoRequest<OutputId>, ) -> Result<Response<OutputResponse>, Status>
pub async fn listen_to_migration_receipts( &mut self, request: impl IntoRequest<NoParams>, ) -> Result<Response<Streaming<RawReceipt>>, Status>
Sourcepub async fn register_api_route(
&mut self,
request: impl IntoRequest<ApiRouteRequest>,
) -> Result<Response<NoParams>, Status>
pub async fn register_api_route( &mut self, request: impl IntoRequest<ApiRouteRequest>, ) -> Result<Response<NoParams>, Status>
REST API
pub async fn unregister_api_route( &mut self, request: impl IntoRequest<ApiRouteRequest>, ) -> Result<Response<NoParams>, Status>
pub async fn perform_api_request( &mut self, request: impl IntoRequest<ApiRequest>, ) -> Result<Response<ApiResponse>, Status>
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for InxClient<T>
impl<T> RefUnwindSafe for InxClient<T>where
T: RefUnwindSafe,
impl<T> Send for InxClient<T>where
T: Send,
impl<T> Sync for InxClient<T>where
T: Sync,
impl<T> Unpin for InxClient<T>where
T: Unpin,
impl<T> UnwindSafe for InxClient<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request