commonform-merkleize
compute a tree of hashes for a Common Form
Last updated 5 years ago by kemitchell .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install commonform-merkleize 
SYNC missed versions from official npm registry.
var merkleize = require('commonform-merkleize')
var assert = require('assert')

assert.deepEqual(
  merkleize({ content: [ 'This is a test' ] }),
  { digest: (
    'a4b1cdbb7425a4a195f3dfe748fe7ae7' +
    'da59d6ddb83ae7a46ffde9d8a7e86450' ) })

assert.deepEqual(
  merkleize({ content: [ { form: { content: [ 'This is a test' ] } } ] }),
  { digest: (
      '7783a0c438b8ad057806890d040d06b8' +
      '69bdcd04bef4ea01cd2e35257631b823' ),
    content: {
      0: { digest: (
        'a4b1cdbb7425a4a195f3dfe748fe7ae7' +
        'da59d6ddb83ae7a46ffde9d8a7e86450' ) } } })

Current Tags

  • 0.3.2                                ...           latest (5 years ago)

6 Versions

  • 0.3.2                                ...           5 years ago
  • 0.3.1                                ...           5 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |