Skip to content

Instantly share code, notes, and snippets.

@joeltg
Created November 21, 2021 21:28
Show Gist options
  • Save joeltg/12e960557e27c9dd2c52a9661ddeaf12 to your computer and use it in GitHub Desktop.
Save joeltg/12e960557e27c9dd2c52a9661ddeaf12 to your computer and use it in GitHub Desktop.
TypeScript type declarations for snarkjs
declare namespace snarkjs {
namespace groth16 {
async function fullProve(
input: Record<string, string>,
wasmPath: string,
zkeyPath: string
): Promise<{ publicSignals: string[]; proof: Object }>
async function verify(
verificationKey: any,
publicSignals: string[],
proof: Object
): Promise<boolean>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment