Closed GopherJ closed 9 months ago
but @ethereumjs/trie matches:
import {bytesToUtf8, utf8ToBytes} from "@ethereumjs/util";
import {hexlify} from "ethers/lib/utils";
const trie = await Trie.create();
await trie.put(utf8ToBytes("abc"), utf8ToBytes("123"));
await trie.put(utf8ToBytes("abcd"), utf8ToBytes("abcd"));
await trie.put(utf8ToBytes("abc"), utf8ToBytes("abc"));
console.log("Merkle Root:", hexlify(trie.root()));
Hello @GopherJ
This library is designed to build "userspace" merkle tree that are verified onchain using this library. It is designed to match (as best as possible) this package, that we used to recommend.
This library is NOT about Patricia Merkle trees.
ok, my bad thanks
versus: