import { Buffer as e } from "buffer";
import { BN as t } from "@coral-xyz/anchor";
//#region libs/shared/common/src/functions/utils/bytes32.utils.ts
var n = (e) => {
	if (e.length !== 32 || e.some((e) => !Number.isInteger(e) || e < 0 || e >= 256)) throw Error("invalid bytes32 value");
	return e.reduce((e, t) => e * 256n + BigInt(t), 0n);
}, r = (n) => [...new t(n.toString()).toArrayLike(e, "be", 32)];
//#endregion
export { r as convertBigIntToBytes32, n as convertBytes32ToBigInt };
