Skip to content

shuplenkov/node-merk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-merk

Node.js bindings for Merk

Usage

npm install merk

let merk = require('merk')

// create or load store
let db = merk('./state.db')

// get value
let value = db.getSync(Buffer.from('mykey'))

// get Merkle root
let hash = db.rootHash()

// create merkle proof
let proof = db.proveSync([
  Buffer.from('key1'),
  Buffer.from('key2')
])

// modify values
db.batch()
  .put(Buffer.from('key1'), Buffer.from('value1'))
  .put(Buffer.from('key2'), Buffer.from('value2'))
  .delete(Buffer.from('key3'))
  .commitSync()

About

Node.js bindings for merk

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 85.2%
  • JavaScript 14.8%