This is an implementation of the modified merkle patricia tree as specified in the Ethereum's yellow paper.
JavaScript
Latest commit 828febf Mar 2, 2016 @wanderer wanderer 2.1.2
Permalink
Failed to load latest commit information.
benchmarks lint Feb 5, 2016
dist bump deps Jan 6, 2016
docs Update index.md Jan 5, 2016
test added karma Jan 5, 2016
.gitignore meta - add gitignore Jun 16, 2015
.gitmodules fixed deletion error May 26, 2014
.travis.yml added karma Jan 5, 2016
README.md Update README.md Jan 5, 2016
baseTrie.js fix formating Jan 5, 2016
checkpoint-interface.js updated docs Jan 5, 2016
index.js standard js Sep 20, 2015
karma.conf.js added karma Jan 5, 2016
package.json 2.1.2 Mar 1, 2016
readStream.js standard js Sep 20, 2015
secure-interface.js standard js Sep 20, 2015
secure.js updated docs Jan 5, 2016
trieNode.js added encoding test Sep 23, 2015
util.js standard js Sep 20, 2015

README.md

SYNOPSIS

NPM Package Build Status Coverage Status Gitter or #ethereumjs on freenode

js-standard-style

This is an implementation of the modified merkle patricia tree as specified in the Ethereum's yellow paper.

The modified Merkle Patricia tree (trie) provides a persistent data structure to map between arbitrary-length binary data (byte arrays). It is defined in terms of a mutable data structure to map between 256-bit binary fragments and arbitrary-length binary data. The core of the trie, and its sole requirement in terms of the protocol specification is to provide a single 32-byte value that identifies a given set of key-value pairs.
- Ethereum's yellow paper

The only backing store supported is LevelDB through the levelup module.

INSTALL

npm install merkle-patricia-tree

USAGE

var Trie = require('merkle-patricia-tree'),
levelup = require('levelup'),
db = levelup('./testdb'),
trie = new Trie(db); 

trie.put('test', 'one', function () {
  trie.get('test', function (err, value) {
    if(value) console.log(value.toString())
  });
});

Also see this blog post.

API

./docs/

TESTING

npm test

LICENSE

MPL-2.0