import { Contract, Signer } from "ethers"; import { Firestore } from "firebase/firestore"; import { Functions } from "firebase/functions"; /** * Formats part of a GROTH16 SNARK proof * @link adapted from SNARKJS p256 function * @param proofPart a part of a proof to be formatted * @returns the formatted proof part */ export declare const p256: (proofPart: any) => any; /** * This function formats the calldata for Solidity * @link adapted from SNARKJS formatSolidityCalldata function * @dev this function is supposed to be called with * @dev the output of generateGROTH16Proof * @param circuitInput Inputs to the circuit * @param _proof Proof * @returns The calldata formatted for Solidity */ export declare const formatSolidityCalldata: (circuitInput: string[], _proof: any) => any; /** * Verify a GROTH16 SNARK proof on chain * @param contract The contract instance * @param proof The calldata formatted for Solidity * @returns > Whether the proof is valid or not */ export declare const verifyGROTH16ProofOnChain: (contract: any, proof: any) => Promise; /** * Compiles a contract given a path * @param contractPath path to the verifier contract * @returns > the compiled contract */ export declare const compileContract: (contractPath: string) => Promise; /** * Deploy the verifier contract * @param contractFactory The contract factory * @returns > The contract instance */ export declare const deployVerifierContract: (contractPath: string, signer: Signer) => Promise; /** * Verify a ceremony validity * 1. Download all artifacts * 2. Verify that the zkeys are valid * 3. Extract the verifier and the vKey * 4. Generate a proof and verify it locally * 5. Deploy Verifier contract and verify the proof on-chain * @param functions firebase functions instance * @param firestore firebase firestore instance * @param ceremonyPrefix ceremony prefix * @param outputDirectory output directory where to store the ceremony artifacts * @param circuitInputsPath path to the circuit inputs file * @param verifierTemplatePath path to the verifier template file * @param signer signer for contract interaction * @param logger logger for printing snarkjs output */ export declare const verifyCeremony: (functions: Functions, firestore: Firestore, ceremonyPrefix: string, outputDirectory: string, circuitInputsPath: string, verifierTemplatePath: string, signer: Signer, logger?: any) => Promise; //# sourceMappingURL=contracts.d.ts.map