const bigInt = require("snarkjs").bigInt; class SMTMemDb { constructor() { this.nodes = {}; this.root = bigInt(0); } async getRoot() { return this.root; } _key2str(k) { // const keyS = bigInt(key).leInt2Buff(32).toString("hex"); const keyS = bigInt(k).toString(); return keyS; } _normalize(n) { for (let i=0; i