diff --git a/Cargo.lock b/Cargo.lock index cec40d17..48c687fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -599,8 +599,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -1670,6 +1672,7 @@ dependencies = [ "auto_impl", "ethereum-types", "flate2", + "getrandom", "log", "reqwest", "serde", @@ -1691,6 +1694,7 @@ dependencies = [ "auto_impl", "crypto-bigint", "eth-keystore", + "getrandom", "rand", "starknet-core", "starknet-crypto", diff --git a/starknet-providers/Cargo.toml b/starknet-providers/Cargo.toml index 8b07832d..67b03cff 100644 --- a/starknet-providers/Cargo.toml +++ b/starknet-providers/Cargo.toml @@ -28,6 +28,9 @@ serde_json = "1.0.96" serde_with = "2.3.2" starknet-types-core = { version = "0.1.1", default-features = false , features = ["serde", "curve"] } +[target.'cfg(target_arch = "wasm32")'.dependencies] +getrandom = { version = "0.2.9", features = ["js"] } + [dev-dependencies] starknet-providers = { path = ".", features = ["no_unknown_fields"] } tokio = { version = "1.27.0", features = ["full"] } diff --git a/starknet-signers/Cargo.toml b/starknet-signers/Cargo.toml index 6e5cf81f..d3228dfa 100644 --- a/starknet-signers/Cargo.toml +++ b/starknet-signers/Cargo.toml @@ -25,5 +25,8 @@ starknet-types-core = { version = "0.1.1", default-features = false, features = [target.'cfg(not(target_arch = "wasm32"))'.dependencies] eth-keystore = { version = "0.5.0", default-features = false } +[target.'cfg(target_arch = "wasm32")'.dependencies] +getrandom = { version = "0.2.9", features = ["js"] } + [target.'cfg(target_arch = "wasm32")'.dev-dependencies] wasm-bindgen-test = "0.3.34"