{"_id":"merkle-lib","_rev":"4579562","name":"merkle-lib","description":"A performance conscious library for merkle root and tree calculations.","dist-tags":{"latest":"2.0.10"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"time":{"modified":"2026-04-10T15:55:18.000Z","created":"2016-10-07T05:20:19.992Z","2.0.10":"2017-03-23T06:19:58.376Z","2.0.9":"2017-03-23T05:27:32.370Z","2.0.8":"2017-03-23T04:40:31.276Z","2.0.7":"2017-03-23T04:39:35.926Z","2.0.6":"2017-03-23T04:31:14.745Z","2.0.5":"2016-12-17T08:28:45.459Z","2.0.4":"2016-12-17T08:27:26.308Z","2.0.3":"2016-12-17T07:24:11.576Z","2.0.2":"2016-11-04T01:25:24.112Z","2.0.1":"2016-10-08T07:03:17.696Z","2.0.0":"2016-10-08T07:02:42.794Z","1.0.0":"2016-10-07T05:20:19.992Z"},"users":{},"author":{"name":"Daniel Cousens"},"repository":{"type":"git","url":"git+https://github.com/bitcoinjs/merkle-lib.git"},"versions":{"2.0.10":{"name":"merkle-lib","version":"2.0.10","description":"A performance conscious library for merkle root and tree calculations.","keywords":["bitcoin","bitcoinjs-lib","leaf","merkle tree","merkle","root","hash","chain","tree"],"homepage":"https://github.com/bitcoinjs/merkle-lib","bugs":{"url":"https://github.com/bitcoinjs/merkle-lib/issues"},"license":"MIT","author":{"name":"Daniel Cousens"},"files":["index.js","fastRoot.js","proof.js"],"main":"index.js","repository":{"type":"git","url":"git+https://github.com/bitcoinjs/merkle-lib.git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","lint":"standard","unit":"tape test/*.js","test":"npm run lint && npm run unit"},"devDependencies":{"nyc":"^6.4.0","standard":"*","tape":"^4.5.1"},"gitHead":"3d2205c0130c664bb19f6aa39fecf6d92e9bd8a8","_id":"merkle-lib@2.0.10","_shasum":"82b8dbae75e27a7785388b73f9d7725d0f6f3326","_from":".","_npmVersion":"4.4.1","_nodeVersion":"7.7.3","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"82b8dbae75e27a7785388b73f9d7725d0f6f3326","size":3688,"noattachment":false,"key":"/merkle-lib/-/merkle-lib-2.0.10.tgz","tarball":"http://registry.cnpm.dingdandao.com/merkle-lib/download/merkle-lib-2.0.10.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/merkle-lib-2.0.10.tgz_1490249996499_0.007461936445906758"},"directories":{},"publish_time":1490249998376,"_hasShrinkwrap":false,"_cnpm_publish_time":1490249998376,"_cnpmcore_publish_time":"2021-12-16T15:49:18.080Z"},"2.0.9":{"name":"merkle-lib","version":"2.0.9","description":"A performance conscious library for merkle root and tree calculations.","keywords":["bitcoin","bitcoinjs-lib","leaf","merkle tree","merkle","root","hash","chain","tree"],"homepage":"https://github.com/bitcoinjs/merkle-lib","bugs":{"url":"https://github.com/bitcoinjs/merkle-lib/issues"},"license":"MIT","author":{"name":"Daniel Cousens"},"files":["index.js","fastRoot.js","proof.js"],"main":"index.js","repository":{"type":"git","url":"git+https://github.com/bitcoinjs/merkle-lib.git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","lint":"standard","unit":"tape test/*.js","test":"npm run lint && npm run unit"},"devDependencies":{"nyc":"^6.4.0","standard":"*","tape":"^4.5.1"},"gitHead":"598b14e415ffcd9a098af2c3384d9bef2570f19a","_id":"merkle-lib@2.0.9","_shasum":"8ed2b0dc3b30eef6f934aa754e619330646b8eeb","_from":".","_npmVersion":"4.4.1","_nodeVersion":"7.7.3","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"8ed2b0dc3b30eef6f934aa754e619330646b8eeb","size":3379,"noattachment":false,"key":"/merkle-lib/-/merkle-lib-2.0.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/merkle-lib/download/merkle-lib-2.0.9.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/merkle-lib-2.0.9.tgz_1490246850548_0.237371691968292"},"directories":{},"publish_time":1490246852370,"_hasShrinkwrap":false,"_cnpm_publish_time":1490246852370,"_cnpmcore_publish_time":"2021-12-16T15:49:18.327Z"},"2.0.8":{"name":"merkle-lib","version":"2.0.8","description":"A performance conscious library for merkle root and tree calculations.","keywords":["bitcoin","bitcoinjs-lib","leaf","merkle tree","merkle","root","hash","chain","tree"],"homepage":"https://github.com/bitcoinjs/merkle-lib","bugs":{"url":"https://github.com/bitcoinjs/merkle-lib/issues"},"license":"MIT","author":{"name":"Daniel Cousens"},"files":["index.js","fastRoot.js","proof.js"],"main":"index.js","repository":{"type":"git","url":"git+https://github.com/bitcoinjs/merkle-lib.git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","lint":"standard","unit":"tape test/*.js","test":"npm run lint && npm run unit"},"devDependencies":{"nyc":"^6.4.0","standard":"*","tape":"^4.5.1"},"gitHead":"4bd6ac3ae2c83cd32c8b55164a691bd165c29676","_id":"merkle-lib@2.0.8","_shasum":"5f1a01b04747d4015640eeae8eaf89e37c5375c4","_from":".","_npmVersion":"4.4.1","_nodeVersion":"7.7.3","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"5f1a01b04747d4015640eeae8eaf89e37c5375c4","size":3376,"noattachment":false,"key":"/merkle-lib/-/merkle-lib-2.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/merkle-lib/download/merkle-lib-2.0.8.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/merkle-lib-2.0.8.tgz_1490244029296_0.5873904046602547"},"directories":{},"publish_time":1490244031276,"_hasShrinkwrap":false,"_cnpm_publish_time":1490244031276,"_cnpmcore_publish_time":"2021-12-16T15:49:18.549Z"},"2.0.7":{"name":"merkle-lib","version":"2.0.7","description":"A performance conscious library for merkle root and tree calculations.","keywords":["bitcoin","bitcoinjs-lib","leaf","merkle tree","merkle","root","hash","chain","tree"],"homepage":"https://github.com/bitcoinjs/merkle-lib","bugs":{"url":"https://github.com/bitcoinjs/merkle-lib/issues"},"license":"MIT","author":{"name":"Daniel Cousens"},"files":["index.js","fastRoot.js","proof.js"],"main":"index.js","repository":{"type":"git","url":"git+https://github.com/bitcoinjs/merkle-lib.git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","lint":"standard","unit":"tape test/*.js","test":"npm run lint && npm run unit"},"devDependencies":{"nyc":"^6.4.0","standard":"*","tape":"^4.5.1"},"gitHead":"a2e34dc8b7d01a7956fa05d1cdbd48b51430f742","_id":"merkle-lib@2.0.7","_shasum":"f9aba1a1e6fe0a038ebcb136d41d244391d70f63","_from":".","_npmVersion":"4.4.1","_nodeVersion":"7.7.3","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"f9aba1a1e6fe0a038ebcb136d41d244391d70f63","size":3373,"noattachment":false,"key":"/merkle-lib/-/merkle-lib-2.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/merkle-lib/download/merkle-lib-2.0.7.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/merkle-lib-2.0.7.tgz_1490243973801_0.33275901176966727"},"directories":{},"publish_time":1490243975926,"_hasShrinkwrap":false,"_cnpm_publish_time":1490243975926,"_cnpmcore_publish_time":"2021-12-16T15:49:19.086Z"},"2.0.6":{"name":"merkle-lib","version":"2.0.6","description":"A performance conscious library for merkle root and tree calculations.","keywords":["bitcoin","bitcoinjs-lib","leaf","merkle tree","merkle","root","hash","chain","tree"],"homepage":"https://github.com/bitcoinjs/merkle-lib","bugs":{"url":"https://github.com/bitcoinjs/merkle-lib/issues"},"license":"MIT","author":{"name":"Daniel Cousens"},"files":["index.js","fastRoot.js","proof.js"],"main":"index.js","repository":{"type":"git","url":"git+https://github.com/bitcoinjs/merkle-lib.git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","lint":"standard","unit":"tape test/*.js","test":"npm run lint && npm run unit"},"devDependencies":{"nyc":"^6.4.0","standard":"*","tape":"^4.5.1"},"gitHead":"5fe254333e74c973b853e548a8706fc004c11faf","_id":"merkle-lib@2.0.6","_shasum":"5fda3c655a3b2881ba66ee9677c019ba6de8cee3","_from":".","_npmVersion":"4.4.1","_nodeVersion":"7.7.3","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"5fda3c655a3b2881ba66ee9677c019ba6de8cee3","size":3309,"noattachment":false,"key":"/merkle-lib/-/merkle-lib-2.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/merkle-lib/download/merkle-lib-2.0.6.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/merkle-lib-2.0.6.tgz_1490243472888_0.06450180127285421"},"directories":{},"publish_time":1490243474745,"_hasShrinkwrap":false,"_cnpm_publish_time":1490243474745,"_cnpmcore_publish_time":"2021-12-16T15:49:19.302Z"},"2.0.5":{"name":"merkle-lib","version":"2.0.5","description":"A performance conscious library for merkle root and tree calculations.","keywords":["bitcoin","bitcoinjs-lib","leaf","merkle tree","merkle","root","hash","chain","tree"],"homepage":"https://github.com/bitcoinjs/merkle-lib","bugs":{"url":"https://github.com/bitcoinjs/merkle-lib/issues"},"license":"MIT","author":{"name":"Daniel Cousens"},"files":["index.js","fastRoot.js","proof.js"],"main":"index.js","repository":{"type":"git","url":"git+https://github.com/bitcoinjs/merkle-lib.git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","lint":"standard","unit":"tape test/*.js","test":"npm run lint && npm run unit"},"devDependencies":{"nyc":"^6.4.0","standard":"*","tape":"^4.5.1"},"gitHead":"0db96164115074bf56ce2b8d540c625e2097113c","_id":"merkle-lib@2.0.5","_shasum":"9c531e384703c8db02cc131785b62258723e4578","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.2.1","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"9c531e384703c8db02cc131785b62258723e4578","size":3231,"noattachment":false,"key":"/merkle-lib/-/merkle-lib-2.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/merkle-lib/download/merkle-lib-2.0.5.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/merkle-lib-2.0.5.tgz_1481963325219_0.8534127057064325"},"directories":{},"publish_time":1481963325459,"_hasShrinkwrap":false,"_cnpm_publish_time":1481963325459,"_cnpmcore_publish_time":"2021-12-16T15:49:19.556Z"},"2.0.4":{"name":"merkle-lib","version":"2.0.4","description":"A performance conscious library for merkle root and tree calculations.","keywords":["bitcoin","bitcoinjs-lib","leaf","merkle tree","merkle","root","hash","chain","tree"],"homepage":"https://github.com/bitcoinjs/merkle-lib","bugs":{"url":"https://github.com/bitcoinjs/merkle-lib/issues"},"license":"MIT","author":{"name":"Daniel Cousens"},"files":["index.js","fastRoot.js","proof.js"],"main":"index.js","repository":{"type":"git","url":"git+https://github.com/bitcoinjs/merkle-lib.git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","lint":"standard","unit":"tape test/*.js","test":"npm run lint && npm run unit"},"devDependencies":{"nyc":"^6.4.0","standard":"*","tape":"^4.5.1"},"gitHead":"1b916f33992329709a3b776c7bae172661f6c917","_id":"merkle-lib@2.0.4","_shasum":"cfb03931595698528ac772b2dd76c15c1703a950","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.2.1","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"cfb03931595698528ac772b2dd76c15c1703a950","size":3217,"noattachment":false,"key":"/merkle-lib/-/merkle-lib-2.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/merkle-lib/download/merkle-lib-2.0.4.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/merkle-lib-2.0.4.tgz_1481963244488_0.08158747805282474"},"directories":{},"publish_time":1481963246308,"_hasShrinkwrap":false,"_cnpm_publish_time":1481963246308,"_cnpmcore_publish_time":"2021-12-16T15:49:19.763Z"},"2.0.3":{"name":"merkle-lib","version":"2.0.3","description":"A performance conscious library for merkle root and tree calculations.","keywords":["bitcoin","bitcoinjs-lib","leaf","merkle tree","merkle","root","hash","chain","tree"],"homepage":"https://github.com/bitcoinjs/merkle-lib","bugs":{"url":"https://github.com/bitcoinjs/merkle-lib/issues"},"license":"MIT","author":{"name":"Daniel Cousens"},"files":["index.js","fastRoot.js","proof.js"],"main":"index.js","repository":{"type":"git","url":"git+https://github.com/bitcoinjs/merkle-lib.git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","lint":"standard","unit":"tape test/*.js","test":"npm run lint && npm run unit"},"devDependencies":{"nyc":"^6.4.0","standard":"*","tape":"^4.5.1"},"gitHead":"95d8732a9f1cbd1a3047ce547f693f15be7b93f2","_id":"merkle-lib@2.0.3","_shasum":"96d2a41c70919218d3c197f934f9376f568aa4fb","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.2.1","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"96d2a41c70919218d3c197f934f9376f568aa4fb","size":3015,"noattachment":false,"key":"/merkle-lib/-/merkle-lib-2.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/merkle-lib/download/merkle-lib-2.0.3.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/merkle-lib-2.0.3.tgz_1481959451355_0.6252407890278846"},"directories":{},"publish_time":1481959451576,"_hasShrinkwrap":false,"_cnpm_publish_time":1481959451576,"_cnpmcore_publish_time":"2021-12-16T15:49:19.968Z"},"2.0.2":{"name":"merkle-lib","version":"2.0.2","description":"A performance conscious library for merkle root and tree calculations.","keywords":["bitcoin","bitcoinjs-lib","leaf","merkle tree","merkle","root","hash","chain","tree"],"homepage":"https://github.com/bitcoinjs/merkle-lib","bugs":{"url":"https://github.com/bitcoinjs/merkle-lib/issues"},"license":"MIT","author":{"name":"Daniel Cousens"},"files":["index.js","fastRoot.js","proof.js"],"main":"index.js","repository":{"type":"git","url":"git+https://github.com/bitcoinjs/merkle-lib.git"},"scripts":{"coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","lint":"standard","unit":"tape test/*.js","test":"npm run lint && npm run unit"},"devDependencies":{"nyc":"^6.4.0","standard":"*","tape":"^4.5.1"},"gitHead":"3ae5edb85c885ff5b26c096e26d4ed4d6f4647b4","_id":"merkle-lib@2.0.2","_shasum":"8d380f151e4e381d6acbb4ece5082a8db34ef2d2","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.0.0","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"8d380f151e4e381d6acbb4ece5082a8db34ef2d2","size":2938,"noattachment":false,"key":"/merkle-lib/-/merkle-lib-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/merkle-lib/download/merkle-lib-2.0.2.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/merkle-lib-2.0.2.tgz_1478222722453_0.05017642956227064"},"directories":{},"publish_time":1478222724112,"_hasShrinkwrap":false,"_cnpm_publish_time":1478222724112,"_cnpmcore_publish_time":"2021-12-16T15:49:20.211Z"},"2.0.1":{"name":"merkle-lib","version":"2.0.1","description":"[![Build Status](https://travis-ci.org/bitcoinjs/merkle-lib.png?branch=master)](https://travis-ci.org/bitcoinjs/merkle-lib) [![NPM](https://img.shields.io/npm/v/merkle-lib.svg)](https://www.npmjs.org/package/merkle-lib)","keywords":["bitcoin","bitcoinjs-lib","leaf","merkle tree","merkle","root","hash","chain","tree"],"homepage":"https://github.com/bitcoinjs/merkle-lib","bugs":{"url":"https://github.com/bitcoinjs/merkle-lib/issues"},"license":"MIT","author":{"name":"Daniel Cousens"},"files":["index.js","fastRoot.js","proof.js"],"main":"index.js","repository":{"type":"git","url":"git+https://github.com/bitcoinjs/merkle-lib.git"},"scripts":{"prepublish":"npm run test","coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"devDependencies":{"nyc":"^6.4.0","standard":"*","tape":"^4.5.1"},"gitHead":"5593a42ee428f6056c835ed0348d7e4141782657","_id":"merkle-lib@2.0.1","_shasum":"30fa343e4c6475ffcce2e2bbf12f3d0467ca84d7","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.7.0","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"30fa343e4c6475ffcce2e2bbf12f3d0467ca84d7","size":2944,"noattachment":false,"key":"/merkle-lib/-/merkle-lib-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/merkle-lib/download/merkle-lib-2.0.1.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/merkle-lib-2.0.1.tgz_1475910195860_0.15505661559291184"},"directories":{},"publish_time":1475910197696,"_hasShrinkwrap":false,"_cnpm_publish_time":1475910197696,"_cnpmcore_publish_time":"2021-12-16T15:49:20.510Z"},"2.0.0":{"name":"merkle-lib","version":"2.0.0","description":"[![Build Status](https://travis-ci.org/bitcoinjs/merkle-lib.png?branch=master)](https://travis-ci.org/bitcoinjs/merkle-lib) [![NPM](https://img.shields.io/npm/v/merkle-lib.svg)](https://www.npmjs.org/package/merkle-lib)","keywords":["bitcoin","bitcoinjs-lib","leaf","merkle tree","merkle","root","hash","chain","tree"],"homepage":"https://github.com/bitcoinjs/merkle-lib","bugs":{"url":"https://github.com/bitcoinjs/merkle-lib/issues"},"license":"MIT","author":{"name":"Daniel Cousens"},"files":["index.js","fastRoot.js"],"main":"index.js","repository":{"type":"git","url":"git+https://github.com/bitcoinjs/merkle-lib.git"},"scripts":{"prepublish":"npm run test","coverage":"nyc --check-coverage --branches 90 --functions 90 tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"devDependencies":{"nyc":"^6.4.0","standard":"*","tape":"^4.5.1"},"gitHead":"73309e64a67eb7b7a807c65f76d1e91eb5b0cca0","_id":"merkle-lib@2.0.0","_shasum":"9ccc1e4f66fb5d43b9f1e746121eeb05f61a7907","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.7.0","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"9ccc1e4f66fb5d43b9f1e746121eeb05f61a7907","size":2576,"noattachment":false,"key":"/merkle-lib/-/merkle-lib-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/merkle-lib/download/merkle-lib-2.0.0.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/merkle-lib-2.0.0.tgz_1475910161122_0.5584095835220069"},"directories":{},"publish_time":1475910162794,"_hasShrinkwrap":false,"_cnpm_publish_time":1475910162794,"_cnpmcore_publish_time":"2021-12-16T15:49:20.716Z"},"1.0.0":{"name":"merkle-lib","version":"1.0.0","description":"","keywords":["bitcoin","bitcoinjs-lib","leaf","merkle tree","merkle","root","hash","chain","tree"],"homepage":"https://github.com/bitcoinjs/merkle-lib","bugs":{"url":"https://github.com/bitcoinjs/merkle-lib/issues"},"license":"MIT","author":{"name":"Daniel Cousens"},"files":["index.js","fastRoot.js"],"main":"index.js","repository":{"type":"git","url":"git+https://github.com/bitcoinjs/merkle-lib.git"},"scripts":{"prepublish":"npm run test","coverage":"nyc --check-coverage --branches 100 --functions 100 tape test/*.js","lint":"standard","test":"npm run lint && npm run unit","unit":"tape test/*.js"},"devDependencies":{"nyc":"^6.4.0","standard":"*","tape":"^4.5.1"},"gitHead":"245d00083784d693d54a56172d3ff38a79a2a679","_id":"merkle-lib@1.0.0","_shasum":"bd088b2c7b1026339103a0f3429ae09022cfb25c","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.7.0","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"bd088b2c7b1026339103a0f3429ae09022cfb25c","size":1070,"noattachment":false,"key":"/merkle-lib/-/merkle-lib-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/merkle-lib/download/merkle-lib-1.0.0.tgz"},"maintainers":[{"name":"fanatid","email":""},{"name":"jl.landabaso","email":""},{"name":"jprichardson","email":""},{"name":"junderw","email":"junderwood@bitcoinbank.co.jp"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/merkle-lib-1.0.0.tgz_1475817619752_0.013189650606364012"},"directories":{},"publish_time":1475817619992,"_hasShrinkwrap":false,"_cnpm_publish_time":1475817619992,"_cnpmcore_publish_time":"2021-12-16T15:49:20.944Z"}},"readme":"# merkle-lib\n\n[![Build Status](https://travis-ci.org/bitcoinjs/merkle-lib.png?branch=master)](https://travis-ci.org/bitcoinjs/merkle-lib)\n[![NPM](https://img.shields.io/npm/v/merkle-lib.svg)](https://www.npmjs.org/package/merkle-lib)\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\nA performance conscious library for merkle root and tree calculations.\n\n**NOTE**: As is,  this implementation is vulnerable to a forgery attack ([as a second pre-image attack](https://en.wikipedia.org/wiki/Merkle_tree#Second_preimage_attack)), see these[\\[1\\]](https://crypto.stackexchange.com/questions/2106/what-is-the-purpose-of-using-different-hash-functions-for-the-leaves-and-interna)[\\[2\\]](https://crypto.stackexchange.com/questions/43430/what-is-the-reason-to-separate-domains-in-the-internal-hash-algorithm-of-a-merkl) crypto.stackexchange questions for an explanation.\nTo avoid this vulnerability,  you should pre-hash your leaves *using a different hash function* than the function provided such that `H(x) != H'(x)`.\n\n\n## Examples\nPreamble\n``` javscript\nvar crypto = require('crypto')\n\nfunction sha256 (data) {\n  return crypto.createHash('sha256').update(data).digest()\n}\n\nvar data = [\n  'cafebeef',\n  'ffffffff',\n  'aaaaaaaa',\n  'bbbbbbbb',\n  'cccccccc'\n].map(x => new Buffer(x, 'hex'))\n\n// ... now, the examples\n```\n\nTree\n``` javascript\nvar merkle = require('merkle-lib')\nvar tree = merkle(data, sha256)\n\nconsole.log(tree.map(x => x.toString('hex')))\n// => [\n//  'cafebeef',\n//  'ffffffff',\n//  'aaaaaaaa',\n//  'bbbbbbbb',\n//  'cccccccc',\n//  'bda5c39dec343da54ce91c57bf8e796c2ca16a1bd8cae6a2cefbdd16efc32578',\n//  '8b722baf6775a313f1032ba9984c0dce32ff3c40d7a67b5df8de4dbaa43a3db0',\n//  '3d2f424783df5853c8d7121b1371650c04241f318e1b0cd46bedbc805b9164c3',\n//  'bb232963fd0efdeacb0fd76e26cf69055fa5facc19a5f5c2f2f27a6925d1db2f',\n//  '2256e70bea2c591190a0d4d6c1415acd7458fae84d8d85cdc68b851da27777d4',\n//  'c2692b0e127b3b774a92f6e1d8ff8c3a5ea9eef9a1d389fe294f0a7a2fec9be1'\n//]\n```\n\nRoot only (equivalent to `tree[tree.length - 1]`)\n``` javascript\nvar fastRoot = require('merkle-lib/fastRoot')\nvar root = fastRoot(data, sha256)\n\nconsole.log(root.toString('hex'))\n// => 'c2692b0e127b3b774a92f6e1d8ff8c3a5ea9eef9a1d389fe294f0a7a2fec9be1'\n```\n\nProof (with verify)\n``` javascript\nvar merkleProof = require('merkle-lib/proof')\nvar proof = merkleProof(tree, data[0])\n\nif (proof === null) {\n  console.error('No proof exists!')\n}\n\nconsole.log(proof.map(x => x && x.toString('hex')))\n// => [\n//   'cafebeef',\n//   'ffffffff',\n//   null,\n//   '8b722baf6775a313f1032ba9984c0dce32ff3c40d7a67b5df8de4dbaa43a3db0',\n//   null,\n//   '2256e70bea2c591190a0d4d6c1415acd7458fae84d8d85cdc68b851da27777d4',\n//   'c2692b0e127b3b774a92f6e1d8ff8c3a5ea9eef9a1d389fe294f0a7a2fec9be1'\n// ]\n\nconsole.log(merkleProof.verify(proof, sha256))\n// => true\n```\n\n\n#### Credits\nThanks to [Meni Rosenfield on bitcointalk](https://bitcointalk.org/index.php?topic=403231.msg9054025#msg9054025) for the math.\n","_attachments":{},"homepage":"https://github.com/bitcoinjs/merkle-lib","bugs":{"url":"https://github.com/bitcoinjs/merkle-lib/issues"},"license":"MIT"}