Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
Release commit for v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
holgerd77 committed Nov 30, 2017
1 parent 1f260b6 commit 580589e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
(modification: no type change headlines) and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [2.3.0] - 2017-11-30
- Methods for merkle proof generation ``Trie.prove()`` and verification ``Trie.verifyProof()`` (see [./proof.js](./proof.js))

[2.3.0]: https://github.com/ethereumjs/merkle-patricia-tree/compare/v2.2.0...v2.3.0

## [2.2.0] - 2017-08-03
- Renamed ``root`` functions argument to ``nodeRef`` for passing a node reference
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ The only backing store supported is LevelDB through the ```levelup``` module.
`npm install merkle-patricia-tree`

# USAGE

## Initialization and Basic Usage

```javascript
var Trie = require('merkle-patricia-tree'),
levelup = require('levelup'),
Expand All @@ -30,6 +33,19 @@ trie.put('test', 'one', function () {
});
```

## Merkle Proofs

```javascript
Trie.prove(trie, 'test', function (err, prove) {
if (err) return cb(err)
Trie.verifyProof(trie.root, 'test', prove, function (err, value) {
if (err) return cb(err)
console.log(value.toString())
cb()
})
})
```

# API
[./docs/](./docs/index.md)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "merkle-patricia-tree",
"version": "2.2.0",
"version": "2.3.0",
"description": "This is an implementation of the modified merkle patricia tree as speficed in the Ethereum's yellow paper.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 580589e

Please sign in to comment.