Skip to content

Commit

Permalink
Add noah init wasm (#941)
Browse files Browse the repository at this point in the history
  • Loading branch information
findora-sun authored and shiran555 committed May 17, 2023
1 parent e5b04ae commit a301d19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
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

0 comments on commit a301d19

Please sign in to comment.