f328f3fa9e
* Squashing all the changes initial router started expanding the API initial empty openapi/swagger populated build-info endpoint wip: populating rest of swagger missing swagger data + using closure capture for immutable state running the api as a proper task in gateway 'run' fixing some version/feature clashes refactored routes structures initial host information endpoint expanded on gateway-related endpoints signing host information moved all models to separate crate unified http api client routes unification + node api client new generic cache and refresher nym-api caching node self described information removed old cache type temporarily wired up NymContractCache to NodeDescriptionProvider caching self reported host info clients using self-described gateway information fixed request timeouts for wasm fixed wasm builds post rebase fixes cargo fmt brought in wg routes into nym-node router added ErrorResponse for wireguard routes basic swagger support for wg endpoints turns out swagger can be happy with strongly typed requests output type support for wg routes using concrete error type for nym node request error fixed the registration test landing page configurability increased configurability fixed build and lints of other crates added default user-agent to http-api-client reduced severity of gateway details lookup failure changed default http port from 80 to 8080 nym-api using new default port for queries added health endpoint nym-api trying multiple ports for the client using camelcase for node status corrected health endpoint description restored and revamped 'force_tls' flag to filter all gateways that support the wss protocol fixed 'pub_key' path param in open api schema derived Debug on 'NymNodeDescription' ensuring valid public ips added init and run flags to set hostname and public ips fixed listening address being pushed to public ip fixed the positional local flag logging remote ip address of the request updated helper function to query for described gateways enabled tls in gateway client removed hack-opts from mix fetch additional changes after rebasing against origin/develop * clippy * wasm-related target locking * more clippy, but this time in tests
86 lines
2.9 KiB
TOML
86 lines
2.9 KiB
TOML
[package]
|
|
name = "nym-gateway-client"
|
|
version = "0.1.0"
|
|
authors = ["Jędrzej Stuczyński <andrew@nymtech.net>"]
|
|
edition = "2021"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[dependencies]
|
|
# TODO: (for this and other crates), similarly to 'tokio', import only required "futures" modules rather than
|
|
# the entire crate
|
|
futures = { workspace = true }
|
|
log = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
url = { workspace = true }
|
|
rand = { version = "0.7.3", features = ["wasm-bindgen"] }
|
|
tokio = { version = "1.24.1", features = ["macros"] }
|
|
|
|
# internal
|
|
nym-bandwidth-controller = { path = "../../bandwidth-controller" }
|
|
nym-coconut-interface = { path = "../../coconut-interface" }
|
|
nym-credential-storage = { path = "../../credential-storage" }
|
|
nym-crypto = { path = "../../crypto" }
|
|
nym-gateway-requests = { path = "../../../gateway/gateway-requests" }
|
|
nym-network-defaults = { path = "../../network-defaults" }
|
|
nym-sphinx = { path = "../../nymsphinx" }
|
|
nym-pemstore = { path = "../../pemstore" }
|
|
nym-validator-client = { path = "../validator-client", default-features = false }
|
|
nym-task = { path = "../../task" }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
|
|
|
|
[dependencies.tungstenite]
|
|
workspace = true
|
|
default-features = false
|
|
|
|
# non-wasm-only dependencies
|
|
[target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio]
|
|
workspace = true
|
|
features = ["macros", "rt", "net", "sync", "time"]
|
|
|
|
[target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio-stream]
|
|
version = "0.1.11"
|
|
features = ["net", "sync", "time"]
|
|
|
|
[target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio-tungstenite]
|
|
workspace = true
|
|
# the choice of this particular tls feature was arbitrary;
|
|
# if you reckon a different one would be more appropriate, feel free to change it
|
|
features = ["native-tls"]
|
|
|
|
# wasm-only dependencies
|
|
[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-bindgen]
|
|
workspace = true
|
|
|
|
[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-bindgen-futures]
|
|
workspace = true
|
|
|
|
[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-utils]
|
|
path = "../../wasm/utils"
|
|
features = ["websocket"]
|
|
|
|
[target."cfg(target_arch = \"wasm32\")".dependencies.gloo-utils]
|
|
workspace = true
|
|
|
|
# only import it in wasm. Prefer proper tokio timer in non-wasm
|
|
[target."cfg(target_arch = \"wasm32\")".dependencies.wasmtimer]
|
|
workspace = true
|
|
features = ["tokio"]
|
|
|
|
# this is due to tungstenite using `rand` 0.8 and associated changes in `getrandom` crate
|
|
# which now does not support wasm32-unknown-unknown target by default.
|
|
# using the below, we assume our client is going to be run in environment
|
|
# containing javascript (such as a web browser or node.js).
|
|
# refer to https://docs.rs/getrandom/0.2.2/getrandom/#webassembly-support for more information
|
|
[target."cfg(target_arch = \"wasm32\")".dependencies.getrandom]
|
|
workspace = true
|
|
features = ["js"]
|
|
|
|
[dev-dependencies]
|
|
# for tests
|
|
#url = "2.1"
|
|
|
|
[features]
|
|
wasm = []
|