Skip to main content

nym_node_requests/api/v1/network/
models.rs

1// Copyright 2025 - Nym Technologies SA <contact@nymtech.net>
2// SPDX-License-Identifier: Apache-2.0
3
4use nym_crypto::asymmetric::ed25519;
5use nym_crypto::asymmetric::ed25519::serde_helpers::bs58_ed25519_pubkey;
6use nym_upgrade_mode_check::UpgradeModeAttestation;
7use serde::{Deserialize, Serialize};
8use time::OffsetDateTime;
9use url::Url;
10
11#[derive(Serialize, Deserialize, Debug, Clone)]
12#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
13pub struct UpgradeModeStatus {
14    pub enabled: bool,
15
16    #[serde(with = "time::serde::rfc3339")]
17    #[cfg_attr(feature = "openapi", schema(value_type = String))]
18    pub last_queried: OffsetDateTime,
19
20    #[cfg_attr(feature = "openapi", schema(value_type = String))]
21    pub attestation_provider: Url,
22
23    #[serde(with = "bs58_ed25519_pubkey")]
24    #[cfg_attr(feature = "openapi", schema(value_type = String))]
25    pub attester_pubkey: ed25519::PublicKey,
26
27    pub published_attestation: Option<UpgradeModeAttestation>,
28}