fadff7888b
* Save gateway owner for later use in erc20 bandwidth request * Pass owner in network monitor * Switch to variable length owner address * Add erc20 bridge contract in validator client * Check bandwidth credential refers to gateway * Check the owner of the gateway from the eth event * Fix wasm client * Hack to avoid unused warning on coconut path * Hacked, one-time payment * Remove print * Update arg format * Fix token check * Fix native template * Use utokens instead of full token ... when talking to eth * Fix parse event for new field * Fix socks5 template * Add estimation of gas call * Make fs backup more reliable * Fix clippy * Fix unused import * Update waiting time * Remove defaults from run, as it they should be set on init * Remove debugging prints * Replaced unwrap with error * Fix build * Make eth contract address dependent of network * Use tokio for sleep * Add approve before spending token on bandwidth * Put bandwidth claim only at the beginning of the process
72 lines
2.3 KiB
TOML
72 lines
2.3 KiB
TOML
[package]
|
|
name = "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 = "0.3"
|
|
json = "0.12.4"
|
|
log = "0.4"
|
|
thiserror = "1.0"
|
|
url = "2.2"
|
|
rand = { version = "0.7.3", features = ["wasm-bindgen"] }
|
|
secp256k1 = "0.20.3"
|
|
web3 = { version = "0.17.0", default-features = false }
|
|
|
|
# internal
|
|
credentials = { path = "../../credentials" }
|
|
crypto = { path = "../../crypto" }
|
|
gateway-requests = { path = "../../../gateway/gateway-requests" }
|
|
nymsphinx = { path = "../../nymsphinx" }
|
|
pemstore = { path = "../../pemstore" }
|
|
coconut-interface = { path = "../../coconut-interface", optional = true }
|
|
network-defaults = { path = "../../network-defaults" }
|
|
|
|
[dependencies.tungstenite]
|
|
version = "0.13"
|
|
default-features = false
|
|
|
|
# non-wasm-only dependencies
|
|
[target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio]
|
|
version = "1.4"
|
|
features = ["macros", "rt", "net", "sync", "time"]
|
|
|
|
[target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio-tungstenite]
|
|
version = "0.14"
|
|
|
|
# wasm-only dependencies
|
|
[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-bindgen]
|
|
version = "0.2"
|
|
|
|
[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-bindgen-futures]
|
|
version = "0.4"
|
|
|
|
[target."cfg(target_arch = \"wasm32\")".dependencies.wasm-utils]
|
|
path = "../../wasm-utils"
|
|
|
|
# only import it in wasm. Prefer proper tokio timer in non-wasm
|
|
[target."cfg(target_arch = \"wasm32\")".dependencies.fluvio-wasm-timer]
|
|
version = "0.2.5"
|
|
|
|
# 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]
|
|
version = "0.2"
|
|
features = ["js"]
|
|
|
|
[dev-dependencies]
|
|
# for tests
|
|
#url = "2.1"
|
|
|
|
[features]
|
|
coconut = ["gateway-requests/coconut", "coconut-interface"]
|
|
wasm = ["web3/wasm", "web3/http", "web3/signing"]
|
|
default = ["web3/default"] |