pub struct NymApiClient {
pub use_bincode: bool,
pub nym_api: Client,
}Use nym_http_api_client::Client::from_network() or ClientBuilder::with_bincode() instead
Expand description
DEPRECATED: Use nym_http_api_client::Client with from_network() or with_bincode() instead
Fields§
§use_bincode: boolUse nym_http_api_client::Client::from_network() or ClientBuilder::with_bincode() instead
nym_api: ClientUse nym_http_api_client::Client::from_network() or ClientBuilder::with_bincode() instead
Implementations§
Source§impl NymApiClient
impl NymApiClient
pub fn new_with_timeout(api_url: Url, timeout: Duration) -> Self
pub fn with_bincode(self, use_bincode: bool) -> Self
pub fn new_with_user_agent( api_url: Url, user_agent: impl Into<UserAgent>, ) -> Self
pub fn api_url(&self) -> &Url
pub fn change_nym_api(&mut self, new_endpoint: Url)
pub async fn get_basic_mixnodes( &self, ) -> Result<Vec<SkimmedNodeV1>, ValidatorClientError>
use get_all_basic_active_mixing_assigned_nodes instead
pub async fn get_basic_gateways( &self, ) -> Result<Vec<SkimmedNodeV1>, ValidatorClientError>
use get_all_basic_entry_assigned_nodes instead
pub async fn get_current_rewarded_set( &self, ) -> Result<EpochRewardedSet, ValidatorClientError>
Sourcepub async fn get_all_basic_entry_assigned_nodes(
&self,
) -> Result<Vec<SkimmedNodeV1>, ValidatorClientError>
👎Deprecated: use get_all_basic_entry_assigned_nodes_with_metadata instead
pub async fn get_all_basic_entry_assigned_nodes( &self, ) -> Result<Vec<SkimmedNodeV1>, ValidatorClientError>
use get_all_basic_entry_assigned_nodes_with_metadata instead
retrieve basic information for nodes are capable of operating as an entry gateway this includes legacy gateways and nym-nodes
pub async fn get_all_basic_entry_assigned_nodes_with_metadata( &self, ) -> Result<SkimmedNodesWithMetadata, ValidatorClientError>
Sourcepub async fn get_all_basic_active_mixing_assigned_nodes(
&self,
) -> Result<Vec<SkimmedNodeV1>, ValidatorClientError>
👎Deprecated: use get_all_basic_active_mixing_assigned_nodes_with_metadata instead
pub async fn get_all_basic_active_mixing_assigned_nodes( &self, ) -> Result<Vec<SkimmedNodeV1>, ValidatorClientError>
use get_all_basic_active_mixing_assigned_nodes_with_metadata instead
retrieve basic information for nodes that got assigned ‘mixing’ node in this epoch this includes legacy mixnodes and nym-nodes
pub async fn get_all_basic_active_mixing_assigned_nodes_with_metadata( &self, ) -> Result<SkimmedNodesWithMetadata, ValidatorClientError>
Sourcepub async fn get_all_basic_mixing_capable_nodes(
&self,
) -> Result<Vec<SkimmedNodeV1>, ValidatorClientError>
👎Deprecated: use get_all_basic_mixing_capable_nodes_with_metadata instead
pub async fn get_all_basic_mixing_capable_nodes( &self, ) -> Result<Vec<SkimmedNodeV1>, ValidatorClientError>
use get_all_basic_mixing_capable_nodes_with_metadata instead
retrieve basic information for nodes are capable of operating as a mixnode this includes legacy mixnodes and nym-nodes
pub async fn get_all_basic_mixing_capable_nodes_with_metadata( &self, ) -> Result<SkimmedNodesWithMetadata, ValidatorClientError>
Sourcepub async fn get_all_basic_nodes(
&self,
) -> Result<Vec<SkimmedNodeV1>, ValidatorClientError>
👎Deprecated: use get_all_basic_nodes_with_metadata instead
pub async fn get_all_basic_nodes( &self, ) -> Result<Vec<SkimmedNodeV1>, ValidatorClientError>
use get_all_basic_nodes_with_metadata instead
retrieve basic information for all bonded nodes on the network
pub async fn get_all_basic_nodes_with_metadata( &self, ) -> Result<SkimmedNodesWithMetadata, ValidatorClientError>
Sourcepub async fn get_all_expanded_nodes(
&self,
) -> Result<SemiSkimmedNodesWithMetadata, ValidatorClientError>
pub async fn get_all_expanded_nodes( &self, ) -> Result<SemiSkimmedNodesWithMetadata, ValidatorClientError>
retrieve expanded information for all bonded nodes on the network
pub async fn health(&self) -> Result<ApiHealthResponse, ValidatorClientError>
pub async fn get_all_described_nodes( &self, ) -> Result<Vec<NymNodeDescriptionV1>, ValidatorClientError>
use .get_all_described_nodes_v2 instead
pub async fn get_all_described_nodes_v2( &self, ) -> Result<Vec<NymNodeDescriptionV2>, ValidatorClientError>
pub async fn get_all_bonded_nym_nodes( &self, ) -> Result<Vec<NymNodeDetails>, ValidatorClientError>
pub async fn get_gateway_core_status_count( &self, identity: IdentityKeyRef<'_>, since: Option<i64>, ) -> Result<GatewayCoreStatusResponse, ValidatorClientError>
pub async fn get_mixnode_core_status_count( &self, mix_id: NodeId, since: Option<i64>, ) -> Result<MixnodeCoreStatusResponse, ValidatorClientError>
pub async fn blind_sign( &self, request_body: &BlindSignRequestBody, ) -> Result<BlindedSignatureResponse, ValidatorClientError>
pub async fn verify_ecash_ticket( &self, request_body: &VerifyEcashTicketBody, ) -> Result<EcashTicketVerificationResponse, ValidatorClientError>
pub async fn batch_redeem_ecash_tickets( &self, request_body: &BatchRedeemTicketsBody, ) -> Result<EcashBatchTicketRedemptionResponse, ValidatorClientError>
pub async fn partial_expiration_date_signatures( &self, expiration_date: Option<Date>, epoch_id: Option<EpochId>, ) -> Result<PartialExpirationDateSignatureResponse, ValidatorClientError>
pub async fn partial_coin_indices_signatures( &self, epoch_id: Option<EpochId>, ) -> Result<PartialCoinIndicesSignatureResponse, ValidatorClientError>
pub async fn global_expiration_date_signatures( &self, expiration_date: Option<Date>, epoch_id: Option<EpochId>, ) -> Result<AggregatedExpirationDateSignatureResponse, ValidatorClientError>
pub async fn global_coin_indices_signatures( &self, epoch_id: Option<EpochId>, ) -> Result<AggregatedCoinIndicesSignatureResponse, ValidatorClientError>
pub async fn master_verification_key( &self, epoch_id: Option<EpochId>, ) -> Result<VerificationKeyResponse, ValidatorClientError>
pub async fn issued_ticketbooks_for( &self, expiration_date: Date, ) -> Result<IssuedTicketbooksForResponse, ValidatorClientError>
pub async fn issued_ticketbooks_for_count( &self, expiration_date: Date, ) -> Result<IssuedTicketbooksForCountResponse, ValidatorClientError>
pub async fn issued_ticketbooks_challenge_commitment( &self, request: &IssuedTicketbooksChallengeCommitmentRequest, ) -> Result<IssuedTicketbooksChallengeCommitmentResponse, ValidatorClientError>
pub async fn issued_ticketbooks_data( &self, request: &IssuedTicketbooksDataRequest, ) -> Result<IssuedTicketbooksDataResponse, ValidatorClientError>
pub async fn nodes_by_addresses( &self, addresses: Vec<IpAddr>, ) -> Result<NodesByAddressesResponse, ValidatorClientError>
Trait Implementations§
Source§impl Clone for NymApiClient
impl Clone for NymApiClient
Source§fn clone(&self) -> NymApiClient
fn clone(&self) -> NymApiClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !Freeze for NymApiClient
impl !RefUnwindSafe for NymApiClient
impl !UnwindSafe for NymApiClient
impl Send for NymApiClient
impl Sync for NymApiClient
impl Unpin for NymApiClient
impl UnsafeUnpin for NymApiClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
Source§impl<T> Deprecatable for T
impl<T> Deprecatable for T
fn deprecate(self) -> Deprecated<Self>where
Self: Sized,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> OptionalSet for T
impl<T> OptionalSet for T
Source§fn with_optional<F, T>(self, f: F, val: Option<T>) -> Self
fn with_optional<F, T>(self, f: F, val: Option<T>) -> Self
Some), the provided closure is applied.
Otherwise self is returned with no modifications.Source§fn with_validated_optional<F, T, V, E>(
self,
f: F,
value: Option<T>,
validate: V,
) -> Result<Self, E>
fn with_validated_optional<F, T, V, E>( self, f: F, value: Option<T>, validate: V, ) -> Result<Self, E>
Some) it is validated and then the provided closure is applied.
Otherwise self is returned with no modifications.Source§fn with_optional_env<F, T>(self, f: F, val: Option<T>, env_var: &str) -> Self
fn with_optional_env<F, T>(self, f: F, val: Option<T>, env_var: &str) -> Self
Some), the provided closure is applied.
Otherwise, if the environment was configured and the corresponding variable was set,
the value is parsed using the FromStr implementation and the closure is applied on that instead.
Finally, if none of those were available, self is returned with no modifications.Source§fn with_optional_custom_env<F, T, G>(
self,
f: F,
val: Option<T>,
env_var: &str,
parser: G,
) -> Self
fn with_optional_custom_env<F, T, G>( self, f: F, val: Option<T>, env_var: &str, parser: G, ) -> Self
Some), the provided closure is applied.
Otherwise, if the environment was configured and the corresponding variable was set,
the value is parsed using the provided parser and the closure is applied on that instead.
Finally, if none of those were available, self is returned with no modifications.