PlatformClient

Struct PlatformClient 

Source
pub struct PlatformClient<T> { /* private fields */ }

Implementations§

Source§

impl PlatformClient<Channel>

Source

pub async fn connect<D>(dst: D) -> Result<Self, Error>
where D: TryInto<Endpoint>, D::Error: Into<StdError>,

Attempt to create a new client by connecting to a given endpoint.

Source§

impl<T> PlatformClient<T>
where T: GrpcService<Body>, T::Error: Into<StdError>, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,

Source

pub fn new(inner: T) -> Self

Source

pub fn with_origin(inner: T, origin: Uri) -> Self

Source

pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> PlatformClient<InterceptedService<T, F>>
where F: Interceptor, T::ResponseBody: Default, T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>, <T as Service<Request<Body>>>::Error: Into<StdError> + Send + Sync,

Source

pub fn send_compressed(self, encoding: CompressionEncoding) -> Self

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

Source

pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self

Enable decompressing responses.

Source

pub fn max_decoding_message_size(self, limit: usize) -> Self

Limits the maximum size of a decoded message.

Default: 4MB

Source

pub fn max_encoding_message_size(self, limit: usize) -> Self

Limits the maximum size of an encoded message.

Default: usize::MAX

Source

pub async fn broadcast_state_transition( &mut self, request: impl IntoRequest<BroadcastStateTransitionRequest>, ) -> Result<Response<BroadcastStateTransitionResponse>, Status>

@sdk-ignore: Write-only endpoint, not a query

Source

pub async fn get_identity( &mut self, request: impl IntoRequest<GetIdentityRequest>, ) -> Result<Response<GetIdentityResponse>, Status>

Source

pub async fn get_identity_keys( &mut self, request: impl IntoRequest<GetIdentityKeysRequest>, ) -> Result<Response<GetIdentityKeysResponse>, Status>

Source

pub async fn get_identities_contract_keys( &mut self, request: impl IntoRequest<GetIdentitiesContractKeysRequest>, ) -> Result<Response<GetIdentitiesContractKeysResponse>, Status>

Source

pub async fn get_identity_nonce( &mut self, request: impl IntoRequest<GetIdentityNonceRequest>, ) -> Result<Response<GetIdentityNonceResponse>, Status>

Source

pub async fn get_identity_contract_nonce( &mut self, request: impl IntoRequest<GetIdentityContractNonceRequest>, ) -> Result<Response<GetIdentityContractNonceResponse>, Status>

Source

pub async fn get_identity_balance( &mut self, request: impl IntoRequest<GetIdentityBalanceRequest>, ) -> Result<Response<GetIdentityBalanceResponse>, Status>

Source

pub async fn get_identities_balances( &mut self, request: impl IntoRequest<GetIdentitiesBalancesRequest>, ) -> Result<Response<GetIdentitiesBalancesResponse>, Status>

Source

pub async fn get_identity_balance_and_revision( &mut self, request: impl IntoRequest<GetIdentityBalanceAndRevisionRequest>, ) -> Result<Response<GetIdentityBalanceAndRevisionResponse>, Status>

Source

pub async fn get_evonodes_proposed_epoch_blocks_by_ids( &mut self, request: impl IntoRequest<GetEvonodesProposedEpochBlocksByIdsRequest>, ) -> Result<Response<GetEvonodesProposedEpochBlocksResponse>, Status>

Source

pub async fn get_evonodes_proposed_epoch_blocks_by_range( &mut self, request: impl IntoRequest<GetEvonodesProposedEpochBlocksByRangeRequest>, ) -> Result<Response<GetEvonodesProposedEpochBlocksResponse>, Status>

Source

pub async fn get_data_contract( &mut self, request: impl IntoRequest<GetDataContractRequest>, ) -> Result<Response<GetDataContractResponse>, Status>

Source

pub async fn get_data_contract_history( &mut self, request: impl IntoRequest<GetDataContractHistoryRequest>, ) -> Result<Response<GetDataContractHistoryResponse>, Status>

Source

