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

Add init noah wasm32 #941

Merged
merged 1 commit into from
Apr 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ rand_core = { version = "0.6", default-features = false, features = ["alloc"] }
serde = { version = "1.0.124", features = ["derive"] }
serde_json = "1.0"
wasm-bindgen = { version = "=0.2.84", features = ["serde-serialize"] }
wasm-bindgen-futures = "^0.4.34"
fbnc = { version = "0.2.9", default-features = false}

ring = "0.16.19"
Expand Down
7 changes: 7 additions & 0 deletions src/components/wasm/src/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ use {
/// against.
const BUILD_ID: &str = concat!(env!("VERGEN_SHA_SHORT"), " ", env!("VERGEN_BUILD_DATE"));

/// Init noah anon xfr
#[cfg(target_arch = "wasm32")]
#[wasm_bindgen]
pub async fn init_noah() -> Result<(), JsValue> {
zei::noah_api::anon_xfr::init_anon_xfr().await
}

#[wasm_bindgen]
/// Returns the git commit hash and commit date of the commit this library was built against.
pub fn build_id() -> String {
Expand Down