@polkadot/trie-db
An Implementation of the Ethereum Merkle Patricia Tree that uses Blake2 for hashing.
Adapted from Ethereum
The has been adapted from the original EthereumJs implementation with the following changes -
- Introduce TypeScript into the mix
- ES6-ify as applicable (Classes,
self
->this
,function() {}
->() => {}
) - Moves to a Promise-based interface (as applicable)
- Support only Uint8Array key/values (Buffer/String in the original)
- Use utilities from @polkadot/util
- Supports blake2 hashing (sha3 in the original), aligning with the Polkadot tech stack)
- Updated the build steps with sources moved to src/
- Tests updated to use Jest
- Upgrade interfaces to latest levelup
- Removed the secure interface (not applicable for Substrate chains)
... well at least the above is the idea behind the fork ...