From ce7d280c46173297b0d123b54bac6e57e9f9cc36 Mon Sep 17 00:00:00 2001 From: derekpierre Date: Wed, 16 Aug 2023 15:43:44 -0400 Subject: [PATCH 1/3] DkgPublicKey wasm-binding now derives From and AsRef. --- ferveo/src/bindings_wasm.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ferveo/src/bindings_wasm.rs b/ferveo/src/bindings_wasm.rs index e686f8a9..e590327e 100644 --- a/ferveo/src/bindings_wasm.rs +++ b/ferveo/src/bindings_wasm.rs @@ -317,6 +317,10 @@ pub fn decrypt_with_shared_secret( type InnerDkgPublicKey = api::DkgPublicKey; #[wasm_bindgen] +#[derive( + derive_more::From, + derive_more::AsRef, +)] pub struct DkgPublicKey(InnerDkgPublicKey); generate_equals!(DkgPublicKey); From 2c1288b1adb983fdb432490d0a64a9a7cd929d76 Mon Sep 17 00:00:00 2001 From: derekpierre Date: Mon, 21 Aug 2023 08:55:14 -0400 Subject: [PATCH 2/3] Appease linter. --- ferveo/src/bindings_wasm.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ferveo/src/bindings_wasm.rs b/ferveo/src/bindings_wasm.rs index e590327e..3b582ba8 100644 --- a/ferveo/src/bindings_wasm.rs +++ b/ferveo/src/bindings_wasm.rs @@ -317,10 +317,7 @@ pub fn decrypt_with_shared_secret( type InnerDkgPublicKey = api::DkgPublicKey; #[wasm_bindgen] -#[derive( - derive_more::From, - derive_more::AsRef, -)] +#[derive(derive_more::From, derive_more::AsRef)] pub struct DkgPublicKey(InnerDkgPublicKey); generate_equals!(DkgPublicKey); From c3fe68a3214b398db617e687e5244371661a77f7 Mon Sep 17 00:00:00 2001 From: derekpierre Date: Tue, 22 Aug 2023 14:25:40 -0400 Subject: [PATCH 3/3] SharedSecret wasm-binding now derives AsRef. --- ferveo/src/bindings_wasm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ferveo/src/bindings_wasm.rs b/ferveo/src/bindings_wasm.rs index 3b582ba8..a8b1f7c7 100644 --- a/ferveo/src/bindings_wasm.rs +++ b/ferveo/src/bindings_wasm.rs @@ -273,7 +273,7 @@ pub fn ferveo_encrypt( } #[wasm_bindgen] -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Clone, Debug, Serialize, Deserialize, derive_more::AsRef)] pub struct SharedSecret(api::SharedSecret); generate_common_methods!(SharedSecret);