Skip to content

Lohann/substrate-state-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

substrate-state-visualizer

About

[TODO]

🚴 Usage

🐑 Install wasm-pack

Learn more about wasm-pack here.

curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

🛠️ Build with wasm-pack build

wasm-pack build

🔬 Test in the Browser

cd html
npm install
npm start

🎁 Basic Usage

// 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")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published