pub async fn get_data_contracts( &mut self, request: impl IntoRequest<GetDataContractsRequest>, ) -> Result<Response<GetDataContractsResponse>, Status>

Source

pub async fn get_documents( &mut self, request: impl IntoRequest<GetDocumentsRequest>, ) -> Result<Response<GetDocumentsResponse>, Status>

Source

pub async fn get_identity_by_public_key_hash( &mut self, request: impl IntoRequest<GetIdentityByPublicKeyHashRequest>, ) -> Result<Response<GetIdentityByPublicKeyHashResponse>, Status>

Source

pub async fn get_identity_by_non_unique_public_key_hash( &mut self, request: impl IntoRequest<GetIdentityByNonUniquePublicKeyHashRequest>, ) -> Result<Response<GetIdentityByNonUniquePublicKeyHashResponse>, Status>

Source

pub async fn wait_for_state_transition_result( &mut self, request: impl IntoRequest<WaitForStateTransitionResultRequest>, ) -> Result<Response<WaitForStateTransitionResultResponse>, Status>

Source

pub async fn get_consensus_params( &mut self, request: impl IntoRequest<GetConsensusParamsRequest>, ) -> Result<Response<GetConsensusParamsResponse>, Status>

@sdk-ignore: Consensus params fetched via Tenderdash RPC

Source

pub async fn get_protocol_version_upgrade_state( &mut self, request: impl IntoRequest<GetProtocolVersionUpgradeStateRequest>, ) -> Result<Response<GetProtocolVersionUpgradeStateResponse>, Status>

Source

pub async fn get_protocol_version_upgrade_vote_status( &mut self, request: impl IntoRequest<GetProtocolVersionUpgradeVoteStatusRequest>, ) -> Result<Response<GetProtocolVersionUpgradeVoteStatusResponse>, Status>

Source

pub async fn get_epochs_info( &mut self, request: impl IntoRequest<GetEpochsInfoRequest>, ) -> Result<Response<GetEpochsInfoResponse>, Status>

Source

pub async fn get_finalized_epoch_infos( &mut self, request: impl IntoRequest<GetFinalizedEpochInfosRequest>, ) -> Result<Response<GetFinalizedEpochInfosResponse>, Status>

Source

pub async fn get_contested_resources( &mut self, request: impl IntoRequest<GetContestedResourcesRequest>, ) -> Result<Response<GetContestedResourcesResponse>, Status>

What votes are currently happening for a specific contested index

Source

pub async fn get_contested_resource_vote_state( &mut self, request: impl IntoRequest<GetContestedResourceVoteStateRequest>, ) -> Result<Response<GetContestedResourceVoteStateResponse>, Status>

What’s the state of a contested resource vote? (ie who is winning?)

Source

pub async fn get_contested_resource_voters_for_identity( &mut self, request: impl IntoRequest<GetContestedResourceVotersForIdentityRequest>, ) -> Result<Response<GetContestedResourceVotersForIdentityResponse>, Status>

Who voted for a contested resource to go to a specific identity?

Source

pub async fn get_contested_resource_identity_votes( &mut self, request: impl IntoRequest<GetContestedResourceIdentityVotesRequest>, ) -> Result<Response<GetContestedResourceIdentityVotesResponse>, Status>

How did an identity vote?

Source

pub async fn get_vote_polls_by_end_date( &mut self, request: impl IntoRequest<GetVotePollsByEndDateRequest>, ) -> Result<Response<GetVotePollsByEndDateResponse>, Status>

What vote polls will end soon?

Source

pub async fn get_prefunded_specialized_balance( &mut self, request: impl IntoRequest<GetPrefundedSpecializedBalanceRequest>, ) -> Result<Response<GetPrefundedSpecializedBalanceResponse>, Status>

Source

pub async fn get_total_credits_in_platform( &mut self, request: impl IntoRequest<GetTotalCreditsInPlatformRequest>, ) -> Result<Response<GetTotalCreditsInPlatformResponse>, Status>

Source

pub async fn get_path_elements( &mut self, request: impl IntoRequest<GetPathElementsRequest>, ) -> Result<Response<GetPathElementsResponse>, Status>

