relocate a validator api function
This commit is contained in:
Generated
+1
@@ -4832,6 +4832,7 @@ dependencies = [
|
||||
"ecdsa",
|
||||
"getset",
|
||||
"nym-compact-ecash",
|
||||
"nym-config",
|
||||
"nym-contracts-common",
|
||||
"nym-credentials-interface",
|
||||
"nym-crypto",
|
||||
|
||||
@@ -31,6 +31,7 @@ pub use nym_api_requests::{
|
||||
StakeSaturationResponse, UptimeResponse,
|
||||
},
|
||||
nym_nodes::{CachedNodesResponse, SkimmedNode},
|
||||
NymNetworkDetailsResponse
|
||||
};
|
||||
pub use nym_coconut_dkg_common::types::EpochId;
|
||||
use nym_contracts_common::IdentityKey;
|
||||
@@ -1027,6 +1028,21 @@ pub trait NymApiClientExt: ApiClient {
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
#[instrument(level = "debug", skip(self))]
|
||||
async fn get_network_details(
|
||||
&self,
|
||||
) -> Result<NymNetworkDetailsResponse, NymAPIError> {
|
||||
self.get_json(
|
||||
&[
|
||||
routes::API_VERSION,
|
||||
routes::NETWORK,
|
||||
routes::DETAILS,
|
||||
],
|
||||
NO_PARAMS,
|
||||
)
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
|
||||
|
||||
@@ -67,6 +67,9 @@ pub const STAKE_SATURATION: &str = "stake-saturation";
|
||||
pub const INCLUSION_CHANCE: &str = "inclusion-probability";
|
||||
pub const SUBMIT_GATEWAY: &str = "submit-gateway-monitoring-results";
|
||||
pub const SUBMIT_NODE: &str = "submit-node-monitoring-results";
|
||||
pub const PERFORMANCE: &str = "performance";
|
||||
|
||||
|
||||
pub const SERVICE_PROVIDERS: &str = "services";
|
||||
|
||||
pub const DETAILS: &str = "details";
|
||||
pub const NETWORK: &str = "network";
|
||||
@@ -28,6 +28,7 @@ nym-serde-helpers = { path = "../../common/serde-helpers", features = ["bs58", "
|
||||
nym-credentials-interface = { path = "../../common/credentials-interface" }
|
||||
nym-crypto = { path = "../../common/crypto", features = ["serde", "asymmetric"] }
|
||||
|
||||
nym-config = { path = "../../common/config" }
|
||||
nym-ecash-time = { path = "../../common/ecash-time" }
|
||||
nym-compact-ecash = { path = "../../common/nym_offline_compact_ecash" }
|
||||
nym-contracts-common = { path = "../../common/cosmwasm-smart-contracts/contracts-common", features = ["naive_float"] }
|
||||
|
||||
@@ -12,6 +12,12 @@ pub mod models;
|
||||
pub mod nym_nodes;
|
||||
pub mod pagination;
|
||||
|
||||
// The response type we fetch from the network details endpoint.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct NymNetworkDetailsResponse {
|
||||
pub network: nym_config::defaults::NymNetworkDetails,
|
||||
}
|
||||
|
||||
pub trait Deprecatable {
|
||||
fn deprecate(self) -> Deprecated<Self>
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user