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
|
@ -5,3 +5,4 @@ node_modules
|
|||
*.key
|
||||
Cargo.lock
|
||||
.cargo
|
||||
tmp_wasm
|
|
@ -102,6 +102,15 @@ impl RLNWasm {
|
|||
.expect("failed to write verifier key");
|
||||
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)]
|
||||
|
|
Loading…
Reference in New Issue