Source

pub async fn get_status( &mut self, request: impl IntoRequest<GetStatusRequest>, ) -> Result<Response<GetStatusResponse>, Status>

Source

pub async fn get_current_quorums_info( &mut self, request: impl IntoRequest<GetCurrentQuorumsInfoRequest>, ) -> Result<Response<GetCurrentQuorumsInfoResponse>, Status>

Source

pub async fn get_identity_token_balances( &mut self, request: impl IntoRequest<GetIdentityTokenBalancesRequest>, ) -> Result<Response<GetIdentityTokenBalancesResponse>, Status>

Source

pub async fn get_identities_token_balances( &mut self, request: impl IntoRequest<GetIdentitiesTokenBalancesRequest>, ) -> Result<Response<GetIdentitiesTokenBalancesResponse>, Status>

Source

pub async fn get_identity_token_infos( &mut self, request: impl IntoRequest<GetIdentityTokenInfosRequest>, ) -> Result<Response<GetIdentityTokenInfosResponse>, Status>

Source

pub async fn get_identities_token_infos( &mut self, request: impl IntoRequest<GetIdentitiesTokenInfosRequest>, ) -> Result<Response<GetIdentitiesTokenInfosResponse>, Status>

Source

pub async fn get_token_statuses( &mut self, request: impl IntoRequest<GetTokenStatusesRequest>, ) -> Result<Response<GetTokenStatusesResponse>, Status>

Source

pub async fn get_token_direct_purchase_prices( &mut self, request: impl IntoRequest<GetTokenDirectPurchasePricesRequest>, ) -> Result<Response<GetTokenDirectPurchasePricesResponse>, Status>

Source

pub async fn get_token_contract_info( &mut self, request: impl IntoRequest<GetTokenContractInfoRequest>, ) -> Result<Response<GetTokenContractInfoResponse>, Status>

Source

pub async fn get_token_pre_programmed_distributions( &mut self, request: impl IntoRequest<GetTokenPreProgrammedDistributionsRequest>, ) -> Result<Response<GetTokenPreProgrammedDistributionsResponse>, Status>

Source

pub async fn get_token_perpetual_distribution_last_claim( &mut self, request: impl IntoRequest<GetTokenPerpetualDistributionLastClaimRequest>, ) -> Result<Response<GetTokenPerpetualDistributionLastClaimResponse>, Status>

Source

pub async fn get_token_total_supply( &mut self, request: impl IntoRequest<GetTokenTotalSupplyRequest>, ) -> Result<Response<GetTokenTotalSupplyResponse>, Status>

Source

pub async fn get_group_info( &mut self, request: impl IntoRequest<GetGroupInfoRequest>, ) -> Result<Response<GetGroupInfoResponse>, Status>

Source

pub async fn get_group_infos( &mut self, request: impl IntoRequest<GetGroupInfosRequest>, ) -> Result<Response<GetGroupInfosResponse>, Status>

Source

pub async fn get_group_actions( &mut self, request: impl IntoRequest<GetGroupActionsRequest>, ) -> Result<Response<GetGroupActionsResponse>, Status>

Source

pub async fn get_group_action_signers( &mut self, request: impl IntoRequest<GetGroupActionSignersRequest>, ) -> Result<Response<GetGroupActionSignersResponse>, Status>

Source

pub async fn get_address_info( &mut self, request: impl IntoRequest<GetAddressInfoRequest>, ) -> Result<Response<GetAddressInfoResponse>, Status>

Source

pub async fn get_addresses_infos( &mut self, request: impl IntoRequest<GetAddressesInfosRequest>, ) -> Result<Response<GetAddressesInfosResponse>, Status>

Source

pub async fn get_addresses_trunk_state( &mut self, request: impl IntoRequest<GetAddressesTrunkStateRequest>, ) -> Result<Response<GetAddressesTrunkStateResponse>, Status>

Source

pub async fn get_addresses_branch_state( &mut self, request: impl IntoRequest<GetAddressesBranchStateRequest>, ) -> Result<Response<GetAddressesBranchStateResponse>, Status>

