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