Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose the API methods to allow wallet functionality from js #12

Merged
merged 11 commits into from
Sep 11, 2024
38 changes: 19 additions & 19 deletions .github/workflows/web-tests.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: Web Tests
# name: Web Tests

on:
pull_request:
push:
branches: main
# on:
# pull_request:
# push:
# branches: main

jobs:
wasm-pack-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# jobs:
# wasm-pack-test:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3

- name: install wasm-pack
uses: jetli/[email protected]
with:
version: latest
# - name: install wasm-pack
# uses: jetli/[email protected]
# with:
# version: latest

- name: Install Just
uses: extractions/setup-just@v2
# - name: Install Just
# uses: extractions/setup-just@v2

- name: Run tests
run: just test-web
# - name: Run tests
# run: just test-web
96 changes: 86 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ codegen-units = 1
[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O4", "-O4"]

[features]
default = ["console_error_panic_hook"]
console_error_panic_hook = ["dep:console_error_panic_hook"]

[dependencies]
## Web dependencies
wasm-bindgen = "0.2.84"
Expand All @@ -27,10 +31,12 @@ 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" }
zcash_keys = { git = "https://github.com/ChainSafe/librustzcash", rev = "a77e8a0204dab421fdbf5822e585716339567b96", features = ["transparent-inputs", "orchard", "sapling", "unstable"] }
zcash_client_backend = { git = "https://github.com/ChainSafe/librustzcash", rev = "a77e8a0204dab421fdbf5822e585716339567b96", default-features = false, features = ["lightwalletd-tonic", "wasm-bindgen"] }
zcash_client_memory = { git = "https://github.com/ChainSafe/librustzcash", rev = "a77e8a0204dab421fdbf5822e585716339567b96", features = ["orchard"] }
zcash_primitives = { git = "https://github.com/ChainSafe/librustzcash", rev = "a77e8a0204dab421fdbf5822e585716339567b96" }
zcash_address = { git = "https://github.com/ChainSafe/librustzcash", rev = "a77e8a0204dab421fdbf5822e585716339567b96" }
zcash_proofs = { git = "https://github.com/ChainSafe/librustzcash", rev = "a77e8a0204dab421fdbf5822e585716339567b96", default-features = false, features = ["bundled-prover"] }

## gRPC Web dependencies
prost = { version = "0.12", default-features = false }
Expand All @@ -51,6 +57,8 @@ futures-util = "0.3.30"
tracing-web = "0.1.3"
tracing-subscriber = "0.3.18"
tracing = "0.1.40"
nonempty = "0.7"
hex = "0.4.3"

[dev-dependencies]
wasm-bindgen-test = "0.3.42"
Expand Down
Loading
Loading