{"name":"ethereumjs-blockchain","version":"4.0.3","description":"A module to store and interact with blocks","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"prepublishOnly":"npm run lint && npm run test && npm run build","build":"ethereumjs-config-build","coverage":"ethereumjs-config-coverage","coveralls":"ethereumjs-config-coveralls","docs:build":"typedoc --out docs --mode file --readme none --theme markdown --mdEngine github --excludeNotExported --excludePrivate src","format":"ethereumjs-config-format","format:fix":"ethereumjs-config-format-fix","tslint":"ethereumjs-config-tslint","tslint:fix":"ethereumjs-config-tslint-fix","tsc":"ethereumjs-config-tsc","lint":"ethereumjs-config-lint","lint:fix":"ethereumjs-config-lint-fix","test":"npm run build && ts-node node_modules/tape/bin/tape ./test/index.ts"},"husky":{"hooks":{"pre-push":"npm run lint"}},"repository":{"type":"git","url":"git+https://github.com/ethereumjs/ethereumjs-blockchain.git"},"keywords":["ethereum","blockchain"],"author":{"name":"mjbecze","email":"mjbecze@gmail.com"},"license":"MPL-2.0","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-blockchain/issues"},"homepage":"https://github.com/ethereumjs/ethereumjs-blockchain#readme","dependencies":{"async":"^2.6.1","ethashjs":"~0.0.7","ethereumjs-block":"~2.2.2","ethereumjs-common":"^1.5.0","ethereumjs-util":"~6.1.0","flow-stoplight":"^1.0.0","level-mem":"^3.0.1","lru-cache":"^5.1.1","rlp":"^2.2.2","semaphore":"^1.1.0"},"devDependencies":{"@ethereumjs/config-nyc":"^1.1.1","@ethereumjs/config-prettier":"^1.1.1","@ethereumjs/config-tsc":"^1.1.1","@ethereumjs/config-tslint":"^1.1.1","@types/async":"^2.4.1","@types/bn.js":"^4.11.4","@types/lru-cache":"^5.1.0","@types/node":"^11.11.4","@types/semaphore":"^1.1.0","@types/tape":"^4.2.33","coveralls":"^3.0.2","husky":"^2.1.0","nyc":"^13.0.1","prettier":"^1.16.4","tape":"^4.9.1","ts-node":"^8.0.3","tslint":"^5.13.1","typedoc":"^0.14.2","typedoc-plugin-markdown":"^1.1.27","typescript":"^3.3.3333","typestrict":"^1.0.2"},"gitHead":"e0a66d77b4cec2cb8775e026522d611a1a6fdf85","_id":"ethereumjs-blockchain@4.0.3","_npmVersion":"6.4.1","_nodeVersion":"8.15.1","_npmUser":{"name":"holgerd77","email":"Holger.Drewes@gmail.com"},"dist":{"integrity":"sha512-0nJWbyA+Gu0ZKZr/cywMtB/77aS/4lOVsIKbgUN2sFQYscXO5rPbUfrEe7G2Zhjp86/a0VqLllemDSTHvx3vZA==","shasum":"e013034633a30ad2006728e8e2b21956b267b773","tarball":"http://registry-npm.ywwl.com/ethereumjs-blockchain/download/ethereumjs-blockchain-4.0.3.tgz","fileCount":18,"unpackedSize":115976,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+0FgCRA9TVsSAnZWagAAD5QQAJjzpMnYc7rZrUebafdH\n44zuVbPbbxWoYl3glV8EnFmjxwTTnjuuHstYMH4Ssn7dUhewhhLJb+h2DF/n\n/NUPR1AvpVmeHsTOqoaFin84GvhQGCrSjmPN2ViLfwqJgnVEeWd+B13KS66q\nTrqvMzC1CsOUOhoV0H1YcS1VOZkQ9UT9om/XLQ3VXPwMwn3EF4XhxPpcI1o+\n2ccH64RF8XxnJsHDRGKm6APQlQkbwNSdt0G1ubBUYW4R1IbVpUGhmjBawzrC\nI3D/hpw6rUceGNudLSz5q16vtD0Bsehuo6/XnDwlHqHv3wP2K4F9PFyP5mTs\nLROOxg7nJV8zFROuLmumHe49k1U3KwPVFL4P5qGx9TN3ueh0pDhhq13jWPaW\nSRMzQb4jKjwnmpNhLNg+nFIeqg7Pe0/iJA15BmvE+ox96w2yZe861AHZ2tgM\nPOtb7K/g1tJEe+Su3AVP5cYQw8noHfiqmPbUd9unqpslQijA+FNHpk5CqWWA\npHVVZ1kY7pvUfM0sj+I2XhQq/z7NITQrTiLEOQ1c2YuOuiq4J+IQka8FFOKz\ntgAbKRZ6TqSfX5ZqnNTb09i+DW3Y+tYm0xqMWaIvbcpHj969MbSIqd4mc50K\n1TQhHDSvUax7naSOJnfBpUKkhp9NMEbJkwoyxfoutOFM9cLqjJaB1Sk3ItDd\nAzA/\r\n=VOtK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjWKctjuai/0UuIYENtnS5zGUhTQc0eueBM5sbcFAnHAIhAOt1ASsx8BD+iYJQEPpnif0aCIqgB80Jn93js3TmKFnV"}],"size":25327,"noattachment":false,"key":"/ethereumjs-blockchain/-/ethereumjs-blockchain-4.0.3.tgz"},"maintainers":[{"email":"alex@rtfs.hu","name":"axic"},{"email":"Holger.Drewes@gmail.com","name":"holgerd77"},{"email":"j-wasinger@hotmail.com","name":"jwasinger"},{"email":"aaron@kumavis.me","name":"kumavis"},{"email":"null_radix@riseup.net","name":"null_radix"},{"email":"itz.s1na@gmail.com","name":"sinamahmoodi"},{"email":"v@pulim.com","name":"vpulim"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ethereumjs-blockchain_4.0.3_1576747359652_0.6082465517124258"},"_hasShrinkwrap":false,"deprecated":"New package name format for new versions: @ethereumjs/blockchain. Please update.","readme":"# SYNOPSIS\n\n[![NPM Package](https://img.shields.io/npm/v/ethereumjs-blockchain.svg?style=flat-square)](https://www.npmjs.org/package/ethereumjs-blockchain)\n[![Actions Status](https://github.com/ethereumjs/ethereumjs-blockchain/workflows/blockchain-test/badge.svg)](https://github.com/ethereumjs/ethereumjs-blockchain/actions)\n[![Coverage Status](https://img.shields.io/coveralls/ethereumjs/ethereumjs-blockchain.svg?style=flat-square)](https://coveralls.io/r/ethereumjs/ethereumjs-blockchain)\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ethereum/ethereumjs-lib?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) or #ethereumjs on freenode\n\nA module to store and interact with blocks.\n\n# INSTALL\n\n`npm install ethereumjs-blockchain`\n\n# API\n\n[./docs/](./docs/README.md)\n\n# EXAMPLE\n\nThe following is an example to iterate through an existing Geth DB (needs `level` to be installed separately).\n\nThis module performs write operations. Making a backup of your data before trying it is recommended. Otherwise, you can end up with a compromised DB state.\n\n```javascript\nconst level = require('level')\nconst Blockchain = require('ethereumjs-blockchain').default\nconst utils = require('ethereumjs-util')\n\nconst gethDbPath = './chaindata' // Add your own path here. It will get modified, see remarks.\nconst db = level(gethDbPath)\n\nnew Blockchain({ db: db }).iterator(\n  'i',\n  (block, reorg, cb) => {\n    const blockNumber = utils.bufferToInt(block.header.number)\n    const blockHash = block.hash().toString('hex')\n    console.log(`BLOCK ${blockNumber}: ${blockHash}`)\n    cb()\n  },\n  err => console.log(err || 'Done.'),\n)\n```\n\n**WARNING**: Since `ethereumjs-blockchain` is also doing write operations\non the DB for safety reasons only run this on a copy of your database, otherwise this might lead\nto a compromised DB state.\n\n# EthereumJS\n\nSee our organizational [documentation](https://ethereumjs.readthedocs.io) for an introduction to `EthereumJS` as well as information on current standards and best practices.\n\nIf you want to join for work or do improvements on the libraries have a look at our [contribution guidelines](https://ethereumjs.readthedocs.io/en/latest/contributing.html).\n","publish_time":1576747359801,"_cnpm_publish_time":1576747359801,"dist-tags":{"latest":"4.0.4"}}