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

Commit

Permalink
Merge pull request #104 from ethereumjs/fixReadme
Browse files Browse the repository at this point in the history
Fix test cases and docs
  • Loading branch information
ryanio authored Feb 11, 2020
2 parents d48a38c + b2c6fe9 commit d5861b8
Show file tree
Hide file tree
Showing 20 changed files with 3,013 additions and 1,043 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
language: node_js
node_js:
- "6"
- "8"
- "9"
- "10"
- "12"
env:
- CXX=g++-4.8
services:
Expand Down Expand Up @@ -32,4 +32,3 @@ matrix:
node_js: "8"
env: CXX=g++-4.8 TEST_SUITE=test:browser
script: npm run build && npm run $TEST_SUITE

18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# SYNOPSIS

[![NPM Package](https://img.shields.io/npm/v/merkle-patricia-tree.svg?style=flat-square)](https://www.npmjs.org/package/merkle-patricia-tree)
[![Build Status](https://img.shields.io/travis/ethereumjs/merkle-patricia-tree.svg?branch=master&style=flat-square)](https://travis-ci.org/ethereumjs/merkle-patricia-tree)
[![Coverage Status](https://img.shields.io/coveralls/ethereumjs/merkle-patricia-tree.svg?style=flat-square)](https://coveralls.io/r/ethereumjs/merkle-patricia-tree)
[![Gitter](https://img.shields.io/gitter/room/ethereum/ethereumjs-lib.svg?style=flat-square)](https://gitter.im/ethereum/ethereumjs-lib) or #ethereumjs on freenode
[![NPM Package](https://img.shields.io/npm/v/merkle-patricia-tree)](https://www.npmjs.org/package/merkle-patricia-tree)
[![Build Status](https://img.shields.io/travis/ethereumjs/merkle-patricia-tree/master)](https://travis-ci.org/ethereumjs/merkle-patricia-tree)
[![Coverage Status](https://img.shields.io/coveralls/ethereumjs/merkle-patricia-tree.svg)](https://coveralls.io/r/ethereumjs/merkle-patricia-tree)
[![Gitter](https://img.shields.io/gitter/room/ethereum/ethereumjs-lib.svg)](https://gitter.im/ethereum/ethereumjs-lib)

[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

Expand All @@ -30,8 +30,8 @@ const Trie = require('merkle-patricia-tree').BaseTrie,
db = level('./testdb'),
trie = new Trie(db)

trie.put('test', 'one', function() {
trie.get('test', function(err, value) {
trie.put(Buffer.from('test'), Buffer.from('one'), function() {
trie.get(Buffer.from('test'), function(err, value) {
if (value) console.log(value.toString())
})
})
Expand All @@ -40,9 +40,9 @@ trie.put('test', 'one', function() {
## Merkle Proofs

```javascript
Trie.prove(trie, 'test', function(err, prove) {
Trie.prove(trie, Buffer.from('test'), function(err, prove) {
if (err) return cb(err)
Trie.verifyProof(trie.root, 'test', prove, function(err, value) {
Trie.verifyProof(trie.root, Buffer.from('test'), prove, function(err, value) {
if (err) return cb(err)
console.log(value.toString())
cb()
Expand Down Expand Up @@ -117,7 +117,7 @@ trie.get(address, function(err, data) {

# API

[./docs/](./docs/index.md)
[Documentation](./docs/README.md)

# TESTING

Expand Down
11 changes: 11 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[merkle-patricia-tree](README.md)

# merkle-patricia-tree

## Index

### Modules

* ["baseTrie"](modules/_basetrie_.md)
* ["checkpointTrie"](modules/_checkpointtrie_.md)
* ["secure"](modules/_secure_.md)
Loading

0 comments on commit d5861b8

Please sign in to comment.