pub struct XandApiClient<T> { /* private fields */ }
Implementations§
Source§impl XandApiClient<Channel>
impl XandApiClient<Channel>
Source§impl<T> XandApiClient<T>where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> XandApiClient<T>where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> XandApiClient<InterceptedService<T, F>>where
F: Interceptor,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_gzip(self) -> Self
pub fn send_gzip(self) -> Self
Compress requests with gzip
.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_gzip(self) -> Self
pub fn accept_gzip(self) -> Self
Enable decompressing responses with gzip
.
Sourcepub async fn submit_transaction(
&mut self,
request: impl IntoRequest<UserTransaction>,
) -> Result<Response<Streaming<TransactionUpdate>>, Status>
pub async fn submit_transaction( &mut self, request: impl IntoRequest<UserTransaction>, ) -> Result<Response<Streaming<TransactionUpdate>>, Status>
For submitting transactions to the network. See the UserTransaction
type for details
about which transactions may be submitted.
Sourcepub async fn propose_action(
&mut self,
request: impl IntoRequest<SubmitProposal>,
) -> Result<Response<Streaming<TransactionUpdate>>, Status>
pub async fn propose_action( &mut self, request: impl IntoRequest<SubmitProposal>, ) -> Result<Response<Streaming<TransactionUpdate>>, Status>
For proposing administrative transactions to the network. See the AdministrativeTransaction
type for details about which transactions may be submitted.
Sourcepub async fn vote_on_proposal(
&mut self,
request: impl IntoRequest<VotingTransaction>,
) -> Result<Response<Streaming<TransactionUpdate>>, Status>
pub async fn vote_on_proposal( &mut self, request: impl IntoRequest<VotingTransaction>, ) -> Result<Response<Streaming<TransactionUpdate>>, Status>
For voting on outstanding proposals. See the VotingTransactions
type for details about
which transactions may be submitted.
Sourcepub async fn get_proposal(
&mut self,
request: impl IntoRequest<GetProposalReq>,
) -> Result<Response<Proposal>, Status>
pub async fn get_proposal( &mut self, request: impl IntoRequest<GetProposalReq>, ) -> Result<Response<Proposal>, Status>
For querying data on specific Proposal by id
Sourcepub async fn get_all_proposals(
&mut self,
request: impl IntoRequest<GetAllProposalsReq>,
) -> Result<Response<Proposals>, Status>
pub async fn get_all_proposals( &mut self, request: impl IntoRequest<GetAllProposalsReq>, ) -> Result<Response<Proposals>, Status>
For querying a list of all non-expired Proposals
pub async fn get_trustee( &mut self, request: impl IntoRequest<GetTrusteeReq>, ) -> Result<Response<TrusteeData>, Status>
pub async fn get_limited_agent( &mut self, request: impl IntoRequest<GetLimitedAgentReq>, ) -> Result<Response<LimitedAgentData>, Status>
Sourcepub async fn get_transaction_details(
&mut self,
request: impl IntoRequest<TransactionDetailsRequest>,
) -> Result<Response<FetchedTransaction>, Status>
pub async fn get_transaction_details( &mut self, request: impl IntoRequest<TransactionDetailsRequest>, ) -> Result<Response<FetchedTransaction>, Status>
To request the details (including its status) of a transaction by ID
Sourcepub async fn get_transaction_history(
&mut self,
request: impl IntoRequest<TransactionHistoryRequest>,
) -> Result<Response<TransactionHistory>, Status>
pub async fn get_transaction_history( &mut self, request: impl IntoRequest<TransactionHistoryRequest>, ) -> Result<Response<TransactionHistory>, Status>
For requesting historical transaction data. Only returns transactions which have been finalized on the chain.
TODO – A request with no addresses results in every transaction in the cache being returned, without meaningful order. We need to make changes to the backend.
Sourcepub async fn get_address_balance(
&mut self,
request: impl IntoRequest<AddressBalanceRequest>,
) -> Result<Response<AddressBalance>, Status>
pub async fn get_address_balance( &mut self, request: impl IntoRequest<AddressBalanceRequest>, ) -> Result<Response<AddressBalance>, Status>
For requesting the balance an address has
Sourcepub async fn get_total_issuance(
&mut self,
request: impl IntoRequest<TotalIssuanceRequest>,
) -> Result<Response<TotalIssuanceResponse>, Status>
pub async fn get_total_issuance( &mut self, request: impl IntoRequest<TotalIssuanceRequest>, ) -> Result<Response<TotalIssuanceResponse>, Status>
For requesting the total amount of claims on the network
Sourcepub async fn get_address_transactions(
&mut self,
request: impl IntoRequest<AddressTransactionHistoryRequest>,
) -> Result<Response<TransactionHistory>, Status>
pub async fn get_address_transactions( &mut self, request: impl IntoRequest<AddressTransactionHistoryRequest>, ) -> Result<Response<TransactionHistory>, Status>
For requesting transactions that affect a given address
Sourcepub async fn get_pending_create_requests(
&mut self,
request: impl IntoRequest<PendingCreateRequestsPagination>,
) -> Result<Response<PendingCreateRequests>, Status>
pub async fn get_pending_create_requests( &mut self, request: impl IntoRequest<PendingCreateRequestsPagination>, ) -> Result<Response<PendingCreateRequests>, Status>
For enumerating the currently outstanding create requests
Sourcepub async fn get_pending_redeem_requests(
&mut self,
request: impl IntoRequest<PendingRedeemRequestsPagination>,
) -> Result<Response<PendingRedeemRequests>, Status>
pub async fn get_pending_redeem_requests( &mut self, request: impl IntoRequest<PendingRedeemRequestsPagination>, ) -> Result<Response<PendingRedeemRequests>, Status>
For enumerating the currently outstanding redeem requests
Sourcepub async fn get_allowlist(
&mut self,
request: impl IntoRequest<AllowlistRequest>,
) -> Result<Response<Allowlist>, Status>
pub async fn get_allowlist( &mut self, request: impl IntoRequest<AllowlistRequest>, ) -> Result<Response<Allowlist>, Status>
For retrieving the list of allowlisted CIDR blocks.
Sourcepub async fn get_members(
&mut self,
request: impl IntoRequest<MembersRequest>,
) -> Result<Response<Members>, Status>
pub async fn get_members( &mut self, request: impl IntoRequest<MembersRequest>, ) -> Result<Response<Members>, Status>
For enumerating the current members
For enumerating the current authority keys (validators)
Sourcepub async fn get_encryption_key(
&mut self,
request: impl IntoRequest<EncryptionKeyRequest>,
) -> Result<Response<EncryptionKey>, Status>
pub async fn get_encryption_key( &mut self, request: impl IntoRequest<EncryptionKeyRequest>, ) -> Result<Response<EncryptionKey>, Status>
For retrieving the public encryption key of an account on the network
Sourcepub async fn get_current_block(
&mut self,
request: impl IntoRequest<GetCurrentBlockReq>,
) -> Result<Response<Blockstamp>, Status>
pub async fn get_current_block( &mut self, request: impl IntoRequest<GetCurrentBlockReq>, ) -> Result<Response<Blockstamp>, Status>
Returns the most current block and timestamp in a single blockstamp message with a staleness indicator
pub async fn get_validator_emission_rate( &mut self, request: impl IntoRequest<GetValidatorEmissionRateReq>, ) -> Result<Response<ValidatorEmissionRate>, Status>
pub async fn get_validator_emission_progress( &mut self, request: impl IntoRequest<GetValidatorEmissionProgressReq>, ) -> Result<Response<ValidatorEmissionProgress>, Status>
pub async fn get_pending_create_request_expire_time( &mut self, request: impl IntoRequest<GetPendingCreateRequestExpireTimeReq>, ) -> Result<Response<PendingCreateRequestExpireTime>, Status>
pub async fn check_health( &mut self, request: impl IntoRequest<HealthCheckRequest>, ) -> Result<Response<HealthCheckResponse>, Status>
Trait Implementations§
Source§impl<T: Clone> Clone for XandApiClient<T>
impl<T: Clone> Clone for XandApiClient<T>
Source§fn clone(&self) -> XandApiClient<T>
fn clone(&self) -> XandApiClient<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> Freeze for XandApiClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for XandApiClient<T>where
T: RefUnwindSafe,
impl<T> Send for XandApiClient<T>where
T: Send,
impl<T> Sync for XandApiClient<T>where
T: Sync,
impl<T> Unpin for XandApiClient<T>where
T: Unpin,
impl<T> UnwindSafe for XandApiClient<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
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>
T
in a tonic::Request