Skip to content

Commit

Permalink
Merge pull request #10 from ChainSafe/willem/librust-js-interface
Browse files Browse the repository at this point in the history
Expose js interface
  • Loading branch information
willemolding authored Sep 4, 2024
2 parents e54e610 + 3cb3304 commit 3ac9c76
Show file tree
Hide file tree
Showing 22 changed files with 1,103 additions and 1,525 deletions.
777 changes: 745 additions & 32 deletions Cargo.lock

Large diffs are not rendered by default.

34 changes: 25 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,40 @@ codegen-units = 1
wasm-opt = ["-O4", "-O4"]

[dependencies]
## Web dependencies
wasm-bindgen = "0.2.84"
js-sys = "0.3.69"
zcash_keys = { git = "https://github.com/zcash/librustzcash", rev = "5a4a3e06dcd2cf5bdf79a7cd48709b58693c65f0", features = ["transparent-inputs", "orchard", "sapling", "unstable"] }
zcash_primitives = { git = "https://github.com/zcash/librustzcash", rev = "5a4a3e06dcd2cf5bdf79a7cd48709b58693c65f0" }
wasm-bindgen-futures = "0.4.42"
web-sys = { version = "0.3.69", features = ["console"] }

## Zcash dependencies
zcash_keys = { git = "https://github.com/ChainSafe/librustzcash", rev = "c30f614ce2d78afebb0ef2587f71851e740ef28d", features = ["transparent-inputs", "orchard", "sapling", "unstable"] }
zcash_client_backend = { git = "https://github.com/ChainSafe/librustzcash", rev = "c30f614ce2d78afebb0ef2587f71851e740ef28d", features = ["lightwalletd-tonic"] }
zcash_client_memory = { git = "https://github.com/ChainSafe/librustzcash", rev = "c30f614ce2d78afebb0ef2587f71851e740ef28d", features = ["orchard"] }
zcash_primitives = { git = "https://github.com/ChainSafe/librustzcash", rev = "c30f614ce2d78afebb0ef2587f71851e740ef28d" }

## gRPC Web dependencies
prost = { version = "0.12", default-features = false }
tonic = { version = "0.12", default-features = false, features = [
"prost",
] }
tonic-web-wasm-client = "0.6.0"

getrandom = { version = "0.2", features = ["js"] }
thiserror = "1.0.63"
console_error_panic_hook = { version = "0.1.7", optional = true }
wasm-bindgen-futures = "0.4.42"
indexed_db_futures = "0.5.0"
web-sys = { version = "0.3.69", features = ["console"] }
sha2 = "0.10"
ripemd = "0.1"
bip0039 = "0.12.0"
secrecy = "0.8.0"
futures-util = "0.3.30"
tracing-web = "0.1.3"
tracing-subscriber = "0.3.18"
tracing = "0.1.40"

[dev-dependencies]
wasm-bindgen-test = "0.3.42"

[build-dependencies]
tonic-build = { version = "0.11", default-features = false, features = [
"prost",
] }
which = "4"
[patch.crates-io]
zip32 = { git = "https://github.com/zcash/zip32.git", branch = "diversifier_index_ord"}
85 changes: 0 additions & 85 deletions build.rs

This file was deleted.

2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build:
wasm-pack build -t web --release --out-dir ./packages/webz-core

test-web:
WASM_BINDGEN_TEST_TIMEOUT=99999 wasm-pack test --release --headless --chrome
WASM_BINDGEN_TEST_TIMEOUT=99999 wasm-pack test --release --firefox

check:
cargo check
3 changes: 2 additions & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[toolchain]
channel = "nightly-2024-08-07"
components = ["rust-src"]
components = ["rust-src"]
targets = ["wasm32-unknown-unknown"]
74 changes: 0 additions & 74 deletions src/account.rs

This file was deleted.

1 change: 1 addition & 0 deletions src/bindgen/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod wallet;
Loading

0 comments on commit 3ac9c76

Please sign in to comment.