[package] name = "gateway-client" version = "0.1.0" authors = ["Jędrzej Stuczyński "] 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 } async-trait = { version = "0.1.51" } # 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" } validator-client = { path = "../validator-client", optional = true } [dependencies.tungstenite] version = "0.13" default-features = false # non-wasm-only dependencies [target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio] version = "1.19.1" features = ["macros", "rt", "net", "sync", "time"] [target."cfg(not(target_arch = \"wasm32\"))".dependencies.tokio-tungstenite] version = "0.14" [target."cfg(not(target_arch = \"wasm32\"))".dependencies.credential-storage] path = "../../credential-storage" # 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", "validator-client", "credentials/coconut"] wasm = ["web3/wasm", "web3/http", "web3/signing"] default = ["web3/default"]