-
Notifications
You must be signed in to change notification settings - Fork 42
build a javascript interface #15
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
Comments
Hi, |
is the repo still active? .I am planning to use the rust library , I am new to rust but it looks like it can be converted to wasm ,any guidance on how? |
very much active yes! |
Are there any steps to run the rust code? I cloned the repo and installed rust.I created a sample.rs file with the code provided in readme. How to to run this file I tried rustc,cargo build,cargo run. am I missing any step? |
|
I had run cargo test and tests pass, What I wanted to know is how do I use the code provided as sample : use curv::arithmetic::traits::{Converter, Samplable};
|
just take the code from the tests "as is". |
We have ped com for a secret value below: |
ofcourse it allow to subtract: |
I had tried that earlier,I get the following error no method named For the code: |
looks like you are trying to subtract vectors of points instead of points. you should subtract elements of the vectors |
@omershlo Thanks I will try that. @vhnatyk when I try to build wasm i get the following error not all trait items implemented, missing: error[E0046]: not all trait items implemented, missing: An investigation revealed it was due to this: Anyway I can proceed? |
Hi @pranavkirtani88 - yep, there two ways to proceed with crates that don't support wasm - either to replace them or to make them work with wasm 🙂 Seems rustc-serialize is deprecated (may be wasm support is among top reasons) according to this Not sure about bulletproofs - but I implemented wasm support for emerald city in my fork. Reason PR was not submitted is that constant time safety is sort of an issue for pure rust crates and for wasm as well. It's not something severe, but definitely worth keeping in mind regarding security. The bitcoin's secp256k1 crate got wasm support btw - so that branch is stale since uses pure rust libsecp256k1 crate, that is not well maintained anymore. But from the point of wasm it's fully functional and can give valid ideas how to proceed - like replacing with serde etc. |
No description provided.
The text was updated successfully, but these errors were encountered: