zkverifyjs
Version:
Submit proofs to zkVerify and query proof state with ease using our npm package.
26 lines (25 loc) • 1.14 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormatManager = void 0;
const format_1 = require("../../../api/format");
/**
* Manages proof formatting operations.
*/
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 (0, format_1.format)(proofOptions, proof, publicSignals, vk, version, registeredVk);
}
}
exports.FormatManager = FormatManager;