[TODO]
Learn more about wasm-pack
here.
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
wasm-pack build
cd html
npm install
npm start
// Insert a value in the trie
trie.insert("0x00aabb", "0xdeadbeef")
// Commit the changes (run after insert or remove)
trie.commit()
// Remove a value
trie.remove("0x00aabb")
// Remove all values from the trie
trie.clear()
// Get the root node hash
trie.root()
// Return all nodes in the trie
trie.db_values()
// Hash functions
wasm.blake2_128("0xdeadbeef")
wasm.blake2_256("0xdeadbeef")
wasm.twox_128("0xdeadbeef")
wasm.twox_64("0xdeadbeef")