https://github.com/nervosnetwork/sparse-merkle-tree A quick way is to use WASM, like: https://github.com/joii2020/smt-wasm/tree/master