Skip to main content

nym_api_requests/models/
legacy.rs

1// Copyright 2025 - Nym Technologies SA <contact@nymtech.net>
2// SPDX-License-Identifier: Apache-2.0
3
4use nym_mixnet_contract_common::{GatewayBond, MixNodeDetails, NodeId};
5use schemars::JsonSchema;
6use serde::{Deserialize, Serialize};
7use utoipa::ToSchema;
8
9#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, ToSchema)]
10pub struct LegacyGatewayBondWithId {
11    #[serde(flatten)]
12    pub bond: GatewayBond,
13    pub node_id: NodeId,
14}
15
16#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, ToSchema)]
17pub struct LegacyMixnodesResponse {
18    pub count: usize,
19    pub nodes: Vec<MixNodeDetails>,
20}
21
22#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, ToSchema)]
23pub struct LegacyGatewaysResponse {
24    pub count: usize,
25    pub nodes: Vec<LegacyGatewayBondWithId>,
26}