pub struct Client<C, S = NoSigner> {
pub nym_api: Client,
pub nyxd: NyxdClient<C, S>,
}Fields§
§nym_api: Client§nyxd: NyxdClient<C, S>Implementations§
Source§impl Client<HttpRpcClient, DirectSecp256k1HdWallet>
impl Client<HttpRpcClient, DirectSecp256k1HdWallet>
pub fn new_signing( config: Config, mnemonic: Mnemonic, ) -> Result<DirectSigningHttpRpcValidatorClient, ValidatorClientError>
pub fn change_nyxd( &mut self, new_endpoint: Url, ) -> Result<(), ValidatorClientError>
Source§impl Client<ReqwestRpcClient, DirectSecp256k1HdWallet>
impl Client<ReqwestRpcClient, DirectSecp256k1HdWallet>
pub fn new_reqwest_signing( config: Config, mnemonic: Mnemonic, ) -> DirectSigningReqwestRpcValidatorClient
Source§impl Client<HttpRpcClient>
impl Client<HttpRpcClient>
pub fn new_query( config: Config, ) -> Result<QueryHttpRpcValidatorClient, ValidatorClientError>
pub fn change_nyxd( &mut self, new_endpoint: Url, ) -> Result<(), ValidatorClientError>
Source§impl Client<ReqwestRpcClient>
impl Client<ReqwestRpcClient>
pub fn new_reqwest_query(config: Config) -> QueryReqwestRpcValidatorClient
Source§impl<C, S> Client<C, S>
impl<C, S> Client<C, S>
pub fn new_signing_with_rpc_client(
config: Config,
rpc_client: C,
signer: S,
) -> Selfwhere
S: OfflineSigner,
Source§impl<C, S> Client<C, S>
impl<C, S> Client<C, S>
pub fn api_url(&self) -> &Url
pub fn change_nym_api(&mut self, new_endpoint: Url)
pub async fn get_full_node_performance_history( &self, node_id: NodeId, ) -> Result<Vec<HistoricalPerformanceResponse>, ValidatorClientError>
pub async fn get_all_cached_described_nodes( &self, ) -> Result<Vec<NymNodeDescriptionV1>, ValidatorClientError>
👎Deprecated:
use get_all_cached_described_nodes_v2 instead
pub async fn get_all_cached_described_nodes_v2( &self, ) -> Result<Vec<NymNodeDescriptionV2>, ValidatorClientError>
pub async fn get_all_cached_bonded_nym_nodes( &self, ) -> Result<Vec<NymNodeDetails>, ValidatorClientError>
pub async fn blind_sign( &self, request_body: &BlindSignRequestBody, ) -> Result<BlindedSignatureResponse, ValidatorClientError>
Auto Trait Implementations§
impl<C, S = NoSigner> !Freeze for Client<C, S>
impl<C, S = NoSigner> !RefUnwindSafe for Client<C, S>
impl<C, S> Send for Client<C, S>
impl<C, S> Sync for Client<C, S>
impl<C, S> Unpin for Client<C, S>
impl<C, S> UnsafeUnpin for Client<C, S>where
C: UnsafeUnpin,
S: UnsafeUnpin,
impl<C, S = NoSigner> !UnwindSafe for Client<C, S>
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> 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>
Converts
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>
Converts
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
If the value is available (i.e.
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>
If the value is available (i.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
If the value is available (i.e.
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
If the value is available (i.e.
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.