Feat: add an endpoint that uses dir-go wasm to generate a proof. - #2
Closed
0xMugen wants to merge 5 commits into
Closed
Feat: add an endpoint that uses dir-go wasm to generate a proof. #20xMugen wants to merge 5 commits into
0xMugen wants to merge 5 commits into
Conversation
Contributor
|
Closing in favor of #3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new Go-based Groth16 proof generation feature for the SDK, including a custom React hook, integration and unit tests, development environment setup, and workspace configuration. The most important changes are grouped below by theme:
Go Proof Generation Feature
useGoProofReact hook inreact/src/useGoProof.ts, which loads a Go WASM prover, exposes agenerateProoffunction, and manages prover state. This includes TypeScript interfaces for Groth16 proof structures and witness data. ([react/src/useGoProof.tsR1-R133](https://github.com/mistcash/sdk/pull/2/files#diff-1a693f65e9b66cd69559a4aaf723f5e598f28a56b022d43320c64292f4158989R1-R133))useGoProofhook fromreact/src/index.tsfor use in external projects. ([react/src/index.tsR2](https://github.com/mistcash/sdk/pull/2/files#diff-16ffa9feb0208f3a8b311e206274cc227173b52477e6bc8fda8c011c814cd613R2))Testing
react/tests/useGoProof.integration.test.jsto validate real Groth16 proof generation using actual WASM and witness data. ([react/tests/useGoProof.integration.test.jsR1-R111](https://github.com/mistcash/sdk/pull/2/files#diff-55c78bee1b107d5e43ee712e1e89886297c9dd60147455c3e0af94b1bde75479R1-R111))react/tests/useGoProof.test.tsxto mock and verify the behavior of theuseGoProofhook, including error handling and state management. ([react/tests/useGoProof.test.tsxR1-R156](https://github.com/mistcash/sdk/pull/2/files#diff-a5796c69730677357dd399b64bee9d1b216170b4fad60f3d9ca88abb51d142aeR1-R156))Development Environment & Workspace
flake.nixto provide a reproducible Nix-based development environment with Node.js and pnpm for the SDK. ([flake.nixR1-R24](https://github.com/mistcash/sdk/pull/2/files#diff-206b9ce276ab5971a2489d75eb1b12999d4bf3843b7988cbe8d687cfde61dea0R1-R24))Nix is niec of dependency management.
Testing Configuration
jestconfiguration. Tbh this is the only way I could get the testing to work. I'm not familiar with jest