mirror of https://github.com/status-im/rln.git
add circuit parameter export endpoint for wasm
This commit is contained in:
parent
fefbed2958
commit
ae5f8859c6
|
@ -4,4 +4,5 @@
|
||||||
node_modules
|
node_modules
|
||||||
*.key
|
*.key
|
||||||
Cargo.lock
|
Cargo.lock
|
||||||
.cargo
|
.cargo
|
||||||
|
tmp_wasm
|
|
@ -102,6 +102,15 @@ impl RLNWasm {
|
||||||
.expect("failed to write verifier key");
|
.expect("failed to write verifier key");
|
||||||
Ok(output)
|
Ok(output)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[wasm_bindgen]
|
||||||
|
pub fn export_circuit_parameters(&self) -> Result<Vec<u8>, JsValue> {
|
||||||
|
let mut output: Vec<u8> = Vec::new();
|
||||||
|
self.circuit_parameters
|
||||||
|
.write(&mut output)
|
||||||
|
.expect("failed to write verifier key");
|
||||||
|
Ok(output)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
Loading…
Reference in New Issue