feat(wasm): expose presentation verifying key

This commit is contained in:
sinu
2024-10-01 19:31:56 -07:00
committed by Hendrik Eeckhaut
parent dfc162929d
commit b724d6a1d2

View File

@@ -243,6 +243,11 @@ pub struct Presentation(tlsn_core::presentation::Presentation);
#[wasm_bindgen]
impl Presentation {
/// Returns the verifying key.
pub fn verifying_key(&self) -> VerifyingKey {
self.0.verifying_key().into()
}
/// Verifies the presentation.
pub fn verify(&self) -> Result<PresentationOutput, JsError> {
let provider = CryptoProvider::default();