Skip to main content

nym_validator_client/
lib.rs

1// Copyright 2021-2023 - Nym Technologies SA <contact@nymtech.net>
2// SPDX-License-Identifier: Apache-2.0
3
4pub mod client;
5pub mod coconut;
6#[cfg(feature = "http-client")]
7pub mod connection_tester;
8pub mod error;
9pub mod nym_api;
10pub mod nyxd;
11pub mod rpc;
12pub mod signing;
13
14pub use crate::error::ValidatorClientError;
15#[allow(deprecated)]
16pub use crate::rpc::reqwest::ReqwestRpcClient;
17pub use crate::signing::direct_wallet::DirectSecp256k1HdWallet;
18pub use client::{Client, Config, EcashApiClient};
19pub use nym_api_requests::*;
20pub use nym_http_api_client::UserAgent;
21
22#[cfg(feature = "http-client")]
23pub use cosmrs::rpc::HttpClient as HttpRpcClient;
24#[cfg(feature = "http-client")]
25pub use rpc::http_client;
26
27// some type aliasing
28
29pub type ValidatorClient<C> = Client<C>;
30pub type SigningValidatorClient<C, S> = Client<C, S>;
31
32#[cfg(feature = "http-client")]
33pub type QueryHttpRpcValidatorClient = Client<HttpRpcClient>;
34#[cfg(feature = "http-client")]
35pub type QueryHttpRpcNyxdClient = nyxd::NyxdClient<HttpRpcClient>;
36
37#[cfg(feature = "http-client")]
38pub type DirectSigningHttpRpcValidatorClient = Client<HttpRpcClient, DirectSecp256k1HdWallet>;
39#[cfg(feature = "http-client")]
40pub type DirectSigningHttpRpcNyxdClient = nyxd::NyxdClient<HttpRpcClient, DirectSecp256k1HdWallet>;
41
42#[allow(deprecated)]
43pub type QueryReqwestRpcValidatorClient = Client<ReqwestRpcClient>;
44#[allow(deprecated)]
45pub type QueryReqwestRpcNyxdClient = nyxd::NyxdClient<ReqwestRpcClient>;
46
47#[allow(deprecated)]
48pub type DirectSigningReqwestRpcValidatorClient = Client<ReqwestRpcClient, DirectSecp256k1HdWallet>;
49#[allow(deprecated)]
50pub type DirectSigningReqwestRpcNyxdClient =
51    nyxd::NyxdClient<ReqwestRpcClient, DirectSecp256k1HdWallet>;