nym-api using new default port for queries
This commit is contained in:
Generated
+1
@@ -6875,6 +6875,7 @@ dependencies = [
|
||||
"hmac 0.12.1",
|
||||
"hyper",
|
||||
"mime",
|
||||
"nym-config",
|
||||
"nym-crypto",
|
||||
"nym-node-requests",
|
||||
"nym-task",
|
||||
|
||||
@@ -462,6 +462,9 @@ pub const DEFAULT_NYM_API_PORT: u16 = 8080;
|
||||
|
||||
pub const NYM_API_VERSION: &str = "v1";
|
||||
|
||||
// NYM-NODE
|
||||
pub const DEFAULT_NYM_NODE_HTTP_PORT: u16 = 8080;
|
||||
|
||||
// REWARDING
|
||||
|
||||
/// We'll be assuming a few more things, profit margin and cost function. Since we don't have reliable package measurement, we'll be using uptime. We'll also set the value of 1 Nym to 1 $, to be able to translate interval costs to Nyms. We'll also assume a cost of 40$ per interval(month), converting that to Nym at our 1$ rate translates to 40_000_000 uNyms
|
||||
|
||||
@@ -8,6 +8,7 @@ use crate::support::config;
|
||||
use crate::support::config::DEFAULT_NODE_DESCRIBE_BATCH_SIZE;
|
||||
use futures_util::{stream, StreamExt};
|
||||
use nym_api_requests::models::NymNodeDescription;
|
||||
use nym_config::defaults::DEFAULT_NYM_NODE_HTTP_PORT;
|
||||
use nym_contracts_common::IdentityKey;
|
||||
use nym_mixnet_contract_common::Gateway;
|
||||
use nym_node_requests::api::client::{NymNodeApiClientError, NymNodeApiClientExt};
|
||||
@@ -74,7 +75,10 @@ impl NodeDescriptionProvider {
|
||||
async fn get_gateway_description(
|
||||
gateway: Gateway,
|
||||
) -> Result<(IdentityKey, NymNodeDescription), NodeDescribeCacheError> {
|
||||
let client = match nym_node_requests::api::Client::new_url(&gateway.host, None) {
|
||||
let client = match nym_node_requests::api::Client::new_url(
|
||||
format!("{}:{}", gateway.host, DEFAULT_NYM_NODE_HTTP_PORT),
|
||||
None,
|
||||
) {
|
||||
Ok(client) => client,
|
||||
Err(err) => {
|
||||
return Err(NodeDescribeCacheError::MalformedHost {
|
||||
|
||||
@@ -44,6 +44,7 @@ utoipa-swagger-ui = { workspace = true, features = ["axum"] }
|
||||
#utoipa-redoc = { version = "0.1.0", features = ["axum"] }
|
||||
#utoipa-rapidoc = { version = "0.1.0", features = ["axum"] }
|
||||
|
||||
nym-config = { path = "../common/config" }
|
||||
nym-crypto = { path = "../common/crypto", features = ["asymmetric" ]}
|
||||
nym-node-requests = { path = "nym-node-requests", default-features = false, features = ["openapi", "wireguard-verify"]}
|
||||
nym-task = { path = "../common/task" }
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright 2023 - Nym Technologies SA <contact@nymtech.net>
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
use nym_config::defaults::DEFAULT_NYM_NODE_HTTP_PORT;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_helpers::*;
|
||||
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
|
||||
@@ -10,7 +11,7 @@ pub mod persistence;
|
||||
mod serde_helpers;
|
||||
|
||||
pub const DEFAULT_WIREGUARD_PORT: u16 = 51820;
|
||||
pub const DEFAULT_HTTP_PORT: u16 = 8080;
|
||||
pub const DEFAULT_HTTP_PORT: u16 = DEFAULT_NYM_NODE_HTTP_PORT;
|
||||
|
||||
// TODO: this is very much a WIP. we need proper ssl certificate support here
|
||||
#[derive(Debug, Deserialize, PartialEq, Serialize)]
|
||||
|
||||
Reference in New Issue
Block a user