import { CIRCOM_P as e } from "../../constants/protocol.constants.mjs";
import { calcAmountChanges as t } from "../snarkjs/common.snarkjs.mjs";
import { isEqual as n } from "lodash";
//#region libs/shared/common/src/functions/pre-transaction/ensureAmountChanges.ts
var r = (r, i, a) => {
	let o = t(r, i), s = a.map((t) => t < 0n ? e + t : t);
	if (o.length !== s.length || !n(o, s)) throw Error("Amount changes are not equal");
};
//#endregion
export { r as ensureAmountChanges };