Source

pub async fn get_recent_address_balance_changes( &mut self, request: impl IntoRequest<GetRecentAddressBalanceChangesRequest>, ) -> Result<Response<GetRecentAddressBalanceChangesResponse>, Status>

Source

pub async fn get_recent_compacted_address_balance_changes( &mut self, request: impl IntoRequest<GetRecentCompactedAddressBalanceChangesRequest>, ) -> Result<Response<GetRecentCompactedAddressBalanceChangesResponse>, Status>

Source

pub async fn get_shielded_encrypted_notes( &mut self, request: impl IntoRequest<GetShieldedEncryptedNotesRequest>, ) -> Result<Response<GetShieldedEncryptedNotesResponse>, Status>

Source

pub async fn get_shielded_anchors( &mut self, request: impl IntoRequest<GetShieldedAnchorsRequest>, ) -> Result<Response<GetShieldedAnchorsResponse>, Status>

Source

pub async fn get_most_recent_shielded_anchor( &mut self, request: impl IntoRequest<GetMostRecentShieldedAnchorRequest>, ) -> Result<Response<GetMostRecentShieldedAnchorResponse>, Status>

Source

pub async fn get_shielded_pool_state( &mut self, request: impl IntoRequest<GetShieldedPoolStateRequest>, ) -> Result<Response<GetShieldedPoolStateResponse>, Status>

Source

pub async fn get_shielded_nullifiers( &mut self, request: impl IntoRequest<GetShieldedNullifiersRequest>, ) -> Result<Response<GetShieldedNullifiersResponse>, Status>

Source

pub async fn get_nullifiers_trunk_state( &mut self, request: impl IntoRequest<GetNullifiersTrunkStateRequest>, ) -> Result<Response<GetNullifiersTrunkStateResponse>, Status>

Source

pub async fn get_nullifiers_branch_state( &mut self, request: impl IntoRequest<GetNullifiersBranchStateRequest>, ) -> Result<Response<GetNullifiersBranchStateResponse>, Status>

Source

pub async fn get_recent_nullifier_changes( &mut self, request: impl IntoRequest<GetRecentNullifierChangesRequest>, ) -> Result<Response<GetRecentNullifierChangesResponse>, Status>

Source

pub async fn get_recent_compacted_nullifier_changes( &mut self, request: impl IntoRequest<GetRecentCompactedNullifierChangesRequest>, ) -> Result<Response<GetRecentCompactedNullifierChangesResponse>, Status>

Trait Implementations§

Source§

impl<T: Clone> Clone for PlatformClient<T>

Source§

fn clone(&self) -> PlatformClient<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for PlatformClient<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !Freeze for PlatformClient<T>

§

impl<T> RefUnwindSafe for PlatformClient<T>
where T: RefUnwindSafe,

§

impl<T> Send for PlatformClient<T>
where T: Send,

§

impl<T> Sync for PlatformClient<T>
where T: Sync,

§

impl<T> Unpin for PlatformClient<T>
where T: Unpin,

§

impl<T> UnwindSafe for PlatformClient<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> IntoPlatformVersioned<U> for T

Source§

fn into_platform_versioned(self, platform_version: &PlatformVersion) -> U

Performs the conversion.
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryFromVersioned<U> for T
where T: TryFrom<U>,

§

type Error = <T as TryFrom<U>>::Error

The type returned in the event of a conversion error.
§

fn try_from_versioned( value: U, _grove_version: &GroveVersion, ) -> Result<T, <T as TryFromVersioned<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TryIntoPlatformVersioned<U> for T

Source§

type Error = <U as TryFromPlatformVersioned<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into_platform_versioned( self, platform_version: &PlatformVersion, ) -> Result<U, <U as TryFromPlatformVersioned<T>>::Error>

Performs the conversion.
§

impl<T, U> TryIntoVersioned<U> for T
where U: TryFromVersioned<T>,

§

type Error = <U as TryFromVersioned<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into_versioned( self, grove_version: &GroveVersion, ) -> Result<U, <U as TryFromVersioned<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more