d13c8bde57
* wasm-compatible reqwest-based rpc client * better constructors for the reqwest based client * fixed usages of the client * introduced /network/details endpoint to nym-api to return used network information (#3758) * introduced /network/details endpoint to nym-api to return used network information * introduced endpoints for nym contract information
29 lines
761 B
Rust
29 lines
761 B
Rust
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
use nym_config::defaults::NymNetworkDetails;
|
|
use schemars::JsonSchema;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Serialize, Deserialize, JsonSchema)]
|
|
pub struct NetworkDetails {
|
|
pub(crate) connected_nyxd: String,
|
|
pub(crate) network: NymNetworkDetails,
|
|
}
|
|
|
|
impl NetworkDetails {
|
|
pub fn new(connected_nyxd: String, network: NymNetworkDetails) -> Self {
|
|
Self {
|
|
connected_nyxd,
|
|
network,
|
|
}
|
|
}
|
|
}
|
|
|
|
#[derive(Serialize, Deserialize, Clone, JsonSchema)]
|
|
#[serde(rename_all = "snake_case")]
|
|
pub struct ContractInformation<T> {
|
|
pub(crate) address: Option<String>,
|
|
pub(crate) details: Option<T>,
|
|
}
|