import { MERKLE_LEVELS as e } from "../../constants/protocol.constants.mjs";
import { poseidonFunction as t } from "../../crypto/poseidon.mjs";
import { MerkleTree as n } from "../../data-structures/merkle-tree/MerkleTree.mjs";
//#region libs/shared/common/src/functions/utils/merkleTree.utils.ts
var r = (e) => new Map(Object.entries(e).map(([e, t]) => [BigInt(e), BigInt(t)])), i = (i) => {
	let a = r(i.tree), o = i.reverseTree ? r(i.reverseTree) : void 0;
	return n.createWithData(a, o, BigInt(i.index), BigInt(i.count), t, e, 0n);
};
//#endregion
export { i as contructMerkleTreeFromSerialized };
