import { Firestore } from "firebase/firestore"; import { Functions } from "firebase/functions"; import { CeremonyArtifacts } from "../types/index"; /** * Verify that a zKey is valid * @param r1csLocalFilePath path to the r1cs file * @param zkeyLocalPath path to the zKey file * @param potLocalFilePath path to the PoT file * @param logger logger instance * @returns true if the zKey is valid, false otherwise */ export declare const verifyZKey: (r1csLocalFilePath: string, zkeyLocalPath: string, potLocalFilePath: string, logger?: any) => Promise; /** * Generates a GROTH16 proof * @param circuitInput Input to the circuit * @param zkeyFilePath Path to the proving key * @param wasmFilePath Path to the compiled circuit * @param logger Optional logger * @returns > The proof */ export declare const generateGROTH16Proof: (circuitInput: object, zkeyFilePath: string, wasmFilePath: string, logger?: any) => Promise; /** * Verifies a GROTH16 proof * @param verificationKeyPath Path to the verification key * @param publicSignals Public signals * @param proof Proof * @returns > Whether the proof is valid or not */ export declare const verifyGROTH16Proof: (verificationKeyPath: string, publicSignals: object, proof: object) => Promise; /** * Helper method to extract the Solidity verifier * from a final zKey file and save it to a local file. * @param finalZkeyPath The path to the zKey file. * @return The Solidity verifier code. */ export declare const exportVerifierContract: (finalZkeyPath: string, templatePath: string) => Promise; /** * Helpers method to extract the vKey from a final zKey file * @param finalZkeyPath The path to the zKey file. * @return The vKey. */ export declare const exportVkey: (finalZkeyPath: string) => Promise; /** * Helper method to extract the Solidity verifier and the Verification key * from a final zKey file and save them to local files. * @param finalZkeyPath The path to the zKey file. * @param verifierLocalPath The path to the local file where the verifier will be saved. * @param vKeyLocalPath The path to the local file where the vKey will be saved. * @param templatePath The path to the template file. */ export declare const exportVerifierAndVKey: (finalZkeyPath: string, verifierLocalPath: string, vKeyLocalPath: string, templatePath: string) => Promise; /** * Generate a zKey from scratch (useful to compute either the genesis or final zKey) * @param isFinalizing Whether the ceremony is finalizing or not * @param r1csLocalPath The path to the local r1cs file * @param potLocalPath The path to the local pot file * @param zkeyLocalPath The path to save the generated zKey * @param logger The logger instance * @param finalContributionZKeyLocalPath The path to the local zkey file of the final contribution (only for final zKey) * @param coordinatorIdentifier The identifier of the coordinator (only for final zKey) * @param beacon The beacon value for the last contribution (only for final zKey) */ export declare const generateZkeyFromScratch: (isFinalizing: boolean, r1csLocalPath: string, potLocalPath: string, zkeyLocalPath: string, logger: any, finalContributionZKeyLocalPath?: string, coordinatorIdentifier?: string, beacon?: string) => Promise; /** * Helper function used to compare two ceremony artifacts * @param firebaseFunctions Firebase functions object * @param localPath1 Local path to store the first artifact * @param localPath2 Local path to store the second artifact * @param storagePath1 Storage path to the first artifact * @param storagePath2 Storage path to the second artifact * @param bucketName1 Bucket name of the first artifact * @param bucketName2 Bucket name of the second artifact * @param cleanup Whether to delete the downloaded files or not * @returns > true if the hashes match, false otherwise */ export declare const compareCeremonyArtifacts: (firebaseFunctions: Functions, localPath1: string, localPath2: string, storagePath1: string, storagePath2: string, bucketName1: string, bucketName2: string, cleanup: boolean) => Promise; /** * Given a ceremony prefix, download all the ceremony artifacts * @param functions firebase functions instance * @param firestore firebase firestore instance * @param ceremonyPrefix ceremony prefix * @param outputDirectory output directory where to * @returns > array of ceremony artifacts */ export declare const downloadAllCeremonyArtifacts: (functions: Functions, firestore: Firestore, ceremonyPrefix: string, outputDirectory: string) => Promise; /** * Fetch the final contribution beacon from Firestore * @param firestore firebase firestore instance * @param ceremonyId ceremony id * @param circuitId circuit id * @param participantId participant id * @returns > final contribution beacon */ export declare const getFinalContributionBeacon: (firestore: Firestore, ceremonyId: string, circuitId: string, participantId: string) => Promise; //# sourceMappingURL=verification.d.ts.map