Skip to content

Commit

Permalink
Add VerifiedCapsuleFrag::unverify() to WASM bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
fjarri committed Jan 17, 2023
1 parent d94dff1 commit f882059
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions umbral-pre/src/bindings_wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,10 @@ pub struct VerifiedCapsuleFrag(umbral_pre::VerifiedCapsuleFrag);

#[wasm_bindgen]
impl VerifiedCapsuleFrag {
pub fn unverify(&self) -> CapsuleFrag {
CapsuleFrag(self.0.clone().unverify())
}

#[wasm_bindgen(js_name = toBytes)]
pub fn to_bytes(&self) -> Result<Box<[u8]>, Error> {
self.0.to_bytes().map_err(map_js_err)
Expand Down

0 comments on commit f882059

Please sign in to comment.