const e=require(`../../constants/protocol.constants.cjs`),t=require(`../../crypto/poseidon.cjs`),n=require(`../../data-structures/merkle-tree/MerkleTree.cjs`);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.MerkleTree.createWithData(a,o,BigInt(i.index),BigInt(i.count),t.poseidonFunction,e.MERKLE_LEVELS,0n)};exports.contructMerkleTreeFromSerialized=i;