UNPKG

zkverifyjs

Version:

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

19 lines (18 loc) 812 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OptimisticVerificationBuilder = void 0; class OptimisticVerificationBuilder { constructor(executeOptimisticVerify, proofOptions) { this.executeOptimisticVerify = executeOptimisticVerify; this.proofOptions = proofOptions; } /** * Executes the optimistic verification process. * @param {VerifyInput} input - Input for the verification, either proofData or an extrinsic. * @returns {Promise<{ success: boolean; message: string }>} Resolves with an object indicating success or failure and any message. */ async execute(input) { return this.executeOptimisticVerify(this.proofOptions, input); } } exports.OptimisticVerificationBuilder = OptimisticVerificationBuilder;