{"_id":"@ignored/blockchain","_rev":"15-69704df8ef3e4c3f52b11fd2eacdb4bc","name":"@ignored/blockchain","dist-tags":{"latest":"6.0.0-beta.6"},"versions":{"6.0.0-beta.3":{"name":"@ignored/blockchain","version":"6.0.0-beta.3","keywords":["ethereum","blockchain"],"author":{"name":"mjbecze","email":"mjbecze@gmail.com"},"license":"MPL-2.0","_id":"@ignored/blockchain@6.0.0-beta.3","maintainers":[{"name":"fvictorio","email":"victorio.franco@gmail.com"},{"name":"alcuadrado","email":"email@patriciopalladino.com"}],"homepage":"https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/blockchain#readme","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+blockchain%22"},"dist":{"shasum":"6d9fb334a112bbcd398a554211fcc2160f8dd269","tarball":"https://registry.npmjs.org/@ignored/blockchain/-/blockchain-6.0.0-beta.3.tgz","fileCount":84,"integrity":"sha512-HMb9RpmjwuuzIufR36xpMfqVJzqf6wFRlU1qgUPJXEXWnib4aD+O5O2AtuyOP4tApiboyUb3ZYMqe6lgZ7GihA==","signatures":[{"sig":"MEYCIQDPuDGIC/WVzr7zxnF0L4SSMzt+257NHcWlViAPCH7B1gIhANzxQ5EISvkjjPln3nMwxQQh/cqS0K1mMYPFz0Boq1Gs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1699658,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/QTkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJOxAAnHxBqkNL6FAyao39pq8xR949b0zhfzL4jJj1cWhnk0LEiKu6\r\nQY2GSFpdByiLThWmH5Mw8/Xl4+zw2QHtLf3Z7UN9QZ6Z6oYuU0Gksck/UGtk\r\nAx29MOlchWcPJrK4/uXwQc9U4Lx1afxcOPoQibRGp9S+cuYc2ZfNsBtvbXS2\r\nBl4n04HXpIIlGBEEdOfKisMrFr7wfmUC0s84nGRgUXcWmpbCUw5AfSQlGkCg\r\nCpKAGQr/lq95WWSG4uysfAtEWUjcpT9YybIvW7BWogMHsxcbsBPOFoXRwC/+\r\na+m+jABOd7vcrLbNU2d+wA+5NxeOkfWbKBqpSIDPuhlf2YUJFxOQIxqamRFZ\r\nUziTcRizYrpj4tnsz7G2FGe4f6uyxamzS7ALWE2FbhMbkzcHxO6sU5G+ncxM\r\nJENaw9c9QR8rDO2JDWi3HBUnyINT0QpJWf8DB80OBNThq3SF4GPioMiYnzbk\r\nVpnf/nJUIp+ICU5+jjRs1o7ENF5NyozmJtT2LQvIwyq/ozWQgh/WRVepXbWl\r\nJ5MtCamxtzKBq32OJY5hP0jAq9cJgWvet1SiuVGRnqtHMj/UAYmfyBjpkp39\r\nscZdbIbG0n673DMKTBB0Rt1mL7Lx6CUjWjlSrWK5ZI4Y0EoTF8nzqcRscAR/\r\na9jryywcL6ReLhoZjZw+JkB9PPM3PSIZx0U=\r\n=34f7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"e6cd90ad72ae51dc60e6f2b0b6d3e56312469bbb","scripts":{"tsc":"../../config/cli/ts-compile.sh","lint":"../../config/cli/lint.sh","tape":"tape -r ts-node/register","test":"npm run test:node && npm run test:browser","build":"../../config/cli/ts-build.sh","clean":"../../config/cli/clean-package.sh","coverage":"../../config/cli/coverage.sh","lint:fix":"../../config/cli/lint-fix.sh","lint:diff":"../../config/cli/lint-diff.sh","test:node":"npm run tape -- ./test/*.spec.ts","docs:build":"typedoc --options typedoc.js","test:browser":"karma start karma.conf.js"},"_npmUser":{"name":"fvictorio","email":"victorio.franco@gmail.com"},"repository":{"url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git","type":"git"},"_npmVersion":"8.15.1","description":"A module to store and interact with blocks","directories":{},"_nodeVersion":"14.19.3","dependencies":{"debug":"^4.3.3","level":"^8.0.0","lru-cache":"^5.1.1","@ignored/rlp":"4.0.0-beta.3","memory-level":"^1.0.0","@ignored/trie":"5.0.0-beta.3","@ignored/util":"8.0.0-beta.3","@ignored/block":"4.0.0-beta.3","abstract-level":"^1.0.3","@ignored/common":"3.0.0-beta.3","@ignored/ethash":"2.0.0-beta.3","ethereum-cryptography":"^1.1.2","semaphore-async-await":"^1.5.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","tape":"^5.3.1","karma":"^6.3.2","eslint":"^8.0.0","ts-node":"^10.2.1","karma-tap":"^4.2.0","typescript":"^4.4.2","@types/node":"^16.11.7","@types/tape":"^4.13.2","@types/async":"^2.4.1","@types/lru-cache":"^5.1.0","karma-typescript":"^5.5.3","@types/level-errors":"^3.0.0","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/blockchain_6.0.0-beta.3_1660749027772_0.03946818549704423","host":"s3://npm-registry-packages"}},"6.0.0-beta.4":{"name":"@ignored/blockchain","version":"6.0.0-beta.4","keywords":["ethereum","blockchain"],"author":{"name":"mjbecze","email":"mjbecze@gmail.com"},"license":"MPL-2.0","_id":"@ignored/blockchain@6.0.0-beta.4","maintainers":[{"name":"fvictorio","email":"victorio.franco@gmail.com"},{"name":"alcuadrado","email":"email@patriciopalladino.com"}],"homepage":"https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/blockchain#readme","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+blockchain%22"},"dist":{"shasum":"532bb908b2cc5c00fa54ffb2c15f8d7678ff3ba9","tarball":"https://registry.npmjs.org/@ignored/blockchain/-/blockchain-6.0.0-beta.4.tgz","fileCount":84,"integrity":"sha512-Ddp/rpXOGus3lVLjTfOUxTqjvG9j4poLd7YzzLix6BXhBbygm2YEzmetPIOmmO/PTYs41nkQceNO8ZThDIEnTA==","signatures":[{"sig":"MEYCIQDKpxRIpBJen/ZOOsyFCH3Iax1/EJ95MJGFSQI862HXhgIhANytjG8tjJmpVdeV6/rtZ2L8ujKKt3dqTvbUbEO4NCYn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1699286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAR6mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpkFw/6A5C4FFggB1g77qAypNV3iD6QrA3zDGDbD1lr4fIB/kaCnaTW\r\nBj6YR3Sc0tltY0Z/mdQ9GByCzbA8OklzKCZ66coDfMtK3k8dDqcCF1p6ZG9s\r\n0KJC5aqHtk16cnXnscHynRqCiCwqG7h3kdJggPF/ZIyarWm2mb/CyMSmb8l1\r\n/6gdgXO2qujSlmO/BJRInMNFg9aICkiN/dqIIHx6rsfbMDiKhVC0xuwTij0g\r\nAbxdLApu2y5Mpx01PcCt+8oBXX0x1RZ16xjgWaYMBMfCA1OhL8PQWLaYYYG5\r\neR/bB0qUynWIJSLmRNHp8Tnmeu9nPVsNbMiZYpHH7G69PHiVZzxaXQFapldu\r\nlT1FqAcoRvtbFOekpG4V7MdYFXdHWWkqNzJ23GwdQfgHGvNRZRpAC7Z9ipl4\r\nGD6k/GD/tGzWJggbCard8dUvX57PC37XERn76uG8ubhi+54zifu314iuPP4x\r\nvMrkpUsFO9ELBf2jIpPjddQj1dQ7qxln1/AqiZCPj1VPinThD94UvNoBAYRL\r\nCoKVGFk4Do6tD3sYiMwLgodyNTImllz7hymfywxBxaQU3FZ7uD0mePTpeTk2\r\nYJy6n+iVW1aSA73tO8c3ul6UGd9FLd8lUTyxO7Wc7tK2/zIKxGIKZJeYXCQR\r\nC2tSKoh03mEGX4Qry3HbMk8fef9S31rpvIQ=\r\n=9pR/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14"},"gitHead":"38f7fe0088ea852ecb0a8a5b4b5bcd00e68b5b25","scripts":{"tsc":"../../config/cli/ts-compile.sh","lint":"../../config/cli/lint.sh","tape":"tape -r ts-node/register","test":"npm run test:node && npm run test:browser","build":"../../config/cli/ts-build.sh","clean":"../../config/cli/clean-package.sh","coverage":"../../config/cli/coverage.sh","lint:fix":"../../config/cli/lint-fix.sh","lint:diff":"../../config/cli/lint-diff.sh","test:node":"npm run tape -- ./test/*.spec.ts","docs:build":"typedoc --options typedoc.js","test:browser":"karma start karma.conf.js"},"_npmUser":{"name":"fvictorio","email":"victorio.franco@gmail.com"},"repository":{"url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git","type":"git"},"_npmVersion":"8.15.1","description":"A module to store and interact with blocks","directories":{},"_nodeVersion":"14.19.3","dependencies":{"debug":"^4.3.3","level":"^8.0.0","lru-cache":"^5.1.1","@ignored/rlp":"4.0.0-beta.4","memory-level":"^1.0.0","@ignored/trie":"5.0.0-beta.4","@ignored/util":"8.0.0-beta.4","@ignored/block":"4.0.0-beta.4","abstract-level":"^1.0.3","@ignored/common":"3.0.0-beta.4","@ignored/ethash":"2.0.0-beta.4","ethereum-cryptography":"^1.1.2","semaphore-async-await":"^1.5.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/async":"^2.4.1","@types/lru-cache":"^5.1.0","@types/level-errors":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/blockchain_6.0.0-beta.4_1661017766134_0.8786644598975135","host":"s3://npm-registry-packages"}},"6.0.0-beta.5":{"name":"@ignored/blockchain","version":"6.0.0-beta.5","keywords":["ethereum","blockchain"],"author":{"name":"mjbecze","email":"mjbecze@gmail.com"},"license":"MPL-2.0","_id":"@ignored/blockchain@6.0.0-beta.5","maintainers":[{"name":"fvictorio","email":"victorio.franco@gmail.com"},{"name":"alcuadrado","email":"email@patriciopalladino.com"}],"homepage":"https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/blockchain#readme","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+blockchain%22"},"dist":{"shasum":"caa98235dea57d6049dc0e1bb472c3bcaf852f2b","tarball":"https://registry.npmjs.org/@ignored/blockchain/-/blockchain-6.0.0-beta.5.tgz","fileCount":84,"integrity":"sha512-d6ZvwOJ1e18Aqq5kciExTIlG39oMFFTZuNQDkMK88Wvv+WqyyMP8Vsrjjd+3aK4CVMvu9tsttY5DiHa15DzImA==","signatures":[{"sig":"MEYCIQCAt7t6+3bp1Imoo+2KX5NU5AXDKysLz3KwCw4qA8OhXgIhAMx7/v4djKw8m9wO3FCHY6j04ZLHPQZOGsnYNd4pnHML","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1699286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjASDNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtwQ/9FfP+LkzpWJo2TLEkdY//7OvNKQsI5yKQ4mP7FtTtU0EykZFO\r\npC3t7PhpihXaMD0yy+DJu95HbgB+AN5zx5b4I9eP9qsDHp1ele0i0m40Hwq8\r\nHOC/hirHjtQgVQx3BKaAInqf2anaF4HjNCV0s4fTxQ4bq/IruJsnuxOH5nMl\r\nEpipu3g/KSAMRxNzrZlpeBnDD+EfSxQmG9o/jDQ/gBR3/XT7kSv3a3oK98ev\r\nRN2Wc1o3rp2mSiZziwCyjyClKKZJyXNh/7Qw7PJB7vmuN+4GxeYWl3VzxZLd\r\nOr+oHXEtNO6PSi7FsU2tBRK+n+WUELKVi3JMoT4FOqMN+J1ydGaLyGooV0Lj\r\nSNXSoAmVWeMyMjKjIRJAMjXiUOJh+cGYnp8qVNBMJ/Gokt5AnPzAcLI/Yfl2\r\n5hWiIE+5JaJfblKL0bOo4dJrzBBGEgRDC+Rl+iz75rO0csABuWuBxcEbboOY\r\nmxt9R6tNFCIawLa+o/j50vjElNhw9qZ+pN/BQyJBYmzE58GG2k0x4WhcAQ3Z\r\nc9mRDJutNWi7wOPB81bGmtb9HpQQJThb0AKQyTcjrQMrbssQ2eUWclqaSbCd\r\nTYhJV2oMPMVi6fT+8bN3rGe96Rel7LPnzNUlAWQvythM0H+kPdZdQXqzGUxG\r\ndp8XeQrmsBcKpxjX/SxaZZ88hFc8tB3yKrY=\r\n=TrGX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14"},"gitHead":"38f7fe0088ea852ecb0a8a5b4b5bcd00e68b5b25","scripts":{"tsc":"../../config/cli/ts-compile.sh","lint":"../../config/cli/lint.sh","tape":"tape -r ts-node/register","test":"npm run test:node && npm run test:browser","build":"../../config/cli/ts-build.sh","clean":"../../config/cli/clean-package.sh","coverage":"../../config/cli/coverage.sh","lint:fix":"../../config/cli/lint-fix.sh","lint:diff":"../../config/cli/lint-diff.sh","test:node":"npm run tape -- ./test/*.spec.ts","docs:build":"typedoc --options typedoc.js","test:browser":"karma start karma.conf.js"},"_npmUser":{"name":"fvictorio","email":"victorio.franco@gmail.com"},"repository":{"url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git","type":"git"},"_npmVersion":"8.15.1","description":"A module to store and interact with blocks","directories":{},"_nodeVersion":"14.19.3","dependencies":{"debug":"^4.3.3","level":"^8.0.0","lru-cache":"^5.1.1","@ignored/rlp":"4.0.0-beta.5","memory-level":"^1.0.0","@ignored/trie":"5.0.0-beta.5","@ignored/util":"8.0.0-beta.5","@ignored/block":"4.0.0-beta.5","abstract-level":"^1.0.3","@ignored/common":"3.0.0-beta.5","@ignored/ethash":"2.0.0-beta.5","ethereum-cryptography":"^1.1.2","semaphore-async-await":"^1.5.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/async":"^2.4.1","@types/lru-cache":"^5.1.0","@types/level-errors":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/blockchain_6.0.0-beta.5_1661018317496_0.6865411978134486","host":"s3://npm-registry-packages"}},"6.0.0-beta.6":{"name":"@ignored/blockchain","version":"6.0.0-beta.6","keywords":["ethereum","blockchain"],"author":{"name":"mjbecze","email":"mjbecze@gmail.com"},"license":"MPL-2.0","_id":"@ignored/blockchain@6.0.0-beta.6","maintainers":[{"name":"fvictorio","email":"victorio.franco@gmail.com"},{"name":"alcuadrado","email":"email@patriciopalladino.com"}],"homepage":"https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/blockchain#readme","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+blockchain%22"},"dist":{"shasum":"cb85588446cef488b2f7e73b6a04048edc7912ce","tarball":"https://registry.npmjs.org/@ignored/blockchain/-/blockchain-6.0.0-beta.6.tgz","fileCount":84,"integrity":"sha512-vg0DRBf4v0Pfe08IhD2xKvbQNvsKNw64NOMGTtwNtGnURekh3BMTRslqpTAJK0taAZPd8GDhNygAxCU9VvVgLQ==","signatures":[{"sig":"MEQCIBgbenzObx25MxgS3H4lt4eGbTPwTi5vcClvv2mliLUjAiAoZwuHB7O2Zry5j8wIx1N7AjsuS01xslfxW+ybo85/pA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1699014,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjASPIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/jhAAmBcHjU81NY21BM9FRrrgUj/LLznaJ6ihKYmz5cNC+glnl67/\r\nJVyzwsQTLgScW6W4ymQgPXnOD6LFzSY6lc47zFyAKS9D+jZvb03W5WMzwICK\r\nUXke7zUmF/PmSqf2cq2X96pqqbkIsWyfI/7IWwNvD0dVH/YmNwKIhA54Wvdc\r\nTxQUrIcaTBDOlg09++p8ojLmVdG1eVFUDl0QnPGoep5qZfbtkbr57Zt9BEAq\r\nIUybPupfhshNizgwHvPlBZHqv64DqivLS90HL1pFBrDq26oV1GW84H2n57zD\r\nP1Zq+jZtYbT92mtWNkH7abkOymcapc2Im06BMFQ/vpwxKmr1GJQtCys8VL8Z\r\n4dwfFwAyWjXnLw8rap+qO82Yc1k5Yl3+xVzs03zqsfgKGX8gOsI7ttipyuCj\r\nUBF4AJzDSqi/Jo2JMr5qsH3rCGvO6A2o2t0JLMS6A9Mwej+jXnScXFCp5erV\r\njvcLtzT+c/9Z748NpWdTE+3KDZMtIgvQKLZkekHzzMaZzdk7KGZp4MJNnhQo\r\nhbiiJ9dqnqAAwsfPB5dqph0vnnfsqWoknaMzbSET0Yjb8rVIOp/WopiPevQ8\r\nNb/GYN/OnoDdMn1FeYFLgb8ApuTpu/BlhgVXkyDquGAt++3nYeyzMJFwNYXS\r\ndUluHo1/0KTzNTBMd8p5ZdDHgbeaTAfWDDk=\r\n=Z30D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14"},"gitHead":"38f7fe0088ea852ecb0a8a5b4b5bcd00e68b5b25","scripts":{"tsc":"../../config/cli/ts-compile.sh","lint":"../../config/cli/lint.sh","tape":"tape -r ts-node/register","test":"npm run test:node && npm run test:browser","build":"../../config/cli/ts-build.sh","clean":"../../config/cli/clean-package.sh","coverage":"../../config/cli/coverage.sh","lint:fix":"../../config/cli/lint-fix.sh","lint:diff":"../../config/cli/lint-diff.sh","test:node":"npm run tape -- ./test/*.spec.ts","docs:build":"typedoc --options typedoc.js","test:browser":"karma start karma.conf.js"},"_npmUser":{"name":"fvictorio","email":"victorio.franco@gmail.com"},"repository":{"url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git","type":"git"},"_npmVersion":"8.15.1","description":"A module to store and interact with blocks","directories":{},"_nodeVersion":"14.19.3","dependencies":{"debug":"^4.3.3","level":"^8.0.0","lru-cache":"^5.1.1","@ignored/rlp":"4.0.0-beta.6","memory-level":"^1.0.0","@ignored/trie":"5.0.0-beta.6","@ignored/util":"8.0.0-beta.6","@ignored/block":"4.0.0-beta.6","abstract-level":"^1.0.3","@ignored/common":"3.0.0-beta.6","@ignored/ethash":"2.0.0-beta.6","ethereum-cryptography":"^1.1.2","semaphore-async-await":"^1.5.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/async":"^2.4.1","@types/lru-cache":"^5.1.0","@types/level-errors":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/blockchain_6.0.0-beta.6_1661019080088_0.5175940448057053","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-08-17T15:10:27.688Z","modified":"2026-06-12T13:45:59.086Z","6.0.0-beta.3":"2022-08-17T15:10:28.133Z","6.0.0-beta.4":"2022-08-20T17:49:26.406Z","6.0.0-beta.5":"2022-08-20T17:58:37.744Z","6.0.0-beta.6":"2022-08-20T18:11:20.369Z"},"bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+blockchain%22"},"author":{"name":"mjbecze","email":"mjbecze@gmail.com"},"license":"MPL-2.0","homepage":"https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/blockchain#readme","keywords":["ethereum","blockchain"],"repository":{"url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git","type":"git"},"description":"A module to store and interact with blocks","maintainers":[{"email":"john@kanej.me","name":"kanej"},{"email":"email@patriciopalladino.com","name":"alcuadrado"}],"readme":"# @ethereumjs/blockchain\n\n[![NPM Package][blockchain-npm-badge]][blockchain-npm-link]\n[![GitHub Issues][blockchain-issues-badge]][blockchain-issues-link]\n[![Actions Status][blockchain-actions-badge]][blockchain-actions-link]\n[![Code Coverage][blockchain-coverage-badge]][blockchain-coverage-link]\n[![Discord][discord-badge]][discord-link]\n\n| A module to store and interact with blocks. |\n| ------------------------------------------- |\n\nNote: this `README` reflects the state of the library from `v5.0.0` onwards. See `README` from the [standalone repository](https://github.com/ethereumjs/ethereumjs-blockchain) for an introduction on the last preceding release.\n\n## Installation\n\nTo obtain the latest version, simply require the project using `npm`:\n\n```shell\nnpm install @ethereumjs/blockchain\n```\n\n## Usage\n\n### Introduction\n\nThe `Blockchain` package represents an Ethereum-compatible blockchain storing a sequential chain of [@ethereumjs/block](../block) blocks and holding information about the current canonical head block as well as the context the chain is operating in (e.g. the hardfork rules the current head block adheres to).\n\nNew blocks can be added to the blockchain. Validation ensures that the block format adheres to the given chain rules (with the `Blockchain.validateBlock()` function) and consensus rules (`Blockchain.consensus.validateConsensus()`).\n\nThe library also supports reorg scenarios e.g. by allowing to add a new block with `Blockchain.putBlock()` which follows a different canonical path to the head than given by the current canonical head block.\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```typescript\nimport { Blockchain } from '@ethereumjs/blockchain'\nimport { Chain, Common } from '@ethereumjs/common'\n\nconst { Level } = require('level')\n\nconst gethDbPath = './chaindata' // Add your own path here. It will get modified, see remarks.\n\nconst common = new Common({ chain: Chain.Ropsten })\nconst db = new Level(gethDbPath)\n// Use the safe static constructor which awaits the init method\nconst blockchain = Blockchain.create({ common, db })\n\nblockchain.iterator('i', (block) => {\n  const blockNumber = block.header.number.toString()\n  const blockHash = block.hash().toString('hex')\n  console.log(`Block ${blockNumber}: ${blockHash}`)\n})\n```\n\n**WARNING**: Since `@ethereumjs/blockchain` is also doing write operations on the DB for safety reasons only run this on a copy of your database, otherwise this might lead to a compromised DB state.\n\n### Consensus\n\nStarting with v6 there is a dedicated consensus class for each type of supported consensus, `Ethash`, `Clique` and `Casper` (PoS, this one is rather the do-nothing part of `Casper` and letting the respective consensus/beacon client do the hard work! 🙂). Each consensus class adheres to a common interface `Consensus` implementing the following five methods in a consensus-specific way:\n\n- `genesisInit(genesisBlock: Block): Promise<void>`\n- `setup(): Promise<void>`\n- `validateConsensus(block: Block): Promise<void>`\n- `validateDifficulty(header: BlockHeader): Promise<void>`\n- `newBlock(block: Block, commonAncestor?: BlockHeader, ancientHeaders?: BlockHeader[]): Promise<void>`\n\n#### Custom Conensus Algorithms\n\nAlso part of V6, you can also create a custom consensus class implementing the above interface and pass it into the `Blockchain` constructor using the `consensus` option at instantiation. See [this test script](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/test/customConsensus.spec.ts) for a complete example of how write and use a custom consensus implementation.\n\nNote, if you construct a blockchain with a custom consensus implementation, transition checks for switching from PoW to PoS are disabled so defining a merge hardfork will have no impact on the consensus mechanism defined for the chain.\n\n## Custom Genesis State\n\nStarting with v6 responsibility for setting up a custom genesis state moved from the [Common](../common/) library to the `Blockchain` package, see PR [#1924](https://github.com/ethereumjs/ethereumjs-monorepo/pull/1924) for some work context.\n\nA genesis state can be set along `Blockchain` creation by passing in a custom `genesisBlock` and `genesisState`. For `mainnet` and the official test networks like `sepolia` or `goerli` genesis is already provided with the block data coming from `@ethereumjs/common`. The genesis state is being integrated in the `Blockchain` library (see `genesisStates` folder).\n\nTODO: add code example here!\n\nThe genesis block from the initialized `Blockchain` can be retrieved via the `Blockchain.genesisBlock` getter. For creating a genesis block from the params in `@ethereumjs/common`, the `createGenesisBlock(stateRoot: Buffer): Block` method can be used.\n\n## EIP-1559 Support\n\nThis library supports the handling of `EIP-1559` blocks and transactions starting with the `v5.3.0` release.\n\n## API\n\n### Docs\n\nGenerated TypeDoc API [Documentation](./docs/README.md)\n\n### BigInt Support\n\nStarting with v6 the usage of [BN.js](https://github.com/indutny/bn.js/) for big numbers has been removed from the library and replaced with the usage of the native JS [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) data type (introduced in `ES2020`).\n\nPlease note that number-related API signatures have changed along with this version update and the minimal build target has been updated to `ES2020`.\n\n## Developer\n\nFor debugging blockchain control flows the [debug](https://github.com/visionmedia/debug) library is used and can be activated on the CL with `DEBUG=[Logger Selection] node [Your Script to Run].js`.\n\nThe following initial logger is currently available:\n\n| Logger              | Description                                                 |\n| ------------------- | ----------------------------------------------------------- |\n| `blockchain:clique` | Clique operations like updating the vote and/or signer list |\n\nThe following is an example for a logger run:\n\nRun with the clique logger:\n\n```shell\nDEBUG=blockchain:clique ts-node test.ts\n```\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. If you want to join for work or carry out improvements on the libraries, please review our [contribution guidelines](https://ethereumjs.readthedocs.io/en/latest/contributing.html) first.\n\n## License\n\n[MPL-2.0](<https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2)>)\n\n[discord-badge]: https://img.shields.io/static/v1?logo=discord&label=discord&message=Join&color=blue\n[discord-link]: https://discord.gg/TNwARpR\n[blockchain-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/blockchain.svg\n[blockchain-npm-link]: https://www.npmjs.com/package/@ethereumjs/blockchain\n[blockchain-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-monorepo/package:%20blockchain?label=issues\n[blockchain-issues-link]: https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A\"package%3A+blockchain\"\n[blockchain-actions-badge]: https://github.com/ethereumjs/ethereumjs-monorepo/workflows/Blockchain/badge.svg\n[blockchain-actions-link]: https://github.com/ethereumjs/ethereumjs-monorepo/actions?query=workflow%3A%22Blockchain%22\n[blockchain-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-monorepo/branch/master/graph/badge.svg?flag=blockchain\n[blockchain-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-monorepo/tree/master/packages/blockchain\n","readmeFilename":"README.md"}