import { Circuit } from '../src'; import { SnarkProof, SnarkPublicSignals } from '@unirep/utils'; /** * The default prover that uses the circuits in default built folder `zksnarkBuild/` * @note * :::caution * The keys included are not safe for production use. A phase 2 trusted setup needs to be done before use. * ::: * @example * ```ts * import { Circuit } from '@unirep/circuits' * import prover from '@unirep/circuits/provers/defaultProver' * * await prover.genProofAndPublicSignals(Circuit.signup, { * // circuit inputs * }) * ``` */ export declare const defaultProver: { /** * Generate proof and public signals with `snarkjs.groth16.fullProve` * @param circuitName Name of the circuit, which can be chosen from `Circuit` * @param inputs The user inputs of the circuit * @returns snark proof and public signals */ genProofAndPublicSignals: (circuitName: string | Circuit, inputs: any) => Promise; /** * Verify the snark proof and public signals with `snarkjs.groth16.verify` * @param circuitName Name of the circuit, which can be chosen from `Circuit` * @param publicSignals The snark public signals that are generated from `genProofAndPublicSignals` * @param proof The snark proof that is generated from `genProofAndPublicSignals` * @returns True if the proof is valid, false otherwise */ verifyProof: (circuitName: string | Circuit, publicSignals: SnarkPublicSignals, proof: SnarkProof) => Promise; /** * Get vkey from default built folder `zksnarkBuild/` * @param name Name of the circuit, which can be chosen from `Circuit` * @returns vkey of the circuit */ getVKey: (name: string | Circuit) => Promise; };