merkle-patricia-tree
Advanced tools
Comparing version 1.1.4 to 2.0.0
@@ -57,3 +57,3 @@ const levelup = require('levelup') | ||
} else { | ||
cb() | ||
throw new Error('trying to commit when not checkpointed') | ||
} | ||
@@ -124,3 +124,3 @@ }) | ||
trie._scratch = this._scratch | ||
trie._checkpoints = this._checkpoints.slice() | ||
// trie._checkpoints = this._checkpoints.slice() | ||
return trie | ||
@@ -127,0 +127,0 @@ } |
{ | ||
"name": "merkle-patricia-tree", | ||
"version": "1.1.4", | ||
"version": "2.0.0", | ||
"description": "This is an implementation of the modified merkle patricia tree as speficed in the Ethereum's yellow paper.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -31,2 +31,5 @@ # SYNOPSIS | ||
# API | ||
## Secure Trie Overlay | ||
You can create a secure Trie where the keys are automatically hashed using sha3 by `require('merkle-patricia-tree/secure')` and using the same API. The secure trie hash all the keys before storing them. | ||
### `new Trie([db], [root])` | ||
@@ -86,2 +89,7 @@ ### `new Trie([root])` | ||
#### `trie.copy()` | ||
Create an new Trie which share the underlining db and cache with the orginal trie. | ||
-------------------------------------------------------- | ||
#### `trie.batch(operations)` | ||
@@ -126,4 +134,2 @@ Give an hash of operation adds them to the DB | ||
## Secure Trie Overlay | ||
You can create a secure Trie where the keys are automatically hashed using sha3 by usin `require('merkle-patricia-tree/secure')` | ||
@@ -130,0 +136,0 @@ # TESTING |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
96024
136