UNPKG

zkverifyjs

Version:

Submit proofs to zkVerify and query proof state with ease using our npm package.

22 lines (21 loc) 977 B
import { format } from '../../../api/format'; /** * Manages proof formatting operations. */ export class FormatManager { /** * Formats proof details for the specified proof type. * * @param proofOptions - The options for the proof, including type, library, and curve. * @param proof - The proof data to format. * @param publicSignals - The public signals associated with the proof. * @param vk - The verification key to format. * @param version - Optional version of the proving system (e.g., `V1_1`). * @param registeredVk - Optional flag indicating if the verification key is registered. * @returns {Promise<FormattedProofData>} A promise resolving to the formatted proof data. * @throws {Error} - Throws an error if formatting fails. */ async format(proofOptions, proof, publicSignals, vk, version, registeredVk) { return format(proofOptions, proof, publicSignals, vk, version, registeredVk); } }