Files
nym/nym-api/nym-api-requests/src/lib.rs
T
Jędrzej Stuczyński dc59149a5d squashed feature/ecash-liveness-check (#5890) (#5890)
delay to gruyere

chore: delay to Feta

added threshold information to the response

nym api test clippy

bugfixes and endpoint improvements

expose results on api endpoints

wip: making nym api monitor network signers

added fallback legacy queries to get basic support idea

refactored the code to expose bool-only methods for status

ecash-signer-check lib for obtaining basic ecash signer information
2025-08-05 12:28:42 +01:00

48 lines
988 B
Rust

// Copyright 2022 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
pub mod constants;
pub mod ecash;
mod helpers;
pub mod legacy;
pub mod models;
pub mod nym_nodes;
pub mod pagination;
pub mod signable;
// 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
Self: Sized,
{
self.into()
}
}
impl<T> Deprecatable for T {}
#[derive(Serialize, Deserialize, JsonSchema)]
pub struct Deprecated<T> {
pub deprecated: bool,
#[serde(flatten)]
pub response: T,
}
impl<T> From<T> for Deprecated<T> {
fn from(response: T) -> Self {
Deprecated {
deprecated: true,
response,
}
}
}