Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

feat: wasm bindgens #7

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

feat: wasm bindgens #7

wants to merge 8 commits into from

Conversation

0xWOLAND
Copy link
Contributor

New Functions

  1. wasm_verify_groth16

    • Verifies a Groth16 proof
    • Input:
      • proof: &[u8] - The proof as a byte slice
      • vk: &[u8] - The verification key as a byte slice
      • public_inputs: &[u8] - The public inputs bytes. This must be a concatenated array big-endian 32-byte segments representing scalar field elements
    • Output: Result<bool, JsValue>
      • Returns true if the proof is valid, false otherwise
      • Returns a JsValue with an error message on failure
  2. wasm_verify_plonk

    • Verifies a Plonk proof
    • Input:
      • proof: &[u8] - The proof as a byte slice
      • vk: &[u8] - The verification key as a byte slice
      • public_inputs: &[u8] - The public inputs bytes. This must be a concatenated array big-endian 32-byte segments representing scalar field elements
    • Output: Result<bool, JsValue>
      • Returns true if the proof is valid, false otherwise
      • Returns a JsValue with an error message on failure

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant