Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with ferveo crate #53

Merged
merged 12 commits into from
May 29, 2023

Conversation

piotr-roslaniec
Copy link
Contributor

@piotr-roslaniec piotr-roslaniec commented May 22, 2023

@fjarri
Copy link
Contributor

fjarri commented May 22, 2023

Is it possible to make submodules somehow? Is it a thing in JS?

@piotr-roslaniec
Copy link
Contributor Author

Yes, you can implement modules in JS. For example, you can group your exports like this:

// my-module.js
export { MyClass, myFunction };

// run.js
import myModule from 'myModule'
myModule.myFunction();
const { MyClass } = myModule;

I'm not sure how to do it in nucypher-core-wasm yet, but I will give it a go.

@codecov-commenter
Copy link

codecov-commenter commented May 23, 2023

Codecov Report

Merging #53 (a4f4575) into main (03b7ba0) will increase coverage by 0.01%.
The diff coverage is 28.00%.

@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
+ Coverage   15.24%   15.25%   +0.01%     
==========================================
  Files          16       16              
  Lines        2841     2845       +4     
==========================================
+ Hits          433      434       +1     
- Misses       2408     2411       +3     
Impacted Files Coverage Δ
nucypher-core-python/src/lib.rs 0.11% <0.00%> (-0.01%) ⬇️
nucypher-core-wasm/src/lib.rs 0.12% <0.00%> (ø)
nucypher-core/src/lib.rs 100.00% <ø> (ø)
nucypher-core/src/node_metadata.rs 0.00% <ø> (ø)
nucypher-core/src/dkg.rs 92.53% <100.00%> (+0.03%) ⬆️

@piotr-roslaniec
Copy link
Contributor Author

halp

@piotr-roslaniec
Copy link
Contributor Author

Ok, I just realized this is a known issue:
https://github.com/fjarri/wasm-bindgen-derive/blame/955ed47bef0806fc5eb08a9d011f4bce10b7cf16/wasm-bindgen-derive/src/lib.rs#L269

Should be fixed by updating wasm-bindgen-derive and wasm-bindgen consistently across all Rust crates.

@piotr-roslaniec
Copy link
Contributor Author

Hi @derekpierre, just wanted to check in with you. Are there any other TODOs that should be covered here?

@derekpierre
Copy link
Member

derekpierre commented May 25, 2023

Hi @derekpierre, just wanted to check in with you. Are there any other TODOs that should be covered here?

Perhaps this one as well? https://github.com/piotr-roslaniec/nucypher-core/blob/ferveo-types/nucypher-core/src/lib.rs#L51. Also adding @KPrasch as a reviewer.

--

Do these changes need an related update on the nucypher/nucypher python side of things?

@piotr-roslaniec piotr-roslaniec marked this pull request as ready for review May 25, 2023 16:28
@@ -647,7 +649,7 @@ impl ThresholdDecryptionRequest {
pub fn new(
ritual_id: u16,
variant: u8,
ciphertext: &[u8], // TODO use ferveo Ciphertext type
ciphertext: &Ciphertext,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is supremely satisfying to see!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Copy link
Member

@derekpierre derekpierre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

Integrate and re-export ferveo for public API
5 participants