{"_id":"@ignored/block","_rev":"15-46160e4b95706d52005e41dd490b4085","name":"@ignored/block","dist-tags":{"latest":"4.0.0-beta.6"},"versions":{"4.0.0-beta.3":{"name":"@ignored/block","version":"4.0.0-beta.3","keywords":["ethereum","block"],"author":{"url":"mb@ethdev.com","name":"mjbecze"},"license":"MPL-2.0","_id":"@ignored/block@4.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/block#readme","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+block%22"},"dist":{"shasum":"1ce68a05d8ce1f0ef917289469b8cb3944e64977","tarball":"https://registry.npmjs.org/@ignored/block/-/block-4.0.0-beta.3.tgz","fileCount":43,"integrity":"sha512-zn1DTpNtDpX7bou7Ox5sBuhyZfZF4Q9DoKWgisuSJxM78EURfs0Y75HQctrqfSP89LpA8tsA0JhtW/kFU1EkCg==","signatures":[{"sig":"MEUCIQDJvrhBFgqFf0lIcWul2DKoOu+W6GcJbSaL11UVYE6AhQIgOV8XTi/uyJLwOYUgrDdXkxd9pPgCQ2Z1T85ElJROTiw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":189050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/QS3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo15g/9FYokq9pVJEzFVYOWZJmj3/w8cChA+ngjsCWWkfu4/UWRDCR4\r\nztr7XLSszePKSQ7Cmv6Heursj/McRfB6V2vtc/mMvGzJdflGtwF3K/JGz0Cl\r\nl+UiwiQuZ+QWqRHFkAvAoHFRTdUCZWbkStOMV9QRGGk2MvOwr9G3U86vqo4i\r\noFDHYtmxO33xezk9KvzpPIAHeMcnGeZzhWMEES8KCQCbVjmLMQTt5hTE3Sei\r\nGnlA86ELfMzZm/OILm4LxgPY5vUWgOrL62zW5MqQbQRLE3nSvo8Cx0c3BSl5\r\nPZ7qDpQ8ysoqLGV4TRDavwyCIm7QVxESt5MIud41NNUBrwFQf6Wcia0Rn9ZQ\r\nQ/KOMENY+5Cv23zUQse0GlBr5KyMQK2TJBryqTpqzxZXsvid2bRgEoUdRNkj\r\nUVNRA9WulE9nnHwyEyOkuNXivvfwSh981UAU5J0elV+IYKwVROfgJd507vJl\r\nwpDVDaJLThu4jxjyc6p74OeMCo1YJqvaYOdPCu4wF696MUtR22q78IfJcVcF\r\naPfDazPjjJcnEd/8ssMnMiD2VP3qeBgrY2nFW9Y8OMZ5kviaYzbZdb8RITTV\r\nSDQAj6Qk+65RnyE7LZse9g7FmbDNJ0zTk2OEBMI8p+r1ghU0RMHQIC++iban\r\nOChONm1oTw2pt+mgzh2+zR9vMXdHQLzaaC4=\r\n=L6kV\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":"Provides Block serialization and help functions","directories":{},"_nodeVersion":"14.19.3","dependencies":{"@ignored/tx":"4.0.0-beta.3","@ignored/rlp":"4.0.0-beta.3","@ignored/trie":"5.0.0-beta.3","@ignored/util":"8.0.0-beta.3","@ignored/common":"3.0.0-beta.3","ethereum-cryptography":"^1.1.2"},"_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/lru-cache":"^5.1.0","karma-typescript":"^5.5.3","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0"},"_npmOperationalInternal":{"tmp":"tmp/block_4.0.0-beta.3_1660748982856_0.31085661665869924","host":"s3://npm-registry-packages"}},"4.0.0-beta.4":{"name":"@ignored/block","version":"4.0.0-beta.4","keywords":["ethereum","block"],"author":{"url":"mb@ethdev.com","name":"mjbecze"},"license":"MPL-2.0","_id":"@ignored/block@4.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/block#readme","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+block%22"},"dist":{"shasum":"88efea1352031b13a22b5f325c0c48afd047183e","tarball":"https://registry.npmjs.org/@ignored/block/-/block-4.0.0-beta.4.tgz","fileCount":11,"integrity":"sha512-iHHKaRFrpdcwnk9GyjmWf8lFmIFWNXUYMvFTGtOJb1Fc4AT/qw26mA5EQDqpnsvcayCvGxe7PuE6Rpcm2l0Tnw==","signatures":[{"sig":"MEYCIQDlryC29D8ob6taosg7AU2/goEL1bb9SR1/I05MhCD/swIhAO5EvBJYYXAhw3Ddko013zgq8oLfeZOCroiR22vnyix/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":78507,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAR6bACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMtA//T9nANNJ2k5AtnMYBwJlNIGskhDGDXR4qVexXgNfQg9B6Ke9E\r\nqc5OP801k3Q/n9LEF3+xPPku8FmGrBd3sw5WaE/3i3tuBx/T9LtHGQBIEvFF\r\nTuyNIxEp50M4j6ItNnZI9ZqApswXQVOuoBH+CLmMS6n/JzjkqrggOCGtIiP/\r\niIRMH9PYMA1xTBq7jfUTkE3qYFWGloDxhjSri0njzhJo2+pMxHRgACkaOaF+\r\nbup9OWyl6qimKgFHL3l5pPTH64+/nV4M9+o9rUotBOuDh2bIbtBCMvsejabe\r\nAJIRXsblRfhoXjurUI1dS8/2LMENTs05a/GD4qejhJpjek0nCKtkWJ7F4oIa\r\nQfpeteBpLCfQQTaiVTVSoioPIjB7dQVqY0x02J9+cOBqloLvh4Co4axrbsuH\r\njtdCs0G44+GCes6TdKh1jn726pzqS4m3xavJ+hXhICVPTRaWqgCwYTML9Rn+\r\nl8K8KBxHn/KKNVPY1gvyVzLB5MWHRgfc/pad0zHkziqTTn6PUPiFzgIvb2zv\r\nV78aCKhGYjgBlxgjHb+HNjj+/sn6r7uq7tm9qZSNEVRC2nrkbbnKNfklLnb1\r\nQ+78qidd76hV0GqLAGBFs7fyI9UM5QKQNZbtXNwJCC1x0PF/0h5uU8Lqevyn\r\n+3lddGAMAYTXA/n8edtsHluNqkYFnK+EZvg=\r\n=PZXX\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":"Provides Block serialization and help functions","directories":{},"_nodeVersion":"14.19.3","dependencies":{"@ignored/tx":"4.0.0-beta.4","@ignored/rlp":"4.0.0-beta.4","@ignored/trie":"5.0.0-beta.4","@ignored/util":"8.0.0-beta.4","@ignored/common":"3.0.0-beta.4","ethereum-cryptography":"^1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/lru-cache":"^5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/block_4.0.0-beta.4_1661017755378_0.12003735800540416","host":"s3://npm-registry-packages"}},"4.0.0-beta.5":{"name":"@ignored/block","version":"4.0.0-beta.5","keywords":["ethereum","block"],"author":{"url":"mb@ethdev.com","name":"mjbecze"},"license":"MPL-2.0","_id":"@ignored/block@4.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/block#readme","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+block%22"},"dist":{"shasum":"e6bc94625146207b2a64a7982ae6911198061bcb","tarball":"https://registry.npmjs.org/@ignored/block/-/block-4.0.0-beta.5.tgz","fileCount":43,"integrity":"sha512-R3nOs9gLbaGH7xf6rYAyE1QExpbXbkNRCIrOwqvId4k3u2vsy2/Tp15z9rLccvPqBMp+Yp+OXHCX4Rdoq+nlyQ==","signatures":[{"sig":"MEQCIGRWmeDBk/o0QpLMCEmCUlyqvolSLJPO1fylQJodrwb+AiBOwieEQnPl4+B60n5GaxbNvul90K3K9QeKMNA6y/EpAQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":188867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjASDAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpPvQ/9GbfIZfy422KoMzme1KLMjj4/FA3b/ppuRIgBotg66lLvUAp+\r\nLzdm5/8zF5u4qWR2VLkNEsBZegC1DfkYY6k/14SI1dh7th8xnTLfU9ACNH7O\r\n6ypjB0UWaq7hf/5BbQENT/BjL2s4h0iYuFoVdn9hu3thI0ScHuniHlQxVt3S\r\nm2mhxCgUIkc/J5YmHlZUZjZPywG4JvhiwaW4OD6rSIW9xbu8eGYyG1gfJsnn\r\nGlgxEIGPt+l+r9AOh0r6UCxUxa8veP8Kp+FeCeZkAY0h1nSHQTkat4TFF11Z\r\nAdQNeIzRaw+ceM2CoDAbJNIKKTxMu+iQmPM7gUL8EeiTunmhS69Kt56FJ3aZ\r\nUzwL1ea9Cu2dFMSIXV4qJiE4nbHpNz7/rqOQp8TVw06s7ybF8ZgaBpldw7c9\r\nd/1Vg3ugGEIfSiz5pDoztFZsRsn4FYorVtuz/c+rKKuVlHr41m5Gw1ESrF7N\r\nFI8Ab7NrIeJxyyuo2SlTLth+AUoqclCYtz/P5OJW/57veI/GlqvGmYzqvZok\r\nimtKKoKTOUsimnSdL6/fgiDPabwzYDF3nvhhaivrk2m8vXVoj6oaI9+lEy3t\r\nWdcZAeauqqdfXaYdsab0LkArxy/a95bfHI4VFz2pk8RBFKUJckHn7rY/jF9i\r\n6wvC+n0dG8EnJ68fqJQ5HSRAUMzIRO7dvQI=\r\n=t9co\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":"Provides Block serialization and help functions","directories":{},"_nodeVersion":"14.19.3","dependencies":{"@ignored/tx":"4.0.0-beta.5","@ignored/rlp":"4.0.0-beta.5","@ignored/trie":"5.0.0-beta.5","@ignored/util":"8.0.0-beta.5","@ignored/common":"3.0.0-beta.5","ethereum-cryptography":"^1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/lru-cache":"^5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/block_4.0.0-beta.5_1661018303848_0.19802447888094532","host":"s3://npm-registry-packages"}},"4.0.0-beta.6":{"name":"@ignored/block","version":"4.0.0-beta.6","keywords":["ethereum","block"],"author":{"url":"mb@ethdev.com","name":"mjbecze"},"license":"MPL-2.0","_id":"@ignored/block@4.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/block#readme","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+block%22"},"dist":{"shasum":"b71f95cb6b04202ade2240b97c316c775621d0c5","tarball":"https://registry.npmjs.org/@ignored/block/-/block-4.0.0-beta.6.tgz","fileCount":43,"integrity":"sha512-eWBp0y9W7ME/n2422rqsMofHDKklG6TQrKqnwbbMPsBdZf3amF/hr0GDeFylPnyBJxxAunnTNhzzokAZ3OT/hA==","signatures":[{"sig":"MEUCIQCuH0LhPzefyJB9YxM6N83xpquR0ZgWBKvHG/5K9Ep3XwIgB1sSKNQNxia/ahdM6FZv0gfwGGtB7jScUIkZtb0O8v0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":188740,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjASOuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoMTg//aPwNhcbkkVNxbJG65R5iEyYm0FgQLpk77y/TxUquBmaXc8bz\r\naPdqTC8sIMTgP41VvwKGHlgeKGAoYO1syLnDmkS7phJaoV/bHkwCV783u9XU\r\nISPGIllPKETDTINl4uPnrA/xg9h6YODM1JoCte1ynf/dtd5yFnqdt7a+a0Zk\r\nD5af/0n/Ltr8b5XiSp1pufz4GG3JUIcZFZ44RPVHFHuTavKCHga6NDM1vkJi\r\nvAW8fDc4J0v5s4nNPIYkin6T7WX56/A6R8zRZt+Bdm4Dvl+BJZvIMHIYzsB/\r\nyXXEPHVSV7P3lR+adp5Dy0ps5N4f44IIEaV5tE3EybzM678C4mfQRKdI7yza\r\n9UOy1VPO+ZGf/pOCNEr0PxQQ5Tke2YB2DY0mU9Gqcy6lK7VGkXDBJ1FDgZ/y\r\nJZbtLf8URjh4uSfsPpuhuo4ld3iR9+6tbgjwYHPoisjszUyq1QGE2cWg5/Uy\r\nmUIUJvYL7oW8GEBySunw+gU0734A4+AgVVWGadM3p29Y6WHmggl39oq9oCcz\r\ndQEykU4ITW0k7XtMMdqZRjrqEkYzxPSwS0J4f2ePyG49Wi4RQOOxe/US92p3\r\nu2PbHHY+riQ5NM5+6PvqUSJbtnqx8a5obo+n7fBRZKPiXQc7/QTB7uzXrl1A\r\noVSTlh2nRLzuF0JYY3mMNxHoXwERxrqsYU8=\r\n=8qhe\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":"Provides Block serialization and help functions","directories":{},"_nodeVersion":"14.19.3","dependencies":{"@ignored/tx":"4.0.0-beta.6","@ignored/rlp":"4.0.0-beta.6","@ignored/trie":"5.0.0-beta.6","@ignored/util":"8.0.0-beta.6","@ignored/common":"3.0.0-beta.6","ethereum-cryptography":"^1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/lru-cache":"^5.1.0"},"_npmOperationalInternal":{"tmp":"tmp/block_4.0.0-beta.6_1661019054715_0.9520927199476983","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-08-17T15:09:42.729Z","modified":"2026-06-12T13:33:49.082Z","4.0.0-beta.3":"2022-08-17T15:09:43.065Z","4.0.0-beta.4":"2022-08-20T17:49:15.542Z","4.0.0-beta.5":"2022-08-20T17:58:24.054Z","4.0.0-beta.6":"2022-08-20T18:10:54.921Z"},"bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+block%22"},"author":{"url":"mb@ethdev.com","name":"mjbecze"},"license":"MPL-2.0","homepage":"https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/block#readme","keywords":["ethereum","block"],"repository":{"url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git","type":"git"},"description":"Provides Block serialization and help functions","maintainers":[{"email":"john@kanej.me","name":"kanej"},{"email":"email@patriciopalladino.com","name":"alcuadrado"}],"readme":"# @ethereumjs/block\n\n[![NPM Package][block-npm-badge]][block-npm-link]\n[![GitHub Issues][block-issues-badge]][block-issues-link]\n[![Actions Status][block-actions-badge]][block-actions-link]\n[![Code Coverage][block-coverage-badge]][block-coverage-link]\n[![Discord][discord-badge]][discord-link]\n\n| Implements schema and functions related to Ethereum's block. |\n| ------------------------------------------------------------ |\n\nNote: this `README` reflects the state of the library from `v3.0.0` onwards. See `README` from the [standalone repository](https://github.com/ethereumjs/ethereumjs-block) 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/block\n```\n\n## Usage\n\n### Introduction\n\nThere are three static factories to instantiate a `Block`:\n\n- `Block.fromBlockData(blockData: BlockData = {}, opts?: BlockOptions)`\n- `Block.fromRLPSerializedBlock(serialized: Buffer, opts?: BlockOptions)`\n- `Block.fromValuesArray(values: BlockBuffer, opts?: BlockOptions)`\n\nFor `BlockHeader` instantiation analog factory methods exists, see API docs linked below.\n\nInstantiation Example:\n\n```typescript\nimport { BlockHeader } from '@ethereumjs/block'\n\nconst headerData = {\n  number: 15,\n  parentHash: '0x6bfee7294bf44572b7266358e627f3c35105e1c3851f3de09e6d646f955725a7',\n  difficulty: 131072,\n  gasLimit: 8000000,\n  timestamp: 1562422144,\n}\nconst header = BlockHeader.fromHeaderData(headerData)\n```\n\nProperties of a `Block` or `BlockHeader` object are frozen with `Object.freeze()` which gives you enhanced security and consistency properties when working with the instantiated object. This behavior can be modified using the `freeze` option in the constructor if needed.\n\nAPI Usage Example:\n\n```typescript\ntry {\n  await block.validateData()\n  // Block data validation has passed\n} catch (err) {\n  // handle errors appropriately\n}\n```\n\n### EIP-1559 Blocks\n\nThis library supports the creation of [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) compatible blocks starting with `v3.3.0`. For this to work a Block needs to be instantiated with a Hardfork greater or equal to London (`Hardfork.London`).\n\n```typescript\nimport { Block } from '@ethereumjs/block'\nimport { Chain, Common, Hardfork } from '@ethereumjs/common'\nconst common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.London })\n\nconst block = Block.fromBlockData(\n  {\n    header: {\n      baseFeePerGas: BigInt(10),\n      gasLimit: BigInt(100),\n      gasUsed: BigInt(60),\n    },\n  },\n  { common }\n)\n\n// Base fee will increase for next block since the\n// gas used is greater than half the gas limit\nblock.header.calcNextBaseFee().toNumber() // 11\n\n// So for creating a block with a matching base fee in a certain\n// chain context you can do:\n\nconst blockWithMatchingBaseFee = Block.fromBlockData(\n  {\n    header: {\n      baseFeePerGas: parentHeader.calcNextBaseFee(),\n      gasLimit: BigInt(100),\n      gasUsed: BigInt(60),\n    },\n  },\n  { common }\n)\n```\n\nEIP-1559 blocks have an extra `baseFeePerGas` field (default: `BigInt(7)`) and can encompass `FeeMarketEIP1559Transaction` txs (type `2`) (supported by `@ethereumjs/tx` `v3.2.0` or higher) as well as `Transaction` legacy txs (internal type `0`) and `AccessListEIP2930Transaction` txs (type `1`).\n\n### Consensus Types\n\nThe block library supports the creation as well as consensus format validation of PoW `ethash` and PoA `clique` blocks (so e.g. do specific `extraData` checks on Clique/PoA blocks).\n\nConsensus format validation logic is encapsulated in the semi-private `BlockHeader._consensusFormatValidation()` method called from the constructor. If you want to add your own validation logic you can overwrite this method with your own rules.\n\nNote: Starting with `v4` consensus validation itself (e.g. Ethash verification) has moved to the `Blockchain` package.\n\n### Ethash/PoW\n\nAn Ethash/PoW block can be instantiated as follows:\n\n```typescript\nimport { Block } from '@ethereumjs/block'\nimport { Chain, Common } from '@ethereumjs/common'\nconst common = new Common({ chain: Chain.Mainnet })\nconsole.log(common.consensusType()) // 'pow'\nconsole.log(common.consensusAlgorithm()) // 'ethash'\nconst block = Block.fromBlockData({}, { common })\n```\n\nTo calculate the difficulty when creating the block pass in the block option `calcDifficultyFromHeader` with the preceding (parent) `BlockHeader`.\n\n### Clique/PoA (since v3.1.0)\n\nA clique block can be instantiated as follows:\n\n```typescript\nimport { Block } from '@ethereumjs/block'\nimport { Chain, Common } from '@ethereumjs/common'\nconst common = new Common({ chain: Chain.Goerli })\nconsole.log(common.consensusType()) // 'poa'\nconsole.log(common.consensusAlgorithm()) // 'clique'\nconst block = Block.fromBlockData({}, { common })\n```\n\nFor sealing a block on instantiation you can use the `cliqueSigner` constructor option:\n\n```typescript\nconst cliqueSigner = Buffer.from('PRIVATE_KEY_HEX_STRING', 'hex')\nconst block = Block.fromHeaderData(headerData, { cliqueSigner })\n```\n\nAdditionally there are the following utility methods for Clique/PoA related functionality in the `BlockHeader` class:\n\n- `BlockHeader.cliqueSigHash()`\n- `BlockHeader.cliqueIsEpochTransition(): boolean`\n- `BlockHeader.cliqueExtraVanity(): Buffer`\n- `BlockHeader.cliqueExtraSeal(): Buffer`\n- `BlockHeader.cliqueEpochTransitionSigners(): Address[]`\n- `BlockHeader.cliqueVerifySignature(signerList: Address[]): boolean`\n- `BlockHeader.cliqueSigner(): Address`\n\nSee the API docs for detailed documentation. Note that these methods will throw if called in a non-Clique/PoA context.\n\n### Casper/PoS (since v3.5.0)\n\nMerge-friendly Casper/PoS blocks have been introduced along with the `v3.5.0` release. Proof-of-Stake compatible execution blocks come with their own set of header field simplifications and associated validation rules. The difficulty is set to `0` since not relevant anymore, just to name an example. For a full list of changes see [EIP-3675](https://eips.ethereum.org/EIPS/eip-3675).\n\nYou can instantiate a Merge/PoS block like this:\n\n```typescript\nimport { Block } from '@ethereumjs/block'\nimport { Chain, Common, Hardfork } from '@ethereumjs/common'\nconst common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.Merge })\nconst block = Block.fromBlockData(\n  {\n    // Provide your block data here or use default values\n  },\n  { common }\n)\n```\n\n## API\n\n### Docs\n\nGenerated TypeDoc API [Documentation](./docs/README.md)\n\n### BigInt Support\n\nStarting with v4 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## Testing\n\nTests in the `tests` directory are partly outdated and testing is primarily done by running the `BlockchainTests` from within the [@ethereumjs/vm](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/vm) package.\n\nTo avoid bloating this repository with [ethereum/tests](https://github.com/ethereum/tests) JSON files, we usually copy specific JSON files and wrap them with some metadata (source, date, commit hash). There's a helper to aid in that process and can be found at [wrap-ethereum-test.sh](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/block/scripts/wrap-ethereum-test.sh).\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[block-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/block.svg\n[block-npm-link]: https://www.npmjs.com/package/@ethereumjs/block\n[block-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-monorepo/package:%20block?label=issues\n[block-issues-link]: https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A\"package%3A+block\"\n[block-actions-badge]: https://github.com/ethereumjs/ethereumjs-monorepo/workflows/Block/badge.svg\n[block-actions-link]: https://github.com/ethereumjs/ethereumjs-monorepo/actions?query=workflow%3A%22Block%22\n[block-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-monorepo/branch/master/graph/badge.svg?flag=block\n[block-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-monorepo/tree/master/packages/block\n","readmeFilename":"README.md"}