import { getCustomProofGenerator as e } from "../utils/customEnclaveFunctionsRegister.mjs";
import { Logger as t } from "../../error-handling/logger.mjs";
import { getWASMFile as n, getZKeyFile as r } from "./getZKFiles.mjs";
import { generateZkProofEnclave as i } from "./generateZkProofEnclave.mjs";
import { generateZkProofSelf as a } from "./generateZkProofSelf.mjs";
//#region libs/shared/common/src/functions/snarkjs/generateZkProof.ts
var o = async (o, s, c, l) => {
	if (l) try {
		let t = e();
		if (t) {
			let { zkCallData: e, publicSignals: i } = await t(c, n(s, o), r(s, o));
			return {
				zkCallData: e,
				publicSignals: i
			};
		}
		return await i(o, s, c);
	} catch (e) {
		t.error("enclave proof error", e);
	}
	return a(o, s, c);
};
//#endregion
export { o as generateZkProof